X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FAccess.mts;h=60b22fd77c8d019a0ec74734a2e2be1c2a524553;hb=f6d7282fcf6324519ea1fe4b584c8d02c95acd9e;hp=9ea43cc98ea4e9b4a0574f417778afca1f5038d3;hpb=7cbcc5ef17b8036b2e99980e227c7ca0d44dba7f;p=ldk-java diff --git a/ts/structs/Access.mts b/ts/structs/Access.mts index 9ea43cc9..60b22fd7 100644 --- a/ts/structs/Access.mts +++ b/ts/structs/Access.mts @@ -382,7 +382,7 @@ export class Access extends CommonBase { public bindings_instance?: bindings.LDKAccess; /* @internal */ - constructor(_dummy: object, ptr: number) { + constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.Access_free); this.bindings_instance = null; } @@ -391,14 +391,14 @@ export class Access extends CommonBase { public static new_impl(arg: AccessInterface): Access { const impl_holder: LDKAccessHolder = new LDKAccessHolder(); let structImplementation = { - get_utxo (genesis_hash: number, short_channel_id: bigint): number { + get_utxo (genesis_hash: number, short_channel_id: bigint): bigint { const genesis_hash_conv: Uint8Array = bindings.decodeUint8Array(genesis_hash); const ret: Result_TxOutAccessErrorZ = arg.get_utxo(genesis_hash_conv, short_channel_id); - const result: number = ret == null ? 0 : ret.clone_ptr(); + const result: bigint = ret == null ? 0n : ret.clone_ptr(); return result; }, } as bindings.LDKAccess; - const ptr: number = bindings.LDKAccess_new(structImplementation); + const ptr: bigint = bindings.LDKAccess_new(structImplementation); impl_holder.held = new Access(null, ptr); impl_holder.held.bindings_instance = structImplementation; @@ -413,7 +413,7 @@ export class Access extends CommonBase { * [`short_channel_id`]: https://github.com/lightning/bolts/blob/master/07-routing-gossip.md#definition-of-short_channel_id */ public get_utxo(genesis_hash: Uint8Array, short_channel_id: bigint): Result_TxOutAccessErrorZ { - const ret: number = bindings.Access_get_utxo(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(genesis_hash, 32)), short_channel_id); + const ret: bigint = bindings.Access_get_utxo(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(genesis_hash, 32)), short_channel_id); const ret_hu_conv: Result_TxOutAccessErrorZ = Result_TxOutAccessErrorZ.constr_from_ptr(ret); return ret_hu_conv; }