Represents a Kaspa transaction. This is an artificial construct that includes additional transaction-related data such as additional data from UTXOs used by transaction inputs.

Constructors

Properties

gas: bigint
id: string

Returns the transaction ID

lockTime: bigint
mass: bigint
payload: any
subnetworkId: any
version: number

Methods

  • Returns a list of unique addresses used by transaction inputs. This method can be used to determine addresses used by transaction inputs in order to select private keys needed for transaction signing.

    Parameters

    Returns Address[]

  • Recompute and finalize the tx id based on updated tx fields

    Returns Hash

  • Returns void

  • Determines whether or not a transaction is a coinbase transaction. A coinbase transaction is a special transaction created by miners that distributes fees and block subsidy to the previous blocks' miners, and specifies the script_pub_key that will be used to pay the current miner in future blocks.

    Returns boolean

  • Serializes the transaction to a JSON string. The schema of the JSON is defined by ISerializableTransaction.

    Returns string

  • Serializes the transaction to a "Safe" JSON schema where it converts all bigint values to string to avoid potential client-side precision loss.

    Returns string

    • Return copy of self without private attributes.

    Returns Object

  • Return stringified version of self.

    Returns string

  • Deserialize the Transaction Object from a JSON string.

    Parameters

    • json: string

    Returns Transaction

  • Deserialize the Transaction Object from a pure JavaScript Object.

    Parameters

    • js_value: any

    Returns Transaction

  • Deserialize the Transaction Object from a "Safe" JSON schema where all bigint values are represented as string.

    Parameters

    • json: string

    Returns Transaction

Generated using TypeDoc