Class TweakedTransactionAbstract

PSBT Transaction processor.

Hierarchy (view full)

Constructors

Properties

chalk: ChalkInstance
enableLogs: boolean
finalized: boolean = false
hideLogs: boolean
ignoreSignatureErrors: boolean = false
inputs: PsbtInputExtended[] = []

The inputs of the transaction

isBrowser: boolean = false

Is the transaction being generated inside a browser?

logColor: string = '#00ffe1'
moduleName: string
network: Network

The network of the transaction

nonWitnessUtxo?: Buffer

Add a non-witness utxo to the transaction

regenerated: boolean = false
scriptData: null | Payment = null

The script data of the transaction

sequence: number = TransactionSequence.REPLACE_BY_FEE

The sequence of the transaction

sighashTypes: undefined | number[]

The sighash types of the transaction

signed: boolean = false

Was the transaction signed?

signer: ECPairInterface | Signer

Was the transaction signed?

tapData: null | Payment = null

The tap data of the transaction

tapLeafScript: null | TapLeafScript = null

The tap leaf script

transaction: Psbt

The transaction

tweakedSigner?: ECPairInterface

Tweaked signer

Methods

  • Parameters

    • Rest...args: string[]

    Returns void

  • Parameters

    • Rest...args: string[]

    Returns void

  • Returns void

  • Returns void

  • Parameters

    • Rest...args: string[]

    Returns void

  • Parameters

    • Rest...args: string[]

    Returns void

  • Parameters

    • msg1: string
    • highlight1: string
    • msg2: string
    • highlight2: string
    • msg3: string

    Returns void

  • Returns string

  • Parameters

    • Rest...args: string[]

    Returns void

  • Parameters

    • Rest...args: string[]

    Returns void

  • Parameters

    • Rest...args: string[]

    Returns void

  • Parameters

    • Rest...args: string[]

    Returns void

  • Parameters

    • Rest...args: string[]

    Returns void

  • Pre-estimate the transaction fees

    Parameters

    • feeRate: bigint

      The fee rate

    • numInputs: bigint

      The number of inputs

    • numOutputs: bigint

      The number of outputs

    • numSignatures: bigint

      The number of signatures

    • numPubkeys: bigint

      The number of public keys

    Returns bigint

    • The estimated transaction fees
  • Parameters

    • Rest...args: string[]

    Returns void

  • Parameters

    • prefix: string

    Returns void

  • Protected

    Signs an input of the transaction.

    Parameters

    • transaction: Psbt

      The transaction to sign

    • input: PsbtInput

      The input to sign

    • i: number

      The index of the input

    • Optionalsigner: ECPairInterface | Signer

      The signer to use

    Returns Promise<void>

  • Parameters

    • Rest...args: string[]

    Returns void

  • Parameters

    • Rest...args: string[]

    Returns void

  • Parameters

    • Rest...args: string[]

    Returns void

  • Pre-estimate the transaction fees for a Taproot transaction

    Parameters

    • feeRate: bigint

      The fee rate in satoshis per virtual byte

    • numInputs: bigint

      The number of inputs

    • numOutputs: bigint

      The number of outputs

    • numWitnessElements: bigint

      The number of witness elements (e.g., number of control blocks and witnesses)

    • witnessElementSize: bigint

      The average size of each witness element in bytes

    • emptyWitness: bigint

      The amount of empty witnesses

    • OptionaltaprootControlWitnessSize: bigint = 32n

      The size of the control block witness in bytes

    • OptionaltaprootScriptSize: bigint = 139n

      The size of the taproot script in bytes

    Returns bigint

    • The estimated transaction fees