Class PendingTransaction

Constructors

Properties

aggregateInputAmount: bigint

Total aggregate input amount.

aggregateOutputAmount: bigint

Total aggregate output amount.

changeAmount: bigint

Change amount (if any).

feeAmount: bigint

Total transaction fees (network fees + priority fees).

id: string

Transaction Id

mass: bigint

Calculated transaction mass.

minimumSignatures: number

Minimum number of signatures required by the transaction. (as specified during the transaction creation).

paymentAmount: any

Total amount transferred to the destination (aggregate output - change).

transaction: Transaction

Returns encapsulated network [Transaction]

type: string

Transaction type ("batch" or "final").

Methods

  • 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.

    Returns any[]

  • Creates and returns a signature for the input at the specified index.

    Parameters

    Returns string

  • Sets a signature to the input at the specified index.

    Parameters

    • input_index: number
    • signature_script: string | Uint8Array

    Returns void

  • Returns void

  • Provides a list of UTXO entries used by the transaction.

    Returns any[]

  • Serializes the transaction to a "Safe" JSON schema where it converts all bigint values to string to avoid potential client-side precision loss. Once serialized, the transaction can be deserialized using Transaction.deserializeFromSafeJSON.

    Returns string

  • Signs transaction with supplied [Array] or [PrivateKey] or an array of raw private key bytes (encoded as Uint8Array or as hex strings)

    Parameters

    • js_value: (string | Uint8Array | PrivateKey)[]
    • Optional check_fully_signed: boolean

    Returns void

  • Signs the input at the specified index with the supplied private key and an optional SighashType.

    Parameters

    Returns void

  • Submit transaction to the supplied [RpcClient] IMPORTANT: This method will remove UTXOs from the associated UtxoContext if one was used to create the transaction and will return UTXOs back to UtxoContext in case of a failed submission.

    Important

    Make sure to consume the returned txid value. Always invoke this method as follows let txid = await pendingTransaction.submit(rpc);. If you do not consume the returned value and the rpc object is temporary, the GC will collect the rpc object passed to submit() potentially causing a panic.

    Parameters

    Returns Promise<string>

    • Return copy of self without private attributes.

    Returns Object

  • Return stringified version of self.

    Returns string

Generated using TypeDoc