lightningdevkit
Version:
Lightning Development Kit
81 lines (80 loc) • 3.65 kB
text/typescript
import { Option_u64Z } from '../structs/Option_u64Z.mjs';
import { HumanReadableName } from '../structs/HumanReadableName.mjs';
import { UntrustedString } from '../structs/UntrustedString.mjs';
import { Result_InvoiceRequestFieldsDecodeErrorZ } from '../structs/Result_InvoiceRequestFieldsDecodeErrorZ.mjs';
import { CommonBase } from './CommonBase.mjs';
/**
* Fields sent in an [`InvoiceRequest`] message to include in [`PaymentContext::Bolt12Offer`].
*
* [`PaymentContext::Bolt12Offer`]: crate::blinded_path::payment::PaymentContext::Bolt12Offer
*/
export declare class InvoiceRequestFields extends CommonBase {
/**
* A possibly transient pubkey used to sign the invoice request.
*/
get_payer_signing_pubkey(): Uint8Array;
/**
* A possibly transient pubkey used to sign the invoice request.
*/
set_payer_signing_pubkey(val: Uint8Array): void;
/**
* The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
*/
get_quantity(): Option_u64Z;
/**
* The quantity of the offer's item conforming to [`Offer::is_valid_quantity`].
*/
set_quantity(val: Option_u64Z): void;
/**
* A payer-provided note which will be seen by the recipient and reflected back in the invoice
* response. Truncated to [`PAYER_NOTE_LIMIT`] characters.
*
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
get_payer_note_truncated(): UntrustedString;
/**
* A payer-provided note which will be seen by the recipient and reflected back in the invoice
* response. Truncated to [`PAYER_NOTE_LIMIT`] characters.
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
set_payer_note_truncated(val: UntrustedString | null): void;
/**
* The Human Readable Name which the sender indicated they were paying to.
*
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
get_human_readable_name(): HumanReadableName;
/**
* The Human Readable Name which the sender indicated they were paying to.
*
* Note that val (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
set_human_readable_name(val: HumanReadableName | null): void;
/**
* Constructs a new InvoiceRequestFields given each field
*
* Note that payer_note_truncated_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
* Note that human_readable_name_arg (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
static constructor_new(payer_signing_pubkey_arg: Uint8Array, quantity_arg: Option_u64Z, payer_note_truncated_arg: UntrustedString | null, human_readable_name_arg: HumanReadableName | null): InvoiceRequestFields;
clone_ptr(): bigint;
/**
* Creates a copy of the InvoiceRequestFields
*/
clone(): InvoiceRequestFields;
/**
* Checks if two InvoiceRequestFieldss 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: InvoiceRequestFields): boolean;
/**
* Serialize the InvoiceRequestFields object into a byte array which can be read by InvoiceRequestFields_read
*/
write(): Uint8Array;
/**
* Read a InvoiceRequestFields from a byte array, created by InvoiceRequestFields_write
*/
static constructor_read(ser: Uint8Array): Result_InvoiceRequestFieldsDecodeErrorZ;
}