Class Transaction

A wrapper for a TransactionV1 or Deploy.

Hierarchy

  • Transaction

Constructors

Properties

approvals: Approval[]

The list of approvals for this transaction.

args: Args

The arguments for the transaction, which can be a map of values required by the entry point.

chainName: string

The name of the blockchain chain associated with this transaction.

The entry point of the transaction, specifying the method or action to be executed.

hash: Hash

The hash of the transaction.

initiatorAddr: InitiatorAddr

The address of the initiator of the transaction.

originDeployV1?: Deploy

The original deployment associated with this transaction, if applicable. This is optional and only populated if the transaction originated from a deploy.

originTransactionV1?: TransactionV1

The original TransactionV1 associated with this transaction, if applicable. This is optional and only populated if the transaction is based on a TransactionV1.

pricingMode: PricingMode

The pricing mode used for the transaction, which may involve different cost mechanisms.

The scheduling information for when the transaction should be executed.

The target of the transaction, which specifies where the transaction is directed (e.g., a contract or account).

timestamp: Timestamp

The timestamp when the transaction was created.

The time-to-live (TTL) duration of the transaction. It defines the expiration time for the transaction.

Methods

  • Gets the original deployment associated with this transaction, if available.

    Returns

    The original deploy or undefined if not available.

    Returns undefined | Deploy

  • Sets an already generated signature to the transaction.

    Parameters

    • signature: Uint8Array

      The Ed25519 or Secp256K1 signature.

    • publicKey: PublicKey

      The public key used to generate the signature.

    Returns void

  • Validates the transaction by checking the transaction hash and the approval signatures.

    Throws

    Throws errors if validation fails.

    Returns boolean

Generated using TypeDoc