X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FDirectedChannelTransactionParameters.ts;h=cc57f1ec020716edeadd36d6df48b400740b2fdc;hb=22f5f4208b1f3b5542292250f1612b944f5cd7fd;hp=d507ac60a8c7bedb4a801010fe89c9b8e68f6498;hpb=56e9910ffaa7fccf2cb777dc9cf55e01a9681543;p=ldk-java diff --git a/ts/structs/DirectedChannelTransactionParameters.ts b/ts/structs/DirectedChannelTransactionParameters.ts index d507ac60..cc57f1ec 100644 --- a/ts/structs/DirectedChannelTransactionParameters.ts +++ b/ts/structs/DirectedChannelTransactionParameters.ts @@ -1,29 +1,37 @@ + 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); 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); 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 +41,8 @@ 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); return ret_hu_conv; }