ForkedTxAssembler class

TxAssembler subclass for SIGHASH_FORKID chains (BCH / BSV).

Reuses the parent's signing/attachment flow (TxAssembler.build / TxAssembler.buildAsync) and only swaps in the fork-id sighash algorithm. Like the parent, it now attaches the produced signatures and returns a transaction with complete == true.

Inheritance

Constructors

ForkedTxAssembler({required ChainParams chainParams, required List<AssemblerInput> inputs, required List<TxOutput> outputs, int version = Tx.currentVersion, int locktime = 0, TxOrdering ordering = TxOrdering.bip69, int forkId = 0})

Properties

chainParams ChainParams
finalinherited
forkId int
Fork-id value embedded in the upper 24 bits of the sighash type word.
final
hashCode int
The hash code for this object.
no setterinherited
inputs List<AssemblerInput>
finalinherited
locktime int
finalinherited
ordering TxOrdering
finalinherited
outputs List<TxOutput>
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version int
finalinherited

Methods

build(SignerCallback signer) Tx
Builds and signs the transaction synchronously.
inherited
buildAsync(AsyncSignerCallback signer) Future<Tx>
Async variant of build for hardware wallets / remote signers.
inherited
buildSignedInput(AssemblerInput meta, Uint8List derSig) TxInput
Builds the concrete signed TxInput for meta from the DER signature bytes returned by the signer (no sighash flag appended yet).
inherited
compareBytes(Uint8List a, Uint8List b) int
inherited
computeDigest(Tx tx, int index, AssemblerInput meta) Uint8List
Computes the sighash digest for the input, choosing the algorithm and - for segwit - the BIP-143 scriptCode based on AssemblerInput.type.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
orderedInputs() List<AssemblerInput>
inherited
orderedOutputs() List<TxOutput>
inherited
p2wpkhScriptCode(AssemblerInput meta) Uint8List
BIP-143 scriptCode for P2WPKH / nested P2WPKH: OP_DUP OP_HASH160 <20-byte keyhash> OP_EQUALVERIFY OP_CHECKSIG.
inherited
toString() String
A string representation of this object.
inherited
unsignedTx(List<AssemblerInput> ins, List<TxOutput> outs) Tx
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited