UNPKG

@bsv/p2p

Version:

A client for P2P messaging and payments

10 lines 498 B
import { WalletClient } from "@bsv/sdk"; import { MessageBoxClient } from "./MessageBoxClient.js"; import * as crypto from 'crypto'; global.self = { crypto }; (async () => { const w = new WalletClient('auto', 'localhost'); const m = new MessageBoxClient({ walletClient: w }); await m.sendMessage({ recipient: '035a1b9d7afaec315271b197ca6211741b5fb02aa87667e423d7a870851b0a53c3', messageBox: 'msg_inbox', body: 'Hello, do you see this message?' }); })(); //# sourceMappingURL=test.js.map