+ /**
+ * Duration since the Unix epoch when an invoice should no longer be requested.
+ *
+ * From [`Offer::absolute_expiry`] or [`Refund::absolute_expiry`].
+ *
+ * [`Offer::absolute_expiry`]: crate::offers::offer::Offer::absolute_expiry
+ */
+ public absolute_expiry(): Option_u64Z {
+ const ret: bigint = bindings.Bolt12Invoice_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 or refund.
+ *
+ * From [`Offer::issuer`] or [`Refund::issuer`].
+ *
+ * [`Offer::issuer`]: crate::offers::offer::Offer::issuer
+ *
+ * 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.Bolt12Invoice_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.
+ *
+ * From [`Offer::paths`] or [`Refund::paths`].
+ *
+ * [`Offer::paths`]: crate::offers::offer::Offer::paths
+ */
+ public message_paths(): BlindedPath[] {
+ const ret: number = bindings.Bolt12Invoice_message_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.
+ *
+ * From [`Offer::supported_quantity`]; `None` if the invoice was created in response to a
+ * [`Refund`].
+ *
+ * [`Offer::supported_quantity`]: crate::offers::offer::Offer::supported_quantity
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public supported_quantity(): Quantity {
+ const ret: bigint = bindings.Bolt12Invoice_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;
+ }
+
+ /**
+ * An unpredictable series of bytes from the payer.
+ *
+ * From [`InvoiceRequest::payer_metadata`] or [`Refund::payer_metadata`].
+ */
+ public payer_metadata(): Uint8Array {
+ const ret: number = bindings.Bolt12Invoice_payer_metadata(this.ptr);
+ const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ /**
+ * Features pertaining to requesting an invoice.
+ *
+ * From [`InvoiceRequest::invoice_request_features`] or [`Refund::features`].
+ */
+ public invoice_request_features(): InvoiceRequestFeatures {
+ const ret: bigint = bindings.Bolt12Invoice_invoice_request_features(this.ptr);
+ const ret_hu_conv: InvoiceRequestFeatures = new InvoiceRequestFeatures(null, ret);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ return ret_hu_conv;
+ }
+
+ /**
+ * The quantity of items requested or refunded for.
+ *
+ * From [`InvoiceRequest::quantity`] or [`Refund::quantity`].
+ */
+ public quantity(): Option_u64Z {
+ const ret: bigint = bindings.Bolt12Invoice_quantity(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;
+ }
+
+ /**
+ * A possibly transient pubkey used to sign the invoice request or to send an invoice for a
+ * refund in case there are no [`message_paths`].
+ *
+ * [`message_paths`]: Self::message_paths
+ */
+ public payer_id(): Uint8Array {
+ const ret: number = bindings.Bolt12Invoice_payer_id(this.ptr);
+ const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ /**
+ * A payer-provided note reflected back in the invoice.
+ *
+ * From [`InvoiceRequest::payer_note`] or [`Refund::payer_note`].
+ *
+ * Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
+ */
+ public payer_note(): PrintableString {
+ const ret: bigint = bindings.Bolt12Invoice_payer_note(this.ptr);
+ const ret_hu_conv: PrintableString = new PrintableString(null, ret);
+ CommonBase.add_ref_from(ret_hu_conv, this);
+ return ret_hu_conv;
+ }
+