• Preparing search index...
  • The search index is not available
@kynesyslabs/demosdk
  • @kynesyslabs/demosdk
  • websdk
  • createBridgeNamespace

Function createBridgeNamespace

  • createBridgeNamespace(ctx): {
        submit: ((compiled: NativeBridgeOperationCompiled, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
    }
  • Native bridge operations as one-call programmatic transactions.

    The native bridge is a two-step flow: first an RPC (generateOperation → node) produces a BridgeOperationCompiled, then that compiled operation is turned into a signed nativeBridge transaction. Compiling is a round-trip to the node and stays with the caller; this namespace exposes only the transaction step, collapsing generateOperationTx → confirm → broadcast into a single call that auto-broadcasts within the configured fee ceiling.

    Parameters

    • ctx: ProgrammaticContext

    Returns {
        submit: ((compiled: NativeBridgeOperationCompiled, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>);
    }

    • submit: ((compiled: NativeBridgeOperationCompiled, opts?: ProgrammaticTxOptions) => Promise<ProgrammaticTxResult>)

      Submit a compiled bridge operation as a nativeBridge transaction, end to end.

      NativeBridgeMethods.generateOperationTx signs the transaction (deriving nonce from the Demos instance); the shared runner then confirms it and (in "auto" mode) broadcasts it within the fee cap.

      Example

      // `compiled` comes back from the node's nativeBridge RPC:
      await demos.run.bridge.submit(compiled)
      // build + confirm only, broadcast later yourself:
      const r = await demos.run.bridge.submit(compiled, { confirm: "manual" })
      await demos.broadcast(r.validityData)
        • (compiled, opts?): Promise<ProgrammaticTxResult>
        • Parameters

          • compiled: NativeBridgeOperationCompiled

            The compiled bridge operation returned by the RPC.

          • Optionalopts: ProgrammaticTxOptions

            Fee ceiling / confirmation strategy / wait behaviour.

          Returns Promise<ProgrammaticTxResult>

    • Defined in src/websdk/programmatic/bridge.ts:16

Settings

Member Visibility
@kynesyslabs/demosdk
  • Loading...

Generated using TypeDoc