Railgun-Community / waku-broadcaster-client

MIT License
1 stars 3 forks source link

Unit Tests

RAILGUN Broadcaster Client with Waku networking layer

yarn add @railgun-community/waku-broadcaster-client-node

OR

yarn add @railgun-community/waku-broadcaster-client-web

The Basics

// Initialize the Broadcaster Client
await WakuBroadcasterClient.start(...)

// Wait for Broadcasters to connect (5-10 sec) and client to collect fees.
// Broadcasters broadcast fees through the privacy-safe Waku network.

// Get broadcaster with lowest fee for a given ERC20 token.
const selectedBroadcaster = await WakuBroadcasterClient.findBestBroadcaster(...)

// Create transaction and send through selected Broadcaster.
const broadcasterTransaction = await BroadcasterTransaction.create(...)
await BroadcasterTransaction.send(...)