lightningdevkit
Version:
Lightning Development Kit
49 lines (48 loc) • 2.24 kB
text/typescript
import { Result_DelayedPaymentBasepointDecodeErrorZ } from '../structs/Result_DelayedPaymentBasepointDecodeErrorZ.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* Base key used in conjunction with a `per_commitment_point` to generate a [`DelayedPaymentKey`].
*
* The delayed payment key is used to pay the commitment state broadcaster their
* non-HTLC-encumbered funds after a delay to give their counterparty a chance to punish if the
* state broadcasted was previously revoked.
*/
export declare class DelayedPaymentBasepoint extends CommonBase {
get_a(): Uint8Array;
set_a(val: Uint8Array): void;
/**
* Constructs a new DelayedPaymentBasepoint given each field
*/
static constructor_new(a_arg: Uint8Array): DelayedPaymentBasepoint;
/**
* Checks if two DelayedPaymentBasepoints 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: DelayedPaymentBasepoint): boolean;
clone_ptr(): bigint;
/**
* Creates a copy of the DelayedPaymentBasepoint
*/
clone(): DelayedPaymentBasepoint;
/**
* Generates a non-cryptographic 64-bit hash of the DelayedPaymentBasepoint.
*/
hash(): bigint;
/**
* Get inner Public Key
*/
to_public_key(): Uint8Array;
/**
* Derives the \"tweak\" used in calculate [`DelayedPaymentKey::from_basepoint`].\n\n[`DelayedPaymentKey::from_basepoint`] calculates a private key as:\n`privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)`\n\nThis calculates the hash part in the tweak derivation process, which is used to\nensure that each key is unique and cannot be guessed by an external party.
*/
derive_add_tweak(per_commitment_point: Uint8Array): Uint8Array;
/**
* Serialize the DelayedPaymentBasepoint object into a byte array which can be read by DelayedPaymentBasepoint_read
*/
write(): Uint8Array;
/**
* Read a DelayedPaymentBasepoint from a byte array, created by DelayedPaymentBasepoint_write
*/
static constructor_read(ser: Uint8Array): Result_DelayedPaymentBasepointDecodeErrorZ;
}