RAILGUN Reloaded
    Preparing search index...

    A Waku light node on the broadcaster network that reads fee quotes and sends transact requests for one chain.

    Index
    • Start a light node, subscribe to the fee and response topics of the chain, and read the fee messages of the last 5 minutes from Store.

      Parameters

      • params: { chainId: number; libp2p: any }

        Chain and node options.

        • chainId: number

          EVM chain ID.

        • libp2p: any

          libp2p options with the transport. The Node entry passes TCP.

      Returns Promise<BroadcasterClient>

      The started client.

    • Wait until a broadcaster quotes a token. Take the cheapest quote, or the quote of one broadcaster.

      Parameters

      • tokenAddress: string

        Fee token.

      • OptionalrailgunAddress: string

        0zk address of the broadcaster to use. Any broadcaster when undefined.

      Returns Promise<BroadcasterQuote>

      The quote.

      If no broadcaster, or not that broadcaster, quotes the token in 90 seconds.

    • Send a proven transaction to the broadcaster of a quote and wait for its answer. The answer comes by Filter, and Store covers a Filter message that the node missed.

      Parameters

      • request: TransactRequest

        Proven transaction. Its first commitment must be the fee note to quote.railgunAddress.

      • quote: BroadcasterQuote

        Quote that the fee note pays.

      Returns Promise<`0x${string}`>

      The transaction hash that the broadcaster sent.

      If the broadcaster answers with an error.

      If no answer arrives in 120 seconds.

      If no peer accepts the request in 20 seconds.