UNPKG

lightningdevkit

Version:
78 lines (77 loc) 2.74 kB
import { BlindedPaymentPath } from '../structs/BlindedPaymentPath.mjs'; import { RouteHint } from '../structs/RouteHint.mjs'; import { Bolt11InvoiceFeatures } from '../structs/Bolt11InvoiceFeatures.mjs'; import { Bolt12InvoiceFeatures } from '../structs/Bolt12InvoiceFeatures.mjs'; import { CommonBase } from './CommonBase.mjs'; /** * The recipient of a payment, differing based on whether they've hidden their identity with route * blinding. */ export declare class Payee extends CommonBase { protected constructor(_dummy: null, ptr: bigint); clone_ptr(): bigint; /** * Creates a copy of the Payee */ clone(): Payee; /** * Utility method to constructs a new Blinded-variant Payee */ static constructor_blinded(route_hints: BlindedPaymentPath[], features: Bolt12InvoiceFeatures): Payee; /** * Utility method to constructs a new Clear-variant Payee */ static constructor_clear(node_id: Uint8Array, route_hints: RouteHint[], features: Bolt11InvoiceFeatures, final_cltv_expiry_delta: number): Payee; /** * Generates a non-cryptographic 64-bit hash of the Payee. */ hash(): bigint; /** * Checks if two Payees contain equal inner contents. * This ignores pointers and is_owned flags and looks at the values in fields. */ eq(b: Payee): boolean; } /** A Payee of type Blinded */ export declare class Payee_Blinded extends Payee { /** * Aggregated routing info and blinded paths, for routing to the payee without knowing their * node id. */ route_hints: BlindedPaymentPath[]; /** * Features supported by the payee. * * May be set from the payee's invoice. May be `None` if the invoice does not contain any * features. * * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None */ features: Bolt12InvoiceFeatures; } /** A Payee of type Clear */ export declare class Payee_Clear extends Payee { /** * The node id of the payee. */ node_id: Uint8Array; /** * Hints for routing to the payee, containing channels connecting the payee to public nodes. */ route_hints: RouteHint[]; /** * Features supported by the payee. * * May be set from the payee's invoice or via [`for_keysend`]. May be `None` if the invoice * does not contain any features. * * [`for_keysend`]: PaymentParameters::for_keysend * * Note that this (or a relevant inner pointer) may be NULL or all-0s to represent None */ features: Bolt11InvoiceFeatures; /** * The minimum CLTV delta at the end of the route. This value must not be zero. */ final_cltv_expiry_delta: number; }