X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FRoutingFees.ts;h=8d62e3f3617a5341c4fc9f2c18e57bfc893e2eb8;hb=b6cc0960eaee5a5bbc7fde79a56152d6dcd649d8;hp=0a0a55cbd7e60d9d7c93574a0f31ddf19c53c20d;hpb=acecce750cf1159a51f9d1a4dbfd717520739e92;p=ldk-java diff --git a/ts/structs/RoutingFees.ts b/ts/structs/RoutingFees.ts index 0a0a55cb..8d62e3f3 100644 --- a/ts/structs/RoutingFees.ts +++ b/ts/structs/RoutingFees.ts @@ -18,12 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.RoutingFees_free(this.ptr); } } - public RoutingFees clone() { - number ret = bindings.RoutingFees_clone(this.ptr); - const ret_hu_conv: RoutingFees = new RoutingFees(null, ret); - return ret_hu_conv; - } - public number get_base_msat() { number ret = bindings.RoutingFees_get_base_msat(this.ptr); return ret; @@ -45,12 +39,20 @@ import * as bindings from '../bindings' // TODO: figure out location public static RoutingFees constructor_new(number base_msat_arg, number proportional_millionths_arg) { number ret = bindings.RoutingFees_new(base_msat_arg, proportional_millionths_arg); const ret_hu_conv: RoutingFees = new RoutingFees(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } - public static Result_RoutingFeesDecodeErrorZ constructor_read(Uint8Array ser) { - number ret = bindings.RoutingFees_read(ser); - Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret); + public boolean eq(RoutingFees b) { + boolean ret = bindings.RoutingFees_eq(this.ptr, b == null ? 0 : b.ptr & ~1); + this.ptrs_to.add(b); + return ret; + } + + public RoutingFees clone() { + number ret = bindings.RoutingFees_clone(this.ptr); + const ret_hu_conv: RoutingFees = new RoutingFees(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -59,4 +61,10 @@ import * as bindings from '../bindings' // TODO: figure out location return ret; } + public static Result_RoutingFeesDecodeErrorZ constructor_read(Uint8Array ser) { + number ret = bindings.RoutingFees_read(ser); + Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret); + return ret_hu_conv; + } + }