Class OperationManager

Constructors

Properties

blockchainClient?: PublicAPI
privateKey: PrivateKey

Methods

  • Signs an operation for a given network.

    Parameters

    • chainId: bigint

      The identifier of the blockchain network.

    • operation: OperationDetails

      The operation to sign.

    Returns Promise<Signature>

    A signature of the operation.

    Remarks

    The chainId is used to counter replay attacks on a different chain.

  • Formats an operation for signing.

    Parameters

    • chainId: bigint

      The identifier of the blockchain network.

    • operation: OperationDetails

      The operation to sign.

    • key: PublicKey

      The public key to sign the operation with.

    Returns Uint8Array

    The formatted operation ready for signing.

  • Serializes an operation according to the Massa protocol.

    Parameters

    Returns Uint8Array

    A byte array representing the serialized operation.