]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/KeysManager.ts
Update auto-generated bindings
[ldk-java] / ts / structs / KeysManager.ts
1
2             
3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
5
6
7
8             export default class KeysManager extends CommonBase {
9                 constructor(_dummy: object, ptr: number) {
10                     super(ptr);
11                 }
12
13                 
14                 protected finalize() {
15                     super.finalize();
16
17                     if (this.ptr != 0) {
18                         bindings.KeysManager_free(this.ptr);
19                     }
20                 }
21         public static KeysManager constructor_new(Uint8Array seed, number starting_time_secs, number starting_time_nanos) {
22                 number ret = bindings.KeysManager_new(seed, 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);
25                 return ret_hu_conv;
26         }
27
28         public InMemorySigner derive_channel_keys(number channel_value_satoshis, Uint8Array params) {
29                 number ret = bindings.KeysManager_derive_channel_keys(this.ptr, channel_value_satoshis, params);
30                 const ret_hu_conv: InMemorySigner = new InMemorySigner(null, ret);
31                 ret_hu_conv.ptrs_to.add(this);
32                 return ret_hu_conv;
33         }
34
35         public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, Uint8Array change_destination_script, number feerate_sat_per_1000_weight) {
36                 number ret = bindings.KeysManager_spend_spendable_outputs(this.ptr, Arrays.stream(descriptors).map(descriptors_conv_27 -> descriptors_conv_27.ptr).toArray(number[]::new), Arrays.stream(outputs).map(outputs_conv_7 -> outputs_conv_7.ptr).toArray(number[]::new), change_destination_script, feerate_sat_per_1000_weight);
37                 Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
38                 /* TODO 2 SpendableOutputDescriptor  */;
39                 /* TODO 2 TxOut  */;
40                 return ret_hu_conv;
41         }
42
43         public KeysInterface as_KeysInterface() {
44                 number ret = bindings.KeysManager_as_KeysInterface(this.ptr);
45                 KeysInterface ret_hu_conv = new KeysInterface(null, ret);
46                 ret_hu_conv.ptrs_to.add(this);
47                 return ret_hu_conv;
48         }
49
50 }