UNPKG

@btc-vision/transaction

Version:

OPNet transaction library allows you to create and sign transactions for the OPNet network.

51 lines 2.08 kB
import { TransactionType } from '../enums/TransactionType.js'; import { P2TRPayment, Psbt, PsbtInput, Taptree } from '../../../node_modules/@btc-vision/bitcoin/browser/index.js'; import { TransactionBuilder } from './TransactionBuilder.js'; import { TapPayment } from '../shared/TweakedTransaction.js'; import { TapLeafScript } from '../interfaces/Tap.js'; import { ICancelTransactionParameters } from '../interfaces/ICancelTransactionParameters.js'; export declare class CancelTransaction extends TransactionBuilder<TransactionType.CANCEL> { type: TransactionType.CANCEL; /** * The tap leaf script for spending */ protected tapLeafScript: TapLeafScript | null; protected readonly compiledTargetScript: Uint8Array; protected readonly scriptTree: Taptree; protected readonly contractSecret: Uint8Array; protected leftOverFundsScriptRedeem: P2TRPayment | null; constructor(parameters: ICancelTransactionParameters); protected buildTransaction(): Promise<void>; /** * Sign the inputs * @param {Psbt} transaction The transaction to sign * @protected */ /** * Generate the script address (for verification purposes) */ protected generateScriptAddress(): TapPayment; /** * Generate the tap data for spending */ protected generateTapData(): TapPayment; /** * Custom finalizer for the tap script spend */ protected customFinalizer: (_inputIndex: number, input: PsbtInput) => { finalScriptWitness: Uint8Array<ArrayBufferLike>; }; protected signInputs(transaction: Psbt): Promise<void>; protected signInputsWalletBased(transaction: Psbt): Promise<void>; protected signInputsNonWalletBased(transaction: Psbt): Promise<void>; /** * Generate the minimal script tree needed for recovery * This only includes the leftover funds script */ private getMinimalScriptTree; /** * Generate the leftover funds redeem script */ private generateLeftoverFundsRedeem; } //# sourceMappingURL=CancelTransaction.d.ts.map