X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FDirectedChannelTransactionParameters.ts;h=77c53071f498dc81f45ea5840bffcff4c4518842;hb=fed2245c60159f6c074c9ed5c0f3ce273ad9841b;hp=d507ac60a8c7bedb4a801010fe89c9b8e68f6498;hpb=822471992c6bf6f9985e531cc5940e4cc35e3e4c;p=ldk-java diff --git a/ts/structs/DirectedChannelTransactionParameters.ts b/ts/structs/DirectedChannelTransactionParameters.ts index d507ac60..77c53071 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,8 +43,9 @@ 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; }