UNPKG

@node-dlc/messaging

Version:
70 lines (69 loc) 2.33 kB
/// <reference types="node" /> import { MessageType } from '../MessageType'; import { IDlcMessage } from './DlcMessage'; import { IOrderOfferJSON, OrderOffer } from './OrderOffer'; export declare abstract class OrderNegotiationFields { static deserialize(buf: Buffer): OrderNegotiationFieldsV0 | OrderNegotiationFieldsV1; abstract type: number; abstract length: bigint; abstract toJSON(): IOrderNegotiationFieldsV0JSON | IOrderNegotiationFieldsV1JSON; abstract serialize(): Buffer; } /** * OrderNegotiationFields V0 contains preferences of the accepter of a order * offer which are taken into account during DLC construction. */ export declare class OrderNegotiationFieldsV0 extends OrderNegotiationFields implements IDlcMessage { static type: MessageType; /** * Deserializes an order_negotiation_fields_v0 message * @param buf */ static deserialize(buf: Buffer): OrderNegotiationFieldsV0; /** * The type for order_negotiation_fields_v0 message. order_negotiation_fields_v0 = 65334 */ type: MessageType; length: bigint; /** * Converts order_negotiation_fields_v0 to JSON */ toJSON(): IOrderNegotiationFieldsV0JSON; /** * Serializes the order_negotiation_fields_v0 message into a Buffer */ serialize(): Buffer; } /** * OrderNegotiationFields V1 contains preferences of the acceptor of a order * offer which are taken into account during DLC construction. */ export declare class OrderNegotiationFieldsV1 extends OrderNegotiationFields implements IDlcMessage { static type: MessageType; /** * Deserializes an order_negotiation_fields_v1 message * @param buf */ static deserialize(buf: Buffer): OrderNegotiationFieldsV1; /** * The type for order_negotiation_fields_v1 message. order_negotiation_fields_v1 = 65336 */ type: MessageType; length: bigint; orderOffer: OrderOffer; /** * Converts order_negotiation_fields_v1 to JSON */ toJSON(): IOrderNegotiationFieldsV1JSON; /** * Serializes the order_negotiation_fields_v1 message into a Buffer */ serialize(): Buffer; } export interface IOrderNegotiationFieldsV0JSON { type: number; } export interface IOrderNegotiationFieldsV1JSON { type: number; orderOffer: IOrderOfferJSON; }