lightningdevkit
Version:
Lightning Development Kit
56 lines (55 loc) • 2.38 kB
text/typescript
import { Result_FinalOnionHopDataDecodeErrorZ } from '../structs/Result_FinalOnionHopDataDecodeErrorZ.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* Information communicated in the onion to the recipient for multi-part tracking and proof that
* the payment is associated with an invoice.
*/
export declare class FinalOnionHopData extends CommonBase {
/**
* When sending a multi-part payment, this secret is used to identify a payment across HTLCs.
* Because it is generated by the recipient and included in the invoice, it also provides
* proof to the recipient that the payment was sent by someone with the generated invoice.
*/
get_payment_secret(): Uint8Array;
/**
* When sending a multi-part payment, this secret is used to identify a payment across HTLCs.
* Because it is generated by the recipient and included in the invoice, it also provides
* proof to the recipient that the payment was sent by someone with the generated invoice.
*/
set_payment_secret(val: Uint8Array): void;
/**
* The intended total amount that this payment is for.
*
* Message serialization may panic if this value is more than 21 million Bitcoin.
*/
get_total_msat(): bigint;
/**
* The intended total amount that this payment is for.
*
* Message serialization may panic if this value is more than 21 million Bitcoin.
*/
set_total_msat(val: bigint): void;
/**
* Constructs a new FinalOnionHopData given each field
*/
static constructor_new(payment_secret_arg: Uint8Array, total_msat_arg: bigint): FinalOnionHopData;
clone_ptr(): bigint;
/**
* Creates a copy of the FinalOnionHopData
*/
clone(): FinalOnionHopData;
/**
* Checks if two FinalOnionHopDatas 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: FinalOnionHopData): boolean;
/**
* Serialize the FinalOnionHopData object into a byte array which can be read by FinalOnionHopData_read
*/
write(): Uint8Array;
/**
* Read a FinalOnionHopData from a byte array, created by FinalOnionHopData_write
*/
static constructor_read(ser: Uint8Array): Result_FinalOnionHopDataDecodeErrorZ;
}