Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 1.03 KB

README.md

File metadata and controls

29 lines (19 loc) · 1.03 KB

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(...)