X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=ts%2Fstructs%2FChannelConfig.ts;h=570630c5599fc1d37f95f28f1c2edfd9a2305c08;hb=f41ae4ea36ff2836b31ca133849184c992b17050;hp=3f07d5c92b8873f0865fc0ad3d60bafe7b2ddb36;hpb=22f5f4208b1f3b5542292250f1612b944f5cd7fd;p=ldk-java diff --git a/ts/structs/ChannelConfig.ts b/ts/structs/ChannelConfig.ts index 3f07d5c9..570630c5 100644 --- a/ts/structs/ChannelConfig.ts +++ b/ts/structs/ChannelConfig.ts @@ -18,19 +18,31 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.ChannelConfig_free(this.ptr); } } - public ChannelConfig clone() { - number ret = bindings.ChannelConfig_clone(this.ptr); - const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret); - return ret_hu_conv; + public number get_forwarding_fee_proportional_millionths() { + number ret = bindings.ChannelConfig_get_forwarding_fee_proportional_millionths(this.ptr); + return ret; + } + + public void set_forwarding_fee_proportional_millionths(number val) { + bindings.ChannelConfig_set_forwarding_fee_proportional_millionths(this.ptr, val); } - public number get_fee_proportional_millionths() { - number ret = bindings.ChannelConfig_get_fee_proportional_millionths(this.ptr); + public number get_forwarding_fee_base_msat() { + number ret = bindings.ChannelConfig_get_forwarding_fee_base_msat(this.ptr); return ret; } - public void set_fee_proportional_millionths(number val) { - bindings.ChannelConfig_set_fee_proportional_millionths(this.ptr, val); + public void set_forwarding_fee_base_msat(number val) { + bindings.ChannelConfig_set_forwarding_fee_base_msat(this.ptr, val); + } + + public number get_cltv_expiry_delta() { + number ret = bindings.ChannelConfig_get_cltv_expiry_delta(this.ptr); + return ret; + } + + public void set_cltv_expiry_delta(number val) { + bindings.ChannelConfig_set_cltv_expiry_delta(this.ptr, val); } public boolean get_announced_channel() { @@ -51,15 +63,42 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.ChannelConfig_set_commit_upfront_shutdown_pubkey(this.ptr, val); } - public static ChannelConfig constructor_new(number fee_proportional_millionths_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_arg) { - number ret = bindings.ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg); + public number get_max_dust_htlc_exposure_msat() { + number ret = bindings.ChannelConfig_get_max_dust_htlc_exposure_msat(this.ptr); + return ret; + } + + public void set_max_dust_htlc_exposure_msat(number val) { + bindings.ChannelConfig_set_max_dust_htlc_exposure_msat(this.ptr, val); + } + + public number get_force_close_avoidance_max_fee_satoshis() { + number ret = bindings.ChannelConfig_get_force_close_avoidance_max_fee_satoshis(this.ptr); + return ret; + } + + public void set_force_close_avoidance_max_fee_satoshis(number val) { + bindings.ChannelConfig_set_force_close_avoidance_max_fee_satoshis(this.ptr, val); + } + + public static ChannelConfig constructor_new(number forwarding_fee_proportional_millionths_arg, number forwarding_fee_base_msat_arg, number cltv_expiry_delta_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_arg, number max_dust_htlc_exposure_msat_arg, number force_close_avoidance_max_fee_satoshis_arg) { + number ret = bindings.ChannelConfig_new(forwarding_fee_proportional_millionths_arg, forwarding_fee_base_msat_arg, cltv_expiry_delta_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg, max_dust_htlc_exposure_msat_arg, force_close_avoidance_max_fee_satoshis_arg); const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); + return ret_hu_conv; + } + + public ChannelConfig clone() { + number ret = bindings.ChannelConfig_clone(this.ptr); + const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } public static ChannelConfig constructor_default() { number ret = bindings.ChannelConfig_default(); const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } @@ -68,9 +107,9 @@ import * as bindings from '../bindings' // TODO: figure out location return ret; } - public static ChannelConfig constructor_read(Uint8Array ser) { + public static Result_ChannelConfigDecodeErrorZ constructor_read(Uint8Array ser) { number ret = bindings.ChannelConfig_read(ser); - const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret); + Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv; }