X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FRoutingFees.ts;h=0a0a55cbd7e60d9d7c93574a0f31ddf19c53c20d;hb=22f5f4208b1f3b5542292250f1612b944f5cd7fd;hp=5ba023ff0e69af22cc8c7b2bdf9ad0fab1654409;hpb=56e9910ffaa7fccf2cb777dc9cf55e01a9681543;p=ldk-java diff --git a/ts/structs/RoutingFees.ts b/ts/structs/RoutingFees.ts index 5ba023ff..0a0a55cb 100644 --- a/ts/structs/RoutingFees.ts +++ b/ts/structs/RoutingFees.ts @@ -1,53 +1,61 @@ + import CommonBase from './CommonBase'; import * as bindings from '../bindings' // TODO: figure out location -public class RoutingFees extends CommonBase { - RoutingFees(Object _dummy, long ptr) { super(ptr); } - @Override @SuppressWarnings("deprecation") - protected void finalize() throws Throwable { - super.finalize(); - if (ptr != 0) { bindings.RoutingFees_free(ptr); } - } + + export default class RoutingFees extends CommonBase { + constructor(_dummy: object, ptr: number) { + super(ptr); + } + + + protected finalize() { + super.finalize(); + + if (this.ptr != 0) { + bindings.RoutingFees_free(this.ptr); + } + } public RoutingFees clone() { - uint32_t ret = bindings.RoutingFees_clone(this.ptr); - RoutingFees ret_hu_conv = new RoutingFees(null, ret); + number ret = bindings.RoutingFees_clone(this.ptr); + const ret_hu_conv: RoutingFees = new RoutingFees(null, ret); return ret_hu_conv; } - public int get_base_msat() { - int ret = bindings.RoutingFees_get_base_msat(this.ptr); + public number get_base_msat() { + number ret = bindings.RoutingFees_get_base_msat(this.ptr); return ret; } - public void set_base_msat(int val) { + public void set_base_msat(number val) { bindings.RoutingFees_set_base_msat(this.ptr, val); } - public int get_proportional_millionths() { - int ret = bindings.RoutingFees_get_proportional_millionths(this.ptr); + public number get_proportional_millionths() { + number ret = bindings.RoutingFees_get_proportional_millionths(this.ptr); return ret; } - public void set_proportional_millionths(int val) { + public void set_proportional_millionths(number val) { bindings.RoutingFees_set_proportional_millionths(this.ptr, val); } - public static RoutingFees constructor_new(int base_msat_arg, int proportional_millionths_arg) { - uint32_t ret = bindings.RoutingFees_new(base_msat_arg, proportional_millionths_arg); - RoutingFees ret_hu_conv = new RoutingFees(null, ret); + 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); return ret_hu_conv; } - public static Result_RoutingFeesDecodeErrorZ constructor_read(byte[] ser) { - uint32_t ret = bindings.RoutingFees_read(ser); + 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; } - public byte[] write() { - byte[] ret = bindings.RoutingFees_write(this.ptr); + public Uint8Array write() { + Uint8Array ret = bindings.RoutingFees_write(this.ptr); return ret; }