X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FDirectionalChannelInfo.ts;h=9fb9c3170e9c498306ccf4b52f96fae179c2e9d9;hb=da49351ec14e95c8e9a27eacf8c7a9924a0b488e;hp=5866e91333e19ba91f17515091c8a821c153e807;hpb=fed2245c60159f6c074c9ed5c0f3ce273ad9841b;p=ldk-java diff --git a/ts/structs/DirectionalChannelInfo.ts b/ts/structs/DirectionalChannelInfo.ts index 5866e913..9fb9c317 100644 --- a/ts/structs/DirectionalChannelInfo.ts +++ b/ts/structs/DirectionalChannelInfo.ts @@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.DirectionalChannelInfo_free(this.ptr); } } - public DirectionalChannelInfo clone() { - number ret = bindings.DirectionalChannelInfo_clone(this.ptr); - const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret); - ret_hu_conv.ptrs_to.add(this); - return ret_hu_conv; - } - public number get_last_update() { number ret = bindings.DirectionalChannelInfo_get_last_update(this.ptr); return ret; @@ -61,6 +54,17 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.DirectionalChannelInfo_set_htlc_minimum_msat(this.ptr, val); } + public Option_u64Z get_htlc_maximum_msat() { + number ret = bindings.DirectionalChannelInfo_get_htlc_maximum_msat(this.ptr); + Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + + public void set_htlc_maximum_msat(Option_u64Z val) { + bindings.DirectionalChannelInfo_set_htlc_maximum_msat(this.ptr, val.ptr); + } + public RoutingFees get_fees() { number ret = bindings.DirectionalChannelInfo_get_fees(this.ptr); const ret_hu_conv: RoutingFees = new RoutingFees(null, ret); @@ -85,15 +89,30 @@ import * as bindings from '../bindings' // TODO: figure out location this.ptrs_to.add(val); } + public static DirectionalChannelInfo constructor_new(number last_update_arg, boolean enabled_arg, number cltv_expiry_delta_arg, number htlc_minimum_msat_arg, Option_u64Z htlc_maximum_msat_arg, RoutingFees fees_arg, ChannelUpdate last_update_message_arg) { + number ret = bindings.DirectionalChannelInfo_new(last_update_arg, enabled_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg, htlc_maximum_msat_arg.ptr, fees_arg == null ? 0 : fees_arg.ptr & ~1, last_update_message_arg == null ? 0 : last_update_message_arg.ptr & ~1); + const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + ret_hu_conv.ptrs_to.add(fees_arg); + ret_hu_conv.ptrs_to.add(last_update_message_arg); + return ret_hu_conv; + } + + public DirectionalChannelInfo clone() { + number ret = bindings.DirectionalChannelInfo_clone(this.ptr); + const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + public Uint8Array write() { Uint8Array ret = bindings.DirectionalChannelInfo_write(this.ptr); return ret; } - public static DirectionalChannelInfo constructor_read(Uint8Array ser) { + public static Result_DirectionalChannelInfoDecodeErrorZ constructor_read(Uint8Array ser) { number ret = bindings.DirectionalChannelInfo_read(ser); - const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret); - ret_hu_conv.ptrs_to.add(ret_hu_conv); + Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }