]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/InMemorySigner.ts
Update auto-generated bindings to latest upstream
[ldk-java] / ts / structs / InMemorySigner.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 InMemorySigner 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.InMemorySigner_free(this.ptr);
19                     }
20                 }
21         public Uint8Array get_funding_key() {
22                 Uint8Array ret = bindings.InMemorySigner_get_funding_key(this.ptr);
23                 return ret;
24         }
25
26         public void set_funding_key(Uint8Array val) {
27                 bindings.InMemorySigner_set_funding_key(this.ptr, val);
28         }
29
30         public Uint8Array get_revocation_base_key() {
31                 Uint8Array ret = bindings.InMemorySigner_get_revocation_base_key(this.ptr);
32                 return ret;
33         }
34
35         public void set_revocation_base_key(Uint8Array val) {
36                 bindings.InMemorySigner_set_revocation_base_key(this.ptr, val);
37         }
38
39         public Uint8Array get_payment_key() {
40                 Uint8Array ret = bindings.InMemorySigner_get_payment_key(this.ptr);
41                 return ret;
42         }
43
44         public void set_payment_key(Uint8Array val) {
45                 bindings.InMemorySigner_set_payment_key(this.ptr, val);
46         }
47
48         public Uint8Array get_delayed_payment_base_key() {
49                 Uint8Array ret = bindings.InMemorySigner_get_delayed_payment_base_key(this.ptr);
50                 return ret;
51         }
52
53         public void set_delayed_payment_base_key(Uint8Array val) {
54                 bindings.InMemorySigner_set_delayed_payment_base_key(this.ptr, val);
55         }
56
57         public Uint8Array get_htlc_base_key() {
58                 Uint8Array ret = bindings.InMemorySigner_get_htlc_base_key(this.ptr);
59                 return ret;
60         }
61
62         public void set_htlc_base_key(Uint8Array val) {
63                 bindings.InMemorySigner_set_htlc_base_key(this.ptr, val);
64         }
65
66         public Uint8Array get_commitment_seed() {
67                 Uint8Array ret = bindings.InMemorySigner_get_commitment_seed(this.ptr);
68                 return ret;
69         }
70
71         public void set_commitment_seed(Uint8Array val) {
72                 bindings.InMemorySigner_set_commitment_seed(this.ptr, val);
73         }
74
75         public InMemorySigner clone() {
76                 number ret = bindings.InMemorySigner_clone(this.ptr);
77                 const ret_hu_conv: InMemorySigner = new InMemorySigner(null, ret);
78                 ret_hu_conv.ptrs_to.add(this);
79                 return ret_hu_conv;
80         }
81
82         public static InMemorySigner 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, Uint8Array channel_keys_id) {
83                 number ret = bindings.InMemorySigner_new(funding_key, revocation_base_key, payment_key, delayed_payment_base_key, htlc_base_key, commitment_seed, channel_value_satoshis, channel_keys_id);
84                 const ret_hu_conv: InMemorySigner = new InMemorySigner(null, ret);
85                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
86                 return ret_hu_conv;
87         }
88
89         public ChannelPublicKeys counterparty_pubkeys() {
90                 number ret = bindings.InMemorySigner_counterparty_pubkeys(this.ptr);
91                 const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
92                 ret_hu_conv.ptrs_to.add(this);
93                 return ret_hu_conv;
94         }
95
96         public number counterparty_selected_contest_delay() {
97                 number ret = bindings.InMemorySigner_counterparty_selected_contest_delay(this.ptr);
98                 return ret;
99         }
100
101         public number holder_selected_contest_delay() {
102                 number ret = bindings.InMemorySigner_holder_selected_contest_delay(this.ptr);
103                 return ret;
104         }
105
106         public boolean is_outbound() {
107                 boolean ret = bindings.InMemorySigner_is_outbound(this.ptr);
108                 return ret;
109         }
110
111         public OutPoint funding_outpoint() {
112                 number ret = bindings.InMemorySigner_funding_outpoint(this.ptr);
113                 const ret_hu_conv: OutPoint = new OutPoint(null, ret);
114                 ret_hu_conv.ptrs_to.add(this);
115                 return ret_hu_conv;
116         }
117
118         public ChannelTransactionParameters get_channel_parameters() {
119                 number ret = bindings.InMemorySigner_get_channel_parameters(this.ptr);
120                 const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret);
121                 ret_hu_conv.ptrs_to.add(this);
122                 return ret_hu_conv;
123         }
124
125         public Result_CVec_CVec_u8ZZNoneZ sign_counterparty_payment_input(Uint8Array spend_tx, number input_idx, StaticPaymentOutputDescriptor descriptor) {
126                 number ret = bindings.InMemorySigner_sign_counterparty_payment_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr & ~1);
127                 Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
128                 this.ptrs_to.add(descriptor);
129                 return ret_hu_conv;
130         }
131
132         public Result_CVec_CVec_u8ZZNoneZ sign_dynamic_p2wsh_input(Uint8Array spend_tx, number input_idx, DelayedPaymentOutputDescriptor descriptor) {
133                 number ret = bindings.InMemorySigner_sign_dynamic_p2wsh_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr & ~1);
134                 Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
135                 this.ptrs_to.add(descriptor);
136                 return ret_hu_conv;
137         }
138
139         public BaseSign as_BaseSign() {
140                 number ret = bindings.InMemorySigner_as_BaseSign(this.ptr);
141                 BaseSign ret_hu_conv = new BaseSign(null, ret);
142                 ret_hu_conv.ptrs_to.add(this);
143                 return ret_hu_conv;
144         }
145
146         public Sign as_Sign() {
147                 number ret = bindings.InMemorySigner_as_Sign(this.ptr);
148                 Sign ret_hu_conv = new Sign(null, ret);
149                 ret_hu_conv.ptrs_to.add(this);
150                 return ret_hu_conv;
151         }
152
153         public Uint8Array write() {
154                 Uint8Array ret = bindings.InMemorySigner_write(this.ptr);
155                 return ret;
156         }
157
158         public static Result_InMemorySignerDecodeErrorZ constructor_read(Uint8Array ser) {
159                 number ret = bindings.InMemorySigner_read(ser);
160                 Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
161                 return ret_hu_conv;
162         }
163
164 }