UNPKG

@node-dlc/core

Version:
41 lines (40 loc) 1.89 kB
/// <reference types="node" /> import { FundingInput } from '@node-dlc/messaging'; export declare class DualFundingTxFinalizer { readonly offerInputs: FundingInput[]; readonly offerPayoutSPK: Buffer; readonly offerChangeSPK: Buffer; readonly acceptInputs: FundingInput[]; readonly acceptPayoutSPK: Buffer; readonly acceptChangeSPK: Buffer; readonly feeRate: bigint; readonly numContracts: number; constructor(offerInputs: FundingInput[], offerPayoutSPK: Buffer, offerChangeSPK: Buffer, acceptInputs: FundingInput[], acceptPayoutSPK: Buffer, acceptChangeSPK: Buffer, feeRate: bigint, numContracts?: number); private computeFees; private getOfferFees; private getAcceptFees; get offerFees(): bigint; get offerFutureFee(): bigint; get offerFundingFee(): bigint; get acceptFees(): bigint; get acceptFutureFee(): bigint; get acceptFundingFee(): bigint; } export declare class DualClosingTxFinalizer { readonly initiatorInputs: FundingInput[]; readonly offerPayoutSPK: Buffer; readonly acceptPayoutSPK: Buffer; readonly feeRate: bigint; constructor(initiatorInputs: FundingInput[], offerPayoutSPK: Buffer, acceptPayoutSPK: Buffer, feeRate: bigint); private computeFees; private getOfferInitiatorFees; private getOfferReciprocatorFees; private getAcceptInitiatorFees; private getAcceptReciprocatorFees; get offerInitiatorFees(): bigint; get offerReciprocatorFees(): bigint; get acceptInitiatorFees(): bigint; get acceptReciprocatorFees(): bigint; } export declare const getFinalizer: (feeRate: bigint, offerInputs?: FundingInput[], acceptInputs?: FundingInput[], numContracts?: number) => DualFundingTxFinalizer; export declare const getFinalizerByCount: (feeRate: bigint, numOfferInputs: number, numAcceptInputs: number, numContracts: number) => DualFundingTxFinalizer;