An abstraction for creating and signing transactions.

Constructors

Properties

chainID: IChainID

The chain ID of the Network (e.g. "1" for Mainnet).

The payload of the transaction.

gasLimit: IGasLimit

The maximum amount of gas to be consumed when processing the transaction.

gasPrice: IGasPrice

The gas price to be used.

guardian: IAddress

The address of the guardian.

guardianSignature: Buffer

The signature of the guardian.

The transaction hash, also used as a transaction identifier.

nonce: INonce

The nonce of the transaction (the account sequence number of the sender).

The options field, useful for describing different settings available for transactions

Deprecated

Use getOptions() and setOptions() instead.

receiver: IAddress

The address of the receiver.

receiverUsername: string

The username of the receiver.

sender: IAddress

The address of the sender.

senderUsername: string

The username of the sender.

signature: Buffer

The signature.

The value to transfer.

The version, required by the Network in order to correctly interpret the contents of the transaction.

Deprecated

Use getVersion() and setVersion() instead.

Methods

  • Applies the guardian signature on the transaction.

    Parameters

    • guardianSignature: Uint8Array | ISignature

      The signature, as computed by a signer.

    Returns void

  • Applies the signature on the transaction.

    Parameters

    • signature: Uint8Array | ISignature

      The signature, as computed by a signer.

    Returns void

  • Computes the current transaction fee based on the NetworkConfig and transaction properties

    Parameters

    Returns BigNumber

  • Checks the integrity of the guarded transaction

    Returns boolean

  • Serializes a transaction to a sequence of bytes, ready to be signed. This function is called internally by signers.

    Returns Buffer

  • Sets the account sequence number of the sender. Must be done prior signing.

    Parameters

    Returns void

  • Parameters

    • receiverUsername: string

    Returns void

  • Parameters

    • senderUsername: string

    Returns void

  • Converts a transaction to a ready-to-broadcast object. Called internally by the network provider.

    Returns any

Generated using TypeDoc