X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FChannelConfig.ts;h=e7e2c97905a747c4b8b6dc4e39fad7f5a40e7e8e;hb=0fee03a8095f5599f8eccd920c1b1af6b3a20260;hp=3f07d5c92b8873f0865fc0ad3d60bafe7b2ddb36;hpb=22f5f4208b1f3b5542292250f1612b944f5cd7fd;p=ldk-java diff --git a/ts/structs/ChannelConfig.ts b/ts/structs/ChannelConfig.ts index 3f07d5c9..e7e2c979 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_forwarding_fee_base_msat() { + number ret = bindings.ChannelConfig_get_forwarding_fee_base_msat(this.ptr); + return ret; + } + + public void set_forwarding_fee_base_msat(number val) { + bindings.ChannelConfig_set_forwarding_fee_base_msat(this.ptr, val); } - public number get_fee_proportional_millionths() { - number ret = bindings.ChannelConfig_get_fee_proportional_millionths(this.ptr); + public number get_cltv_expiry_delta() { + number ret = bindings.ChannelConfig_get_cltv_expiry_delta(this.ptr); return ret; } - public void set_fee_proportional_millionths(number val) { - bindings.ChannelConfig_set_fee_proportional_millionths(this.ptr, val); + 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,47 @@ 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 number clone_ptr() { + number ret = bindings.ChannelConfig_clone_ptr(this.ptr); + return ret; + } + + 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 +112,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; }