@@ -360,9 +360,9 @@ import * as bindings from '../bindings.mjs'
360360 * too-high values)
361361 */
362362export class APIError extends CommonBase {
363- protected constructor ( _dummy : object , ptr : number ) { super ( ptr , bindings . APIError_free ) ; }
363+ protected constructor ( _dummy : object , ptr : bigint ) { super ( ptr , bindings . APIError_free ) ; }
364364 /* @internal */
365- public static constr_from_ptr ( ptr : number ) : APIError {
365+ public static constr_from_ptr ( ptr : bigint ) : APIError {
366366 const raw_ty : number = bindings . LDKAPIError_ty_from_ptr ( ptr ) ;
367367 switch ( raw_ty ) {
368368 case 0 : return new APIError_APIMisuseError ( ptr ) ;
@@ -376,16 +376,16 @@ export class APIError extends CommonBase {
376376 }
377377 }
378378
379- public clone_ptr ( ) : number {
380- const ret : number = bindings . APIError_clone_ptr ( this . ptr ) ;
379+ public clone_ptr ( ) : bigint {
380+ const ret : bigint = bindings . APIError_clone_ptr ( this . ptr ) ;
381381 return ret ;
382382 }
383383
384384 /**
385385 * Creates a copy of the APIError
386386 */
387387 public clone ( ) : APIError {
388- const ret : number = bindings . APIError_clone ( this . ptr ) ;
388+ const ret : bigint = bindings . APIError_clone ( this . ptr ) ;
389389 const ret_hu_conv : APIError = APIError . constr_from_ptr ( ret ) ;
390390 CommonBase . add_ref_from ( ret_hu_conv , this ) ;
391391 return ret_hu_conv ;
@@ -395,7 +395,7 @@ export class APIError extends CommonBase {
395395 * Utility method to constructs a new APIMisuseError-variant APIError
396396 */
397397 public static constructor_apimisuse_error ( err : string ) : APIError {
398- const ret : number = bindings . APIError_apimisuse_error ( bindings . encodeString ( err ) ) ;
398+ const ret : bigint = bindings . APIError_apimisuse_error ( bindings . encodeString ( err ) ) ;
399399 const ret_hu_conv : APIError = APIError . constr_from_ptr ( ret ) ;
400400 CommonBase . add_ref_from ( ret_hu_conv , ret_hu_conv ) ;
401401 return ret_hu_conv ;
@@ -405,7 +405,7 @@ export class APIError extends CommonBase {
405405 * Utility method to constructs a new FeeRateTooHigh-variant APIError
406406 */
407407 public static constructor_fee_rate_too_high ( err : string , feerate : number ) : APIError {
408- const ret : number = bindings . APIError_fee_rate_too_high ( bindings . encodeString ( err ) , feerate ) ;
408+ const ret : bigint = bindings . APIError_fee_rate_too_high ( bindings . encodeString ( err ) , feerate ) ;
409409 const ret_hu_conv : APIError = APIError . constr_from_ptr ( ret ) ;
410410 CommonBase . add_ref_from ( ret_hu_conv , ret_hu_conv ) ;
411411 return ret_hu_conv ;
@@ -415,7 +415,7 @@ export class APIError extends CommonBase {
415415 * Utility method to constructs a new RouteError-variant APIError
416416 */
417417 public static constructor_route_error ( err : string ) : APIError {
418- const ret : number = bindings . APIError_route_error ( bindings . encodeString ( err ) ) ;
418+ const ret : bigint = bindings . APIError_route_error ( bindings . encodeString ( err ) ) ;
419419 const ret_hu_conv : APIError = APIError . constr_from_ptr ( ret ) ;
420420 CommonBase . add_ref_from ( ret_hu_conv , ret_hu_conv ) ;
421421 return ret_hu_conv ;
@@ -425,7 +425,7 @@ export class APIError extends CommonBase {
425425 * Utility method to constructs a new ChannelUnavailable-variant APIError
426426 */
427427 public static constructor_channel_unavailable ( err : string ) : APIError {
428- const ret : number = bindings . APIError_channel_unavailable ( bindings . encodeString ( err ) ) ;
428+ const ret : bigint = bindings . APIError_channel_unavailable ( bindings . encodeString ( err ) ) ;
429429 const ret_hu_conv : APIError = APIError . constr_from_ptr ( ret ) ;
430430 CommonBase . add_ref_from ( ret_hu_conv , ret_hu_conv ) ;
431431 return ret_hu_conv ;
@@ -435,7 +435,7 @@ export class APIError extends CommonBase {
435435 * Utility method to constructs a new MonitorUpdateFailed-variant APIError
436436 */
437437 public static constructor_monitor_update_failed ( ) : APIError {
438- const ret : number = bindings . APIError_monitor_update_failed ( ) ;
438+ const ret : bigint = bindings . APIError_monitor_update_failed ( ) ;
439439 const ret_hu_conv : APIError = APIError . constr_from_ptr ( ret ) ;
440440 CommonBase . add_ref_from ( ret_hu_conv , ret_hu_conv ) ;
441441 return ret_hu_conv ;
@@ -445,9 +445,10 @@ export class APIError extends CommonBase {
445445 * Utility method to constructs a new IncompatibleShutdownScript-variant APIError
446446 */
447447 public static constructor_incompatible_shutdown_script ( script : ShutdownScript ) : APIError {
448- const ret : number = bindings . APIError_incompatible_shutdown_script ( script == null ? 0 : CommonBase . get_ptr_of ( script ) & ~ 1 ) ;
448+ const ret : bigint = bindings . APIError_incompatible_shutdown_script ( script == null ? 0n : CommonBase . get_ptr_of ( script ) ) ;
449449 const ret_hu_conv : APIError = APIError . constr_from_ptr ( ret ) ;
450450 CommonBase . add_ref_from ( ret_hu_conv , ret_hu_conv ) ;
451+ CommonBase . add_ref_from ( ret_hu_conv , script ) ;
451452 return ret_hu_conv ;
452453 }
453454
@@ -459,7 +460,7 @@ export class APIError_APIMisuseError extends APIError {
459460 */
460461 public err : string ;
461462 /* @internal */
462- public constructor ( ptr : number ) {
463+ public constructor ( ptr : bigint ) {
463464 super ( null , ptr ) ;
464465 const err : number = bindings . LDKAPIError_APIMisuseError_get_err ( ptr ) ;
465466 const err_conv : string = bindings . decodeString ( err ) ;
@@ -477,7 +478,7 @@ export class APIError_FeeRateTooHigh extends APIError {
477478 */
478479 public feerate : number ;
479480 /* @internal */
480- public constructor ( ptr : number ) {
481+ public constructor ( ptr : bigint ) {
481482 super ( null , ptr ) ;
482483 const err : number = bindings . LDKAPIError_FeeRateTooHigh_get_err ( ptr ) ;
483484 const err_conv : string = bindings . decodeString ( err ) ;
@@ -492,7 +493,7 @@ export class APIError_RouteError extends APIError {
492493 */
493494 public err : string ;
494495 /* @internal */
495- public constructor ( ptr : number ) {
496+ public constructor ( ptr : bigint ) {
496497 super ( null , ptr ) ;
497498 const err : number = bindings . LDKAPIError_RouteError_get_err ( ptr ) ;
498499 const err_conv : string = bindings . decodeString ( err ) ;
@@ -506,7 +507,7 @@ export class APIError_ChannelUnavailable extends APIError {
506507 */
507508 public err : string ;
508509 /* @internal */
509- public constructor ( ptr : number ) {
510+ public constructor ( ptr : bigint ) {
510511 super ( null , ptr ) ;
511512 const err : number = bindings . LDKAPIError_ChannelUnavailable_get_err ( ptr ) ;
512513 const err_conv : string = bindings . decodeString ( err ) ;
@@ -516,7 +517,7 @@ export class APIError_ChannelUnavailable extends APIError {
516517/** A APIError of type MonitorUpdateFailed */
517518export class APIError_MonitorUpdateFailed extends APIError {
518519 /* @internal */
519- public constructor ( ptr : number ) {
520+ public constructor ( ptr : bigint ) {
520521 super ( null , ptr ) ;
521522 }
522523}
@@ -527,9 +528,9 @@ export class APIError_IncompatibleShutdownScript extends APIError {
527528 */
528529 public script : ShutdownScript ;
529530 /* @internal */
530- public constructor ( ptr : number ) {
531+ public constructor ( ptr : bigint ) {
531532 super ( null , ptr ) ;
532- const script : number = bindings . LDKAPIError_IncompatibleShutdownScript_get_script ( ptr ) ;
533+ const script : bigint = bindings . LDKAPIError_IncompatibleShutdownScript_get_script ( ptr ) ;
533534 const script_hu_conv : ShutdownScript = new ShutdownScript ( null , script ) ;
534535 CommonBase . add_ref_from ( script_hu_conv , this ) ;
535536 this . script = script_hu_conv ;
0 commit comments