import { ClosureReason } from '../structs/ClosureReason.mjs';
import { Option_ClosureReasonZ } from '../structs/Option_ClosureReasonZ.mjs';
import { Result_COption_ClosureReasonZDecodeErrorZ } from '../structs/Result_COption_ClosureReasonZDecodeErrorZ.mjs';
+import { HTLCDestination } from '../structs/HTLCDestination.mjs';
+import { Option_HTLCDestinationZ } from '../structs/Option_HTLCDestinationZ.mjs';
+import { Result_COption_HTLCDestinationZDecodeErrorZ } from '../structs/Result_COption_HTLCDestinationZDecodeErrorZ.mjs';
import { ChannelUpdate } from '../structs/ChannelUpdate.mjs';
import { NetworkUpdate } from '../structs/NetworkUpdate.mjs';
import { Option_NetworkUpdateZ } from '../structs/Option_NetworkUpdateZ.mjs';
import { Result_NoneChannelMonitorUpdateErrZ } from '../structs/Result_NoneChannelMonitorUpdateErrZ.mjs';
import { HTLCUpdate } from '../structs/HTLCUpdate.mjs';
import { MonitorEvent } from '../structs/MonitorEvent.mjs';
-import { TwoTuple_OutPointCVec_MonitorEventZZ } from '../structs/TwoTuple_OutPointCVec_MonitorEventZZ.mjs';
+import { ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ } from '../structs/ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ.mjs';
import { Option_C2Tuple_usizeTransactionZZ } from '../structs/Option_C2Tuple_usizeTransactionZZ.mjs';
import { FixedPenaltyScorer } from '../structs/FixedPenaltyScorer.mjs';
import { Result_FixedPenaltyScorerDecodeErrorZ } from '../structs/Result_FixedPenaltyScorerDecodeErrorZ.mjs';
import { Result_ChannelInfoDecodeErrorZ } from '../structs/Result_ChannelInfoDecodeErrorZ.mjs';
import { RoutingFees } from '../structs/RoutingFees.mjs';
import { Result_RoutingFeesDecodeErrorZ } from '../structs/Result_RoutingFeesDecodeErrorZ.mjs';
+import { Hostname } from '../structs/Hostname.mjs';
import { NetAddress } from '../structs/NetAddress.mjs';
import { NodeAnnouncementInfo } from '../structs/NodeAnnouncementInfo.mjs';
import { Result_NodeAnnouncementInfoDecodeErrorZ } from '../structs/Result_NodeAnnouncementInfoDecodeErrorZ.mjs';
*/
export class RawInvoice extends CommonBase {
/* @internal */
- public constructor(_dummy: object, ptr: number) {
+ public constructor(_dummy: object, ptr: bigint) {
super(ptr, bindings.RawInvoice_free);
}
* data part
*/
public get_data(): RawDataPart {
- const ret: number = bindings.RawInvoice_get_data(this.ptr);
+ const ret: bigint = bindings.RawInvoice_get_data(this.ptr);
const ret_hu_conv: RawDataPart = new RawDataPart(null, ret);
CommonBase.add_ref_from(ret_hu_conv, this);
return ret_hu_conv;
* data part
*/
public set_data(val: RawDataPart): void {
- bindings.RawInvoice_set_data(this.ptr, val == null ? 0 : CommonBase.get_ptr_of(val) & ~1);
+ bindings.RawInvoice_set_data(this.ptr, val == null ? 0n : CommonBase.get_ptr_of(val));
+ CommonBase.add_ref_from(this, val);
}
/**
* Two objects with NULL inner values will be considered "equal" here.
*/
public eq(b: RawInvoice): boolean {
- const ret: boolean = bindings.RawInvoice_eq(this.ptr, b == null ? 0 : CommonBase.get_ptr_of(b) & ~1);
+ const ret: boolean = bindings.RawInvoice_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b));
CommonBase.add_ref_from(this, b);
return ret;
}
- public clone_ptr(): number {
- const ret: number = bindings.RawInvoice_clone_ptr(this.ptr);
+ public clone_ptr(): bigint {
+ const ret: bigint = bindings.RawInvoice_clone_ptr(this.ptr);
return ret;
}
* Creates a copy of the RawInvoice
*/
public clone(): RawInvoice {
- const ret: number = bindings.RawInvoice_clone(this.ptr);
+ const ret: bigint = bindings.RawInvoice_clone(this.ptr);
const ret_hu_conv: RawInvoice = new RawInvoice(null, ret);
CommonBase.add_ref_from(ret_hu_conv, this);
return ret_hu_conv;
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public payment_hash(): Sha256 {
- const ret: number = bindings.RawInvoice_payment_hash(this.ptr);
+ const ret: bigint = bindings.RawInvoice_payment_hash(this.ptr);
const ret_hu_conv: Sha256 = new Sha256(null, ret);
CommonBase.add_ref_from(ret_hu_conv, this);
return ret_hu_conv;
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public description(): Description {
- const ret: number = bindings.RawInvoice_description(this.ptr);
+ const ret: bigint = bindings.RawInvoice_description(this.ptr);
const ret_hu_conv: Description = new Description(null, ret);
CommonBase.add_ref_from(ret_hu_conv, this);
return ret_hu_conv;
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public payee_pub_key(): PayeePubKey {
- const ret: number = bindings.RawInvoice_payee_pub_key(this.ptr);
+ const ret: bigint = bindings.RawInvoice_payee_pub_key(this.ptr);
const ret_hu_conv: PayeePubKey = new PayeePubKey(null, ret);
CommonBase.add_ref_from(ret_hu_conv, this);
return ret_hu_conv;
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public description_hash(): Sha256 {
- const ret: number = bindings.RawInvoice_description_hash(this.ptr);
+ const ret: bigint = bindings.RawInvoice_description_hash(this.ptr);
const ret_hu_conv: Sha256 = new Sha256(null, ret);
CommonBase.add_ref_from(ret_hu_conv, this);
return ret_hu_conv;
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public expiry_time(): ExpiryTime {
- const ret: number = bindings.RawInvoice_expiry_time(this.ptr);
+ const ret: bigint = bindings.RawInvoice_expiry_time(this.ptr);
const ret_hu_conv: ExpiryTime = new ExpiryTime(null, ret);
CommonBase.add_ref_from(ret_hu_conv, this);
return ret_hu_conv;
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public min_final_cltv_expiry(): MinFinalCltvExpiry {
- const ret: number = bindings.RawInvoice_min_final_cltv_expiry(this.ptr);
+ const ret: bigint = bindings.RawInvoice_min_final_cltv_expiry(this.ptr);
const ret_hu_conv: MinFinalCltvExpiry = new MinFinalCltvExpiry(null, ret);
CommonBase.add_ref_from(ret_hu_conv, this);
return ret_hu_conv;
* Note that the return value (or a relevant inner pointer) may be NULL or all-0s to represent None
*/
public features(): InvoiceFeatures {
- const ret: number = bindings.RawInvoice_features(this.ptr);
+ const ret: bigint = bindings.RawInvoice_features(this.ptr);
const ret_hu_conv: InvoiceFeatures = new InvoiceFeatures(null, ret);
CommonBase.add_ref_from(ret_hu_conv, this);
return ret_hu_conv;
const ret_conv_14_len: number = bindings.getArrayLength(ret);
const ret_conv_14_arr: PrivateRoute[] = new Array(ret_conv_14_len).fill(null);
for (var o = 0; o < ret_conv_14_len; o++) {
- const ret_conv_14: number = bindings.getU32ArrayElem(ret, o);
+ const ret_conv_14: bigint = bindings.getU64ArrayElem(ret, o);
const ret_conv_14_hu_conv: PrivateRoute = new PrivateRoute(null, ret_conv_14);
CommonBase.add_ref_from(ret_conv_14_hu_conv, this);
ret_conv_14_arr[o] = ret_conv_14_hu_conv;
}
public amount_pico_btc(): Option_u64Z {
- const ret: number = bindings.RawInvoice_amount_pico_btc(this.ptr);
+ const ret: bigint = bindings.RawInvoice_amount_pico_btc(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;