@btc-vision/transaction
Version:
OPNet transaction library allows you to create and sign transactions for the OPNet network.
78 lines • 2.78 kB
TypeScript
import { type Signer } from '@btc-vision/bitcoin';
import { type UniversalSigner } from '@btc-vision/ecpair';
import type { QuantumBIP32Interface } from '@btc-vision/bip32';
import type { SignerMap } from '../../signer/AddressRotation.js';
import { TransactionType } from '../enums/TransactionType.js';
import { TransactionBuilder } from '../builders/TransactionBuilder.js';
import type { ISerializableTransactionState } from './interfaces/ISerializableState.js';
/**
* Options for reconstructing a transaction from serialized state
*/
export interface ReconstructionOptions {
/** Primary signer (used for normal mode or as default in rotation mode) */
signer: Signer | UniversalSigner;
/** Optional: Override fee rate for fee bumping */
newFeeRate?: number;
/** Optional: Override priority fee */
newPriorityFee?: bigint;
/** Optional: Override gas sat fee */
newGasSatFee?: bigint;
/** Signer map for address rotation mode (keyed by address) */
signerMap?: SignerMap;
/** MLDSA signer (for quantum-resistant features) */
mldsaSigner?: QuantumBIP32Interface | null;
}
/**
* Reconstructs transaction builders from serialized state.
* Supports fee bumping by allowing parameter overrides during reconstruction.
*/
export declare class TransactionReconstructor {
/**
* Reconstruct and optionally rebuild transaction with new parameters
* @param state - Serialized transaction state
* @param options - Signer(s) and optional fee overrides
* @returns Reconstructed transaction builder ready for signing
*/
static reconstruct(state: ISerializableTransactionState, options: ReconstructionOptions): TransactionBuilder<TransactionType>;
/**
* Reconstruct a FundingTransaction
*/
private static reconstructFunding;
/**
* Reconstruct a DeploymentTransaction
*/
private static reconstructDeployment;
/**
* Reconstruct an InteractionTransaction
*/
private static reconstructInteraction;
/**
* Reconstruct a MultiSignTransaction
*/
private static reconstructMultiSig;
/**
* Reconstruct a CustomScriptTransaction
*/
private static reconstructCustomScript;
/**
* Reconstruct a CancelTransaction
*/
private static reconstructCancel;
/**
* Build address rotation config from options
*/
private static buildAddressRotationConfig;
/**
* Deserialize UTXOs from serialized format
*/
private static deserializeUTXOs;
/**
* Deserialize outputs from serialized format
*/
private static deserializeOutputs;
/**
* Convert network name to Network object
*/
private static nameToNetwork;
}
//# sourceMappingURL=TransactionReconstructor.d.ts.map