X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FInMemoryChannelKeys.ts;h=4fc7fcdca282f73cc1fff84bc175480fee5631cb;hb=fd59673b53bd5e74459132e685a10258b3c1d5a6;hp=4e4e375f28f63bacd47dfb8b23d9751753ee508e;hpb=acecce750cf1159a51f9d1a4dbfd717520739e92;p=ldk-java diff --git a/ts/structs/InMemoryChannelKeys.ts b/ts/structs/InMemoryChannelKeys.ts index 4e4e375f..4fc7fcdc 100644 --- a/ts/structs/InMemoryChannelKeys.ts +++ b/ts/structs/InMemoryChannelKeys.ts @@ -18,12 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.InMemoryChannelKeys_free(this.ptr); } } - public InMemoryChannelKeys clone() { - number ret = bindings.InMemoryChannelKeys_clone(this.ptr); - const ret_hu_conv: InMemoryChannelKeys = new InMemoryChannelKeys(null, ret); - return ret_hu_conv; - } - public Uint8Array get_funding_key() { Uint8Array ret = bindings.InMemoryChannelKeys_get_funding_key(this.ptr); return ret; @@ -78,15 +72,24 @@ import * as bindings from '../bindings' // TODO: figure out location bindings.InMemoryChannelKeys_set_commitment_seed(this.ptr, val); } + public InMemoryChannelKeys clone() { + number ret = bindings.InMemoryChannelKeys_clone(this.ptr); + const ret_hu_conv: InMemoryChannelKeys = new InMemoryChannelKeys(null, ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + public static InMemoryChannelKeys constructor_new(Uint8Array funding_key, Uint8Array revocation_base_key, Uint8Array payment_key, Uint8Array delayed_payment_base_key, Uint8Array htlc_base_key, Uint8Array commitment_seed, number channel_value_satoshis, TwoTuple key_derivation_params) { number ret = bindings.InMemoryChannelKeys_new(funding_key, revocation_base_key, payment_key, delayed_payment_base_key, htlc_base_key, commitment_seed, channel_value_satoshis, bindings.C2Tuple_u64u64Z_new(key_derivation_params.a, key_derivation_params.b)); const ret_hu_conv: InMemoryChannelKeys = new InMemoryChannelKeys(null, ret); + ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } public ChannelPublicKeys counterparty_pubkeys() { number ret = bindings.InMemoryChannelKeys_counterparty_pubkeys(this.ptr); const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -108,12 +111,14 @@ import * as bindings from '../bindings' // TODO: figure out location public OutPoint funding_outpoint() { number ret = bindings.InMemoryChannelKeys_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 ChannelTransactionParameters get_channel_parameters() { number ret = bindings.InMemoryChannelKeys_get_channel_parameters(this.ptr); const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret); + ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; }