+ /**
+ * The chains that may be used when paying a requested invoice (e.g., bitcoin mainnet).
+ * Payments must be denominated in units of the minimal lightning-payable unit (e.g., msats)
+ * for the selected chain.
+ */
+ public chains(): Uint8Array[] {
+ const ret: number = bindings.InvoiceRequest_chains(this.ptr);
+ const ret_conv_12_len: number = bindings.getArrayLength(ret);
+ const ret_conv_12_arr: Uint8Array[] = new Array(ret_conv_12_len).fill(null);
+ for (var m = 0; m < ret_conv_12_len; m++) {
+ const ret_conv_12: number = bindings.getU32ArrayElem(ret, m);
+ const ret_conv_12_conv: Uint8Array = bindings.decodeUint8Array(ret_conv_12);
+ ret_conv_12_arr[m] = ret_conv_12_conv;
+ }
+ bindings.freeWasmMemory(ret)
+ return ret_conv_12_arr;
+ }
+
+ /**
+ * Opaque bytes set by the originator. Useful for authentication and validating fields since it
+ * is reflected in `invoice_request` messages along with all the other fields from the `offer`.
+ */
+ public metadata(): Option_CVec_u8ZZ {
+ const ret: bigint = bindings.InvoiceRequest_metadata(this.ptr);
+ const ret_hu_conv: Option_CVec_u8ZZ = Option_CVec_u8ZZ.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * The minimum amount required for a successful payment of a single item.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public amount(): Amount {
+ const ret: bigint = bindings.InvoiceRequest_amount(this.ptr);
+ const ret_hu_conv: Amount = new Amount(null, ret);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * A complete description of the purpose of the payment. Intended to be displayed to the user
+ * but with the caveat that it has not been verified in any way.
+ */
+ public description(): PrintableString {
+ const ret: bigint = bindings.InvoiceRequest_description(this.ptr);
+ const ret_hu_conv: PrintableString = new PrintableString(null, ret);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Features pertaining to the offer.
+ */
+ public offer_features(): OfferFeatures {
+ const ret: bigint = bindings.InvoiceRequest_offer_features(this.ptr);
+ const ret_hu_conv: OfferFeatures = new OfferFeatures(null, ret);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Duration since the Unix epoch when an invoice should no longer be requested.
+ *
+ * If `None`, the offer does not expire.
+ */
+ public absolute_expiry(): Option_u64Z {
+ const ret: bigint = bindings.InvoiceRequest_absolute_expiry(this.ptr);
+ const ret_hu_conv: Option_u64Z = Option_u64Z.constr_from_ptr(ret);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * The issuer of the offer, possibly beginning with `user@domain` or `domain`. Intended to be
+ * displayed to the user but with the caveat that it has not been verified in any way.
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public issuer(): PrintableString {
+ const ret: bigint = bindings.InvoiceRequest_issuer(this.ptr);
+ const ret_hu_conv: PrintableString = new PrintableString(null, ret);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * Paths to the recipient originating from publicly reachable nodes. Blinded paths provide
+ * recipient privacy by obfuscating its node id.
+ */
+ public paths(): BlindedPath[] {
+ const ret: number = bindings.InvoiceRequest_paths(this.ptr);
+ const ret_conv_13_len: number = bindings.getArrayLength(ret);
+ const ret_conv_13_arr: BlindedPath[] = new Array(ret_conv_13_len).fill(null);
+ for (var n = 0; n < ret_conv_13_len; n++) {
+ const ret_conv_13: bigint = bindings.getU64ArrayElem(ret, n);
+ const ret_conv_13_hu_conv: BlindedPath = new BlindedPath(null, ret_conv_13);
+ CommonBase.add_ref_from(ret_conv_13_hu_conv, this);
+ ret_conv_13_arr[n] = ret_conv_13_hu_conv;
+ }
+ bindings.freeWasmMemory(ret)
+ return ret_conv_13_arr;
+ }
+
+ /**
+ * The quantity of items supported.
+ */
+ public supported_quantity(): Quantity {
+ const ret: bigint = bindings.InvoiceRequest_supported_quantity(this.ptr);
+ const ret_hu_conv: Quantity = new Quantity(null, ret);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * The public key used by the recipient to sign invoices.
+ */
+ public signing_pubkey(): Uint8Array {
+ const ret: number = bindings.InvoiceRequest_signing_pubkey(this.ptr);
+ const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
+ return ret_conv;
+ }
+