UNPKG

lightningdevkit

Version:
96 lines (95 loc) 4.6 kB
import { Result_ChannelPublicKeysDecodeErrorZ } from '../structs/Result_ChannelPublicKeysDecodeErrorZ.mjs'; import { DelayedPaymentBasepoint } from '../structs/DelayedPaymentBasepoint.mjs'; import { HtlcBasepoint } from '../structs/HtlcBasepoint.mjs'; import { RevocationBasepoint } from '../structs/RevocationBasepoint.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * One counterparty's public keys which do not change over the life of a channel. */ export declare class ChannelPublicKeys extends CommonBase { /** * The public key which is used to sign all commitment transactions, as it appears in the * on-chain channel lock-in 2-of-2 multisig output. */ get_funding_pubkey(): Uint8Array; /** * The public key which is used to sign all commitment transactions, as it appears in the * on-chain channel lock-in 2-of-2 multisig output. */ set_funding_pubkey(val: Uint8Array): void; /** * The base point which is used (with [`RevocationKey::from_basepoint`]) to derive per-commitment * revocation keys. This is combined with the per-commitment-secret generated by the * counterparty to create a secret which the counterparty can reveal to revoke previous * states. */ get_revocation_basepoint(): RevocationBasepoint; /** * The base point which is used (with [`RevocationKey::from_basepoint`]) to derive per-commitment * revocation keys. This is combined with the per-commitment-secret generated by the * counterparty to create a secret which the counterparty can reveal to revoke previous * states. */ set_revocation_basepoint(val: RevocationBasepoint): void; /** * The public key on which the non-broadcaster (ie the countersignatory) receives an immediately * spendable primary channel balance on the broadcaster's commitment transaction. This key is * static across every commitment transaction. */ get_payment_point(): Uint8Array; /** * The public key on which the non-broadcaster (ie the countersignatory) receives an immediately * spendable primary channel balance on the broadcaster's commitment transaction. This key is * static across every commitment transaction. */ set_payment_point(val: Uint8Array): void; /** * The base point which is used (with derive_public_key) to derive a per-commitment payment * public key which receives non-HTLC-encumbered funds which are only available for spending * after some delay (or can be claimed via the revocation path). */ get_delayed_payment_basepoint(): DelayedPaymentBasepoint; /** * The base point which is used (with derive_public_key) to derive a per-commitment payment * public key which receives non-HTLC-encumbered funds which are only available for spending * after some delay (or can be claimed via the revocation path). */ set_delayed_payment_basepoint(val: DelayedPaymentBasepoint): void; /** * The base point which is used (with derive_public_key) to derive a per-commitment public key * which is used to encumber HTLC-in-flight outputs. */ get_htlc_basepoint(): HtlcBasepoint; /** * The base point which is used (with derive_public_key) to derive a per-commitment public key * which is used to encumber HTLC-in-flight outputs. */ set_htlc_basepoint(val: HtlcBasepoint): void; /** * Constructs a new ChannelPublicKeys given each field */ static constructor_new(funding_pubkey_arg: Uint8Array, revocation_basepoint_arg: RevocationBasepoint, payment_point_arg: Uint8Array, delayed_payment_basepoint_arg: DelayedPaymentBasepoint, htlc_basepoint_arg: HtlcBasepoint): ChannelPublicKeys; clone_ptr(): bigint; /** * Creates a copy of the ChannelPublicKeys */ clone(): ChannelPublicKeys; /** * Generates a non-cryptographic 64-bit hash of the ChannelPublicKeys. */ hash(): bigint; /** * Checks if two ChannelPublicKeyss contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. * Two objects with NULL inner values will be considered "equal" here. */ eq(b: ChannelPublicKeys): boolean; /** * Serialize the ChannelPublicKeys object into a byte array which can be read by ChannelPublicKeys_read */ write(): Uint8Array; /** * Read a ChannelPublicKeys from a byte array, created by ChannelPublicKeys_write */ static constructor_read(ser: Uint8Array): Result_ChannelPublicKeysDecodeErrorZ; }