This class provides helper funcitons that can be used acorss the library

Hierarchy

  • Utils

Constructors

Methods

  • Parameters

    • byteArray: number[]

    Returns string

  • createTransaction returns a MutableTransaction object from WASM js, which can be used to sign, by calling Utils.signTransaction.

    You can call tx.toRpcTransaction(), which converts it to RPC object which can be used for Rust's wRPC submitTransaction endpoint.

    If you want to submit the MutableTransaction object to gRPC endpoint, you need to call Utils.convertRustTransactionToGRpcTransaction

    Parameters

    Returns Promise<MutableTransaction>

  • Parameters

    • xprv: string
    • accountIndex: bigint

    Returns Promise<XPrivateKey>

  • Parameters

    • xprv: string
    • accountIndex: bigint

    Returns Promise<XPublicKey>

  • Parameters

    • Optional hexStr: string

    Returns undefined | number[]

  • signTransaction calls signTransaction in WASM js to sign the MutableTransaction object given an array of privateKeys

    Parameters

    • tx: MutableTransaction
    • privateKeys: PrivateKey[]

    Returns MutableTransaction

Generated using TypeDoc