X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FDirectedChannelTransactionParameters.ts;h=dfc9e696b9cb313c4d98aadf671f3c461194089f;hb=0fee03a8095f5599f8eccd920c1b1af6b3a20260;hp=d507ac60a8c7bedb4a801010fe89c9b8e68f6498;hpb=822471992c6bf6f9985e531cc5940e4cc35e3e4c;p=ldk-java diff --git a/ts/structs/DirectedChannelTransactionParameters.ts b/ts/structs/DirectedChannelTransactionParameters.ts index d507ac60..dfc9e696 100644 --- a/ts/structs/DirectedChannelTransactionParameters.ts +++ b/ts/structs/DirectedChannelTransactionParameters.ts @@ -1,29 +1,39 @@ + import CommonBase from './CommonBase'; import * as bindings from '../bindings' // TODO: figure out location -public class DirectedChannelTransactionParameters extends CommonBase { - DirectedChannelTransactionParameters(Object _dummy, long ptr) { super(ptr); } - @Override @SuppressWarnings("deprecation") - protected void finalize() throws Throwable { - super.finalize(); - if (ptr != 0) { bindings.DirectedChannelTransactionParameters_free(ptr); } - } + + export default class DirectedChannelTransactionParameters extends CommonBase { + constructor(_dummy: object, ptr: number) { + super(ptr); + } + + + protected finalize() { + super.finalize(); + + if (this.ptr != 0) { + bindings.DirectedChannelTransactionParameters_free(this.ptr); + } + } public ChannelPublicKeys broadcaster_pubkeys() { - uint32_t ret = bindings.DirectedChannelTransactionParameters_broadcaster_pubkeys(this.ptr); - ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); + number ret = bindings.DirectedChannelTransactionParameters_broadcaster_pubkeys(this.ptr); + const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } public ChannelPublicKeys countersignatory_pubkeys() { - uint32_t ret = bindings.DirectedChannelTransactionParameters_countersignatory_pubkeys(this.ptr); - ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret); + number ret = bindings.DirectedChannelTransactionParameters_countersignatory_pubkeys(this.ptr); + const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } - public short contest_delay() { - short ret = bindings.DirectedChannelTransactionParameters_contest_delay(this.ptr); + public number contest_delay() { + number ret = bindings.DirectedChannelTransactionParameters_contest_delay(this.ptr); return ret; } @@ -33,9 +43,15 @@ public class DirectedChannelTransactionParameters extends CommonBase { } public OutPoint funding_outpoint() { - uint32_t ret = bindings.DirectedChannelTransactionParameters_funding_outpoint(this.ptr); - OutPoint ret_hu_conv = new OutPoint(null, ret); + number ret = bindings.DirectedChannelTransactionParameters_funding_outpoint(this.ptr); + const ret_hu_conv: OutPoint = new OutPoint(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } + public boolean opt_anchors() { + boolean ret = bindings.DirectedChannelTransactionParameters_opt_anchors(this.ptr); + return ret; + } + }