UNPKG

@node-dlc/messaging

Version:
39 lines (38 loc) 987 B
/// <reference types="node" /> import { OutPoint } from '@node-lightning/bitcoin'; import { MessageType } from '../MessageType'; import { IDlcMessage } from './DlcMessage'; export declare class CloseTLV implements IDlcMessage { static type: MessageType; /** * Deserializes a close_tlv message * @param buf */ static deserialize(buf: Buffer): CloseTLV; type: MessageType; length: bigint; contractId: Buffer; offerPayoutSatoshis: bigint; offerFundingPubKey: Buffer; acceptFundingPubkey: Buffer; outpoint: OutPoint; /** * Converts close_tlv to JSON */ toJSON(): ICloseTLVJSON; /** * Serializes the close_tlv message into a Buffer */ serialize(): Buffer; } export interface ICloseTLVJSON { type: number; contractId: string; offerPayoutSatoshis: number; offerFundingPubKey: string; acceptFundingPubkey: string; outpoint: { txid: string; index: number; }; }