UNPKG

@btc-vision/transaction

Version:

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

14 lines (13 loc) 787 B
import { Network } from '@btc-vision/bitcoin'; import { Feature, Features } from '../Features.js'; import { Generator } from '../Generator.js'; import { ChallengeSolution } from '../../epoch/ChallengeSolution.js'; export declare class P2WDAGenerator extends Generator { private static readonly P2WDA_VERSION; constructor(senderPubKey: Buffer, contractSaltPubKey: Buffer, network?: Network); static validateWitnessSize(dataSize: number, maxWitnessFields?: number, maxBytesPerWitness?: number): boolean; compile(calldata: Buffer, contractSecret: Buffer, challenge: ChallengeSolution, maxPriority: bigint, features?: Feature<Features>[]): Buffer; getHeader(maxPriority: bigint, features?: Features[]): Buffer; private writeFeatures; private encodeFeatureData; }