X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FSha256.mts;h=7bc89032a3b991b2ebed344910183ea96868c6b4;hb=f6d7282fcf6324519ea1fe4b584c8d02c95acd9e;hp=f3eeeb41de739f5940505104060f941836a3c9de;hpb=e2bd9223757025980105f0aeb17900f17734b2e3;p=ldk-java diff --git a/ts/structs/Sha256.mts b/ts/structs/Sha256.mts index f3eeeb41..7bc89032 100644 --- a/ts/structs/Sha256.mts +++ b/ts/structs/Sha256.mts @@ -361,12 +361,12 @@ import * as bindings from '../bindings.mjs' */ export class Sha256 extends CommonBase { /* @internal */ - public constructor(_dummy: object, ptr: number) { + public constructor(_dummy: object, ptr: bigint) { super(ptr, bindings.Sha256_free); } - public clone_ptr(): number { - const ret: number = bindings.Sha256_clone_ptr(this.ptr); + public clone_ptr(): bigint { + const ret: bigint = bindings.Sha256_clone_ptr(this.ptr); return ret; } @@ -374,7 +374,7 @@ export class Sha256 extends CommonBase { * Creates a copy of the Sha256 */ public clone(): Sha256 { - const ret: number = bindings.Sha256_clone(this.ptr); + const ret: bigint = bindings.Sha256_clone(this.ptr); const ret_hu_conv: Sha256 = new Sha256(null, ret); CommonBase.add_ref_from(ret_hu_conv, this); return ret_hu_conv; @@ -394,7 +394,7 @@ export class Sha256 extends CommonBase { * Two objects with NULL inner values will be considered "equal" here. */ public eq(b: Sha256): boolean { - const ret: boolean = bindings.Sha256_eq(this.ptr, b == null ? 0 : CommonBase.get_ptr_of(b) & ~1); + const ret: boolean = bindings.Sha256_eq(this.ptr, b == null ? 0n : CommonBase.get_ptr_of(b)); CommonBase.add_ref_from(this, b); return ret; }