X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FPaymentSendFailure.mts;h=f293a67a166516aeb202065161ac470f0e72acb8;hb=31a1b84c2ca25db2978865e9ca9573974f79cc79;hp=d91e4516a8ef1647f816c968d72d33e005fbd632;hpb=4713fdb1c6821681d17ecde031b77eb43db1308b;p=ldk-java diff --git a/ts/structs/PaymentSendFailure.mts b/ts/structs/PaymentSendFailure.mts index d91e4516..f293a67a 100644 --- a/ts/structs/PaymentSendFailure.mts +++ b/ts/structs/PaymentSendFailure.mts @@ -67,6 +67,9 @@ import { Result_PaymentPurposeDecodeErrorZ } from '../structs/Result_PaymentPurp 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'; @@ -104,7 +107,7 @@ import { TwoTuple_usizeTransactionZ } from '../structs/TwoTuple_usizeTransaction 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'; @@ -138,6 +141,7 @@ import { ChannelInfo } from '../structs/ChannelInfo.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'; @@ -357,9 +361,9 @@ import * as bindings from '../bindings.mjs' * states for more. */ export class PaymentSendFailure extends CommonBase { - protected constructor(_dummy: object, ptr: number) { super(ptr, bindings.PaymentSendFailure_free); } + protected constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.PaymentSendFailure_free); } /* @internal */ - public static constr_from_ptr(ptr: number): PaymentSendFailure { + public static constr_from_ptr(ptr: bigint): PaymentSendFailure { const raw_ty: number = bindings.LDKPaymentSendFailure_ty_from_ptr(ptr); switch (raw_ty) { case 0: return new PaymentSendFailure_ParameterError(ptr); @@ -371,8 +375,8 @@ export class PaymentSendFailure extends CommonBase { } } - public clone_ptr(): number { - const ret: number = bindings.PaymentSendFailure_clone_ptr(this.ptr); + public clone_ptr(): bigint { + const ret: bigint = bindings.PaymentSendFailure_clone_ptr(this.ptr); return ret; } @@ -380,7 +384,7 @@ export class PaymentSendFailure extends CommonBase { * Creates a copy of the PaymentSendFailure */ public clone(): PaymentSendFailure { - const ret: number = bindings.PaymentSendFailure_clone(this.ptr); + const ret: bigint = bindings.PaymentSendFailure_clone(this.ptr); const ret_hu_conv: PaymentSendFailure = PaymentSendFailure.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; @@ -390,7 +394,7 @@ export class PaymentSendFailure extends CommonBase { * Utility method to constructs a new ParameterError-variant PaymentSendFailure */ public static constructor_parameter_error(a: APIError): PaymentSendFailure { - const ret: number = bindings.PaymentSendFailure_parameter_error(CommonBase.get_ptr_of(a)); + const ret: bigint = bindings.PaymentSendFailure_parameter_error(CommonBase.get_ptr_of(a)); const ret_hu_conv: PaymentSendFailure = PaymentSendFailure.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; @@ -400,7 +404,7 @@ export class PaymentSendFailure extends CommonBase { * Utility method to constructs a new PathParameterError-variant PaymentSendFailure */ public static constructor_path_parameter_error(a: Result_NoneAPIErrorZ[]): PaymentSendFailure { - const ret: number = bindings.PaymentSendFailure_path_parameter_error(bindings.encodeUint32Array(a != null ? a.map(a_conv_22 => a_conv_22 != null ? CommonBase.get_ptr_of(a_conv_22) : 0) : null)); + const ret: bigint = bindings.PaymentSendFailure_path_parameter_error(bindings.encodeUint64Array(a != null ? a.map(a_conv_22 => a_conv_22 != null ? CommonBase.get_ptr_of(a_conv_22) : 0n) : null)); const ret_hu_conv: PaymentSendFailure = PaymentSendFailure.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; @@ -410,7 +414,7 @@ export class PaymentSendFailure extends CommonBase { * Utility method to constructs a new AllFailedRetrySafe-variant PaymentSendFailure */ public static constructor_all_failed_retry_safe(a: APIError[]): PaymentSendFailure { - const ret: number = bindings.PaymentSendFailure_all_failed_retry_safe(bindings.encodeUint32Array(a != null ? a.map(a_conv_10 => CommonBase.get_ptr_of(a_conv_10)) : null)); + const ret: bigint = bindings.PaymentSendFailure_all_failed_retry_safe(bindings.encodeUint64Array(a != null ? a.map(a_conv_10 => CommonBase.get_ptr_of(a_conv_10)) : null)); const ret_hu_conv: PaymentSendFailure = PaymentSendFailure.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); return ret_hu_conv; @@ -420,9 +424,10 @@ export class PaymentSendFailure extends CommonBase { * Utility method to constructs a new PartialFailure-variant PaymentSendFailure */ public static constructor_partial_failure(results: Result_NoneAPIErrorZ[], failed_paths_retry: RouteParameters, payment_id: Uint8Array): PaymentSendFailure { - const ret: number = bindings.PaymentSendFailure_partial_failure(bindings.encodeUint32Array(results != null ? results.map(results_conv_22 => results_conv_22 != null ? CommonBase.get_ptr_of(results_conv_22) : 0) : null), failed_paths_retry == null ? 0 : CommonBase.get_ptr_of(failed_paths_retry) & ~1, bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32))); + const ret: bigint = bindings.PaymentSendFailure_partial_failure(bindings.encodeUint64Array(results != null ? results.map(results_conv_22 => results_conv_22 != null ? CommonBase.get_ptr_of(results_conv_22) : 0n) : null), failed_paths_retry == null ? 0n : CommonBase.get_ptr_of(failed_paths_retry), bindings.encodeUint8Array(bindings.check_arr_len(payment_id, 32))); const ret_hu_conv: PaymentSendFailure = PaymentSendFailure.constr_from_ptr(ret); CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv); + CommonBase.add_ref_from(ret_hu_conv, failed_paths_retry); return ret_hu_conv; } @@ -431,9 +436,9 @@ export class PaymentSendFailure extends CommonBase { export class PaymentSendFailure_ParameterError extends PaymentSendFailure { public parameter_error: APIError; /* @internal */ - public constructor(ptr: number) { + public constructor(ptr: bigint) { super(null, ptr); - const parameter_error: number = bindings.LDKPaymentSendFailure_ParameterError_get_parameter_error(ptr); + const parameter_error: bigint = bindings.LDKPaymentSendFailure_ParameterError_get_parameter_error(ptr); const parameter_error_hu_conv: APIError = APIError.constr_from_ptr(parameter_error); CommonBase.add_ref_from(parameter_error_hu_conv, this); this.parameter_error = parameter_error_hu_conv; @@ -443,13 +448,13 @@ export class PaymentSendFailure_ParameterError extends PaymentSendFailure { export class PaymentSendFailure_PathParameterError extends PaymentSendFailure { public path_parameter_error: Result_NoneAPIErrorZ[]; /* @internal */ - public constructor(ptr: number) { + public constructor(ptr: bigint) { super(null, ptr); const path_parameter_error: number = bindings.LDKPaymentSendFailure_PathParameterError_get_path_parameter_error(ptr); const path_parameter_error_conv_22_len: number = bindings.getArrayLength(path_parameter_error); const path_parameter_error_conv_22_arr: Result_NoneAPIErrorZ[] = new Array(path_parameter_error_conv_22_len).fill(null); for (var w = 0; w < path_parameter_error_conv_22_len; w++) { - const path_parameter_error_conv_22: number = bindings.getU32ArrayElem(path_parameter_error, w); + const path_parameter_error_conv_22: bigint = bindings.getU64ArrayElem(path_parameter_error, w); const path_parameter_error_conv_22_hu_conv: Result_NoneAPIErrorZ = Result_NoneAPIErrorZ.constr_from_ptr(path_parameter_error_conv_22); path_parameter_error_conv_22_arr[w] = path_parameter_error_conv_22_hu_conv; } @@ -461,13 +466,13 @@ export class PaymentSendFailure_PathParameterError extends PaymentSendFailure { export class PaymentSendFailure_AllFailedRetrySafe extends PaymentSendFailure { public all_failed_retry_safe: APIError[]; /* @internal */ - public constructor(ptr: number) { + public constructor(ptr: bigint) { super(null, ptr); const all_failed_retry_safe: number = bindings.LDKPaymentSendFailure_AllFailedRetrySafe_get_all_failed_retry_safe(ptr); const all_failed_retry_safe_conv_10_len: number = bindings.getArrayLength(all_failed_retry_safe); const all_failed_retry_safe_conv_10_arr: APIError[] = new Array(all_failed_retry_safe_conv_10_len).fill(null); for (var k = 0; k < all_failed_retry_safe_conv_10_len; k++) { - const all_failed_retry_safe_conv_10: number = bindings.getU32ArrayElem(all_failed_retry_safe, k); + const all_failed_retry_safe_conv_10: bigint = bindings.getU64ArrayElem(all_failed_retry_safe, k); const all_failed_retry_safe_conv_10_hu_conv: APIError = APIError.constr_from_ptr(all_failed_retry_safe_conv_10); CommonBase.add_ref_from(all_failed_retry_safe_conv_10_hu_conv, this); all_failed_retry_safe_conv_10_arr[k] = all_failed_retry_safe_conv_10_hu_conv; @@ -495,19 +500,19 @@ export class PaymentSendFailure_PartialFailure extends PaymentSendFailure { */ public payment_id: Uint8Array; /* @internal */ - public constructor(ptr: number) { + public constructor(ptr: bigint) { super(null, ptr); const results: number = bindings.LDKPaymentSendFailure_PartialFailure_get_results(ptr); const results_conv_22_len: number = bindings.getArrayLength(results); const results_conv_22_arr: Result_NoneAPIErrorZ[] = new Array(results_conv_22_len).fill(null); for (var w = 0; w < results_conv_22_len; w++) { - const results_conv_22: number = bindings.getU32ArrayElem(results, w); + const results_conv_22: bigint = bindings.getU64ArrayElem(results, w); const results_conv_22_hu_conv: Result_NoneAPIErrorZ = Result_NoneAPIErrorZ.constr_from_ptr(results_conv_22); results_conv_22_arr[w] = results_conv_22_hu_conv; } bindings.freeWasmMemory(results) this.results = results_conv_22_arr; - const failed_paths_retry: number = bindings.LDKPaymentSendFailure_PartialFailure_get_failed_paths_retry(ptr); + const failed_paths_retry: bigint = bindings.LDKPaymentSendFailure_PartialFailure_get_failed_paths_retry(ptr); const failed_paths_retry_hu_conv: RouteParameters = new RouteParameters(null, failed_paths_retry); CommonBase.add_ref_from(failed_paths_retry_hu_conv, this); this.failed_paths_retry = failed_paths_retry_hu_conv;