UNPKG

@node-lightning/wire

Version:
56 lines (55 loc) 2.16 kB
/// <reference types="node" /> import { MessageType } from "../MessageType"; import { IWireMessage } from "./IWireMessage"; /** * The `funding_created` message is sent by the channel initiator after * the channel has been accepted with `accept_channel`. The channel * initiator includes the outpoint for the funding transaction as well * as their signature for the counter-parties first commitment * transaction. This message provides the channel acceptor the * information they need to sign the initiator's first commitment * transaction in the next message: `funding_signed`. */ export declare class FundingCreatedMessage implements IWireMessage { static type: MessageType; /** * Deserializes an funding_created message * @param buf */ static deserialize(buf: Buffer): FundingCreatedMessage; /** * The type for message. funding_created = 34 */ type: MessageType; /** * A unique and temporary identifier used during the channel creation * process. This value is a placeholder for the channel_id that is * created from the funding transaction that can be used after the * funding_created message creates this transaction and the * counterparty uses the channel_id in the funding_signed message. */ temporaryChannelId: Buffer; /** * Transaction identifier for the funding transaction as represented * as a sha256 hash of the serialized funding transaction. This * value uses internal or natural byte order. Transaction identifiers * often are in RPC or reversed byte order. */ fundingTxId: Buffer; /** * Output index for the transaction which should be between 0 and * 65535 u16 value. */ fundingOutputIndex: number; /** * Signature for the counterpary's first commitment transaction. * This signature allows the counterparty to spend the commitment * using their own signature. The signature must be 64-bytes * representing the 32-byte (r,s) values for an ECDSA signature. */ signature: Buffer; /** * Serializes the message into a Buffer */ serialize(): Buffer; }