Class EmscriptenProvider

An adapter class that makes a JavaScript Provider implementation callable from the WASM C-layer. It creates and manages the lifecycle of a native proxy object that forwards calls to the wrapped JavaScript instance.

Implements

Constructors

Properties

objectId: number
providerPtr: number

Methods

  • Wait for a transaction to be confirmed on-chain.

    Parameters

    • txId: string

      Transaction id to confirm.

    • Optionaltimeout: number

      Optional timeout in milliseconds.

    Returns Promise<boolean>

    A promise that resolves to true if confirmed, otherwise false.

  • Evaluate a transaction to get its execution costs.

    Parameters

    • tx: string

      Transaction payload to evaluate.

    • OptionaladditionalUtxos: UTxO[]

      Optional extra UTxOs to consider.

    Returns Promise<Redeemer[]>

    A promise that resolves to a list of redeemers with execution units.

  • List all UTxOs for an address that contain a specific asset.

    Parameters

    • address: string | Address

      Payment address. Address object or bech32 string.

    • assetId: string

      Asset identifier (policyId + asset name hex).

    Returns Promise<UTxO[]>

    A promise that resolves to matching UTxOs.

  • Fetch an on-chain datum by its hash.

    Parameters

    • datumHash: string

      Hash of the datum.

    Returns Promise<string>

    A promise that resolves to the datum payload (hex-encoded CBOR).

  • Submit a signed transaction to the network.

    Parameters

    • tx: string

      Transaction payload (hex-encoded CBOR).

    Returns Promise<string>

    A promise that resolves to the submitted transaction id.