3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class KeysManager extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.KeysManager_free(this.ptr);
21 public static KeysManager constructor_new(Uint8Array seed, LDKNetwork network, number starting_time_secs, number starting_time_nanos) {
22 number ret = bindings.KeysManager_new(seed, network, starting_time_secs, starting_time_nanos);
23 const ret_hu_conv: KeysManager = new KeysManager(null, ret);
24 ret_hu_conv.ptrs_to.add(ret_hu_conv);
28 public InMemoryChannelKeys derive_channel_keys(number channel_value_satoshis, number params_1, number params_2) {
29 number ret = bindings.KeysManager_derive_channel_keys(this.ptr, channel_value_satoshis, params_1, params_2);
30 const ret_hu_conv: InMemoryChannelKeys = new InMemoryChannelKeys(null, ret);
31 ret_hu_conv.ptrs_to.add(this);
35 public KeysInterface as_KeysInterface() {
36 number ret = bindings.KeysManager_as_KeysInterface(this.ptr);
37 KeysInterface ret_hu_conv = new KeysInterface(null, ret);
38 ret_hu_conv.ptrs_to.add(this);