@node-dlc/messaging
Version:
DLC Messaging Protocol
45 lines (44 loc) • 1.32 kB
TypeScript
/// <reference types="node" />
import { Tx } from '@node-dlc/bitcoin';
import { DlcAcceptV0, DlcOfferV0, DlcTransactionsV0 } from '..';
/**
* DlcClose Metadata object contains information required for verifying DlcClose
* message.
*/
export declare class DlcCloseMetadata {
/**
* Convert JSON to DlcCloseMetadata
* @param json
*/
static fromJSON(json: IDlcCloseMetadataJSON): DlcCloseMetadata;
static fromDlcMessages(dlcOffer: DlcOfferV0, dlcAccept: DlcAcceptV0, dlcTxs: DlcTransactionsV0): DlcCloseMetadata;
offerFundingPubKey: Buffer;
acceptFundingPubKey: Buffer;
offerPayoutSPK: Buffer;
acceptPayoutSPK: Buffer;
offerPayoutSerialId: bigint;
acceptPayoutSerialId: bigint;
feeRatePerVb: bigint;
fundTx: Tx;
fundTxVout: number;
/**
* Converts dlc_close_metadata to JSON
*/
toJSON(): IDlcCloseMetadataJSON;
toDlcMessages(): {
dlcOffer: DlcOfferV0;
dlcAccept: DlcAcceptV0;
dlcTxs: DlcTransactionsV0;
};
}
export interface IDlcCloseMetadataJSON {
offerFundingPubKey: string;
acceptFundingPubKey: string;
offerPayoutSPK: string;
acceptPayoutSPK: string;
offerPayoutSerialId: number;
acceptPayoutSerialId: number;
feeRatePerVb: number;
fundTx: string;
fundTxVout: number;
}