mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
e8a38f111d
The current interface, if given a tweak, uses a *different secret key* and tweaks it. This was an early experiment: we will switch to using a secret tweak for invoice_requests like we do for invoice path ids. To make sure there's no funny business, *hsmd* hashes to form the tweak (i.e. no zero tweaks!). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
19 KiB
19 KiB
1 | # Clients should not give a bad request but not the HSM's decision to crash. |
---|---|
2 | msgtype,hsmstatus_client_bad_request,1000 |
3 | msgdata,hsmstatus_client_bad_request,id,node_id, |
4 | msgdata,hsmstatus_client_bad_request,description,wirestring, |
5 | msgdata,hsmstatus_client_bad_request,len,u16, |
6 | msgdata,hsmstatus_client_bad_request,msg,u8,len |
7 | # We use this to set dev flags (before init!). It's a TLV, so we can |
8 | # extend easily. Normal TLV rules apply: ignore odd fields you don't |
9 | # understand. |
10 | msgtype,hsmd_dev_preinit,99 |
11 | msgdata,hsmd_dev_preinit,tlvs,hsmd_dev_preinit_tlvs, |
12 | tlvtype,hsmd_dev_preinit_tlvs,fail_preapprove,1 |
13 | tlvdata,hsmd_dev_preinit_tlvs,fail_preapprove,fail,bool, |
14 | tlvtype,hsmd_dev_preinit_tlvs,no_preapprove_check,3 |
15 | tlvdata,hsmd_dev_preinit_tlvs,no_preapprove_check,disable,bool, |
16 | #include <bitcoin/chainparams.h> |
17 | # Start the HSM. |
18 | msgtype,hsmd_init,11 |
19 | msgdata,hsmd_init,bip32_key_version,bip32_key_version, |
20 | msgdata,hsmd_init,chainparams,chainparams, |
21 | msgdata,hsmd_init,hsm_encryption_key,?secret, |
22 | msgdata,hsmd_init,dev_force_privkey,?privkey, |
23 | msgdata,hsmd_init,dev_force_bip32_seed,?secret, |
24 | msgdata,hsmd_init,dev_force_channel_secrets,?secrets, |
25 | msgdata,hsmd_init,dev_force_channel_secrets_shaseed,?sha256, |
26 | msgdata,hsmd_init,hsm_wire_min_version,u32, |
27 | msgdata,hsmd_init,hsm_wire_max_version,u32, |
28 | #include <common/bip32.h> |
29 | # Sorry: I should have put version in v2 :( |
30 | msgtype,hsmd_init_reply_v4,114 |
31 | # This gets upgraded when the wire protocol changes in incompatible |
32 | # ways: |
33 | msgdata,hsmd_init_reply_v4,hsm_version,u32, |
34 | # Capabilities, by convention are message numbers, indicating |
35 | # that the HSM supports you sending this message. |
36 | msgdata,hsmd_init_reply_v4,num_hsm_capabilities,u16, |
37 | msgdata,hsmd_init_reply_v4,hsm_capabilities,u32,num_hsm_capabilities |
38 | msgdata,hsmd_init_reply_v4,node_id,node_id, |
39 | msgdata,hsmd_init_reply_v4,bip32,ext_key, |
40 | msgdata,hsmd_init_reply_v4,bolt12,pubkey, |
41 | # Declare a new channel. |
42 | msgtype,hsmd_new_channel,30 |
43 | msgdata,hsmd_new_channel,id,node_id, |
44 | msgdata,hsmd_new_channel,dbid,u64, |
45 | # No value returned. |
46 | msgtype,hsmd_new_channel_reply,130 |
47 | # Get a new HSM FD, with the specified permissions |
48 | msgtype,hsmd_client_hsmfd,9 |
49 | # Which identity to use for requests |
50 | msgdata,hsmd_client_hsmfd,id,node_id, |
51 | # Database id for this client, if any. |
52 | msgdata,hsmd_client_hsmfd,dbid,u64, |
53 | msgdata,hsmd_client_hsmfd,permissions,u64, |
54 | # No content, just an fd. |
55 | msgtype,hsmd_client_hsmfd_reply,109 |
56 | #include <common/derive_basepoints.h> |
57 | # Get the basepoints and funding key for this specific channel. |
58 | msgtype,hsmd_get_channel_basepoints,10 |
59 | msgdata,hsmd_get_channel_basepoints,peerid,node_id, |
60 | msgdata,hsmd_get_channel_basepoints,dbid,u64, |
61 | msgtype,hsmd_get_channel_basepoints_reply,110 |
62 | msgdata,hsmd_get_channel_basepoints_reply,basepoints,basepoints, |
63 | msgdata,hsmd_get_channel_basepoints_reply,funding_pubkey,pubkey, |
64 | #include <common/channel_type.h> |
65 | # Provide channel parameters. |
66 | msgtype,hsmd_setup_channel,31 |
67 | msgdata,hsmd_setup_channel,is_outbound,bool, |
68 | msgdata,hsmd_setup_channel,channel_value,amount_sat, |
69 | msgdata,hsmd_setup_channel,push_value,amount_msat, |
70 | msgdata,hsmd_setup_channel,funding_txid,bitcoin_txid, |
71 | msgdata,hsmd_setup_channel,funding_txout,u16, |
72 | msgdata,hsmd_setup_channel,local_to_self_delay,u16, |
73 | msgdata,hsmd_setup_channel,local_shutdown_script_len,u16, |
74 | msgdata,hsmd_setup_channel,local_shutdown_script,u8,local_shutdown_script_len |
75 | msgdata,hsmd_setup_channel,local_shutdown_wallet_index,?u32, |
76 | msgdata,hsmd_setup_channel,remote_basepoints,basepoints, |
77 | msgdata,hsmd_setup_channel,remote_funding_pubkey,pubkey, |
78 | msgdata,hsmd_setup_channel,remote_to_self_delay,u16, |
79 | msgdata,hsmd_setup_channel,remote_shutdown_script_len,u16, |
80 | msgdata,hsmd_setup_channel,remote_shutdown_script,u8,remote_shutdown_script_len |
81 | msgdata,hsmd_setup_channel,channel_type,channel_type, |
82 | # No value returned., |
83 | msgtype,hsmd_setup_channel_reply,131 |
84 | # check if the signer agrees that a funding candidate outpoint is buried |
85 | msgtype,hsmd_check_outpoint,32 |
86 | msgdata,hsmd_check_outpoint,funding_txid,bitcoin_txid, |
87 | msgdata,hsmd_check_outpoint,funding_txout,u16, |
88 | msgtype,hsmd_check_outpoint_reply,132 |
89 | msgdata,hsmd_check_outpoint_reply,is_buried,bool, |
90 | # change the funding/splice state to locked |
91 | msgtype,hsmd_lock_outpoint,37 |
92 | msgdata,hsmd_lock_outpoint,funding_txid,bitcoin_txid, |
93 | msgdata,hsmd_lock_outpoint,funding_txout,u16, |
94 | # No value returned. |
95 | msgtype,hsmd_lock_outpoint_reply,137 |
96 | # Forget channel. |
97 | msgtype,hsmd_forget_channel,34 |
98 | msgdata,hsmd_forget_channel,id,node_id, |
99 | msgdata,hsmd_forget_channel,dbid,u64, |
100 | # No value returned. |
101 | msgtype,hsmd_forget_channel_reply,134 |
102 | # Return signature for a funding tx. |
103 | #include <common/utxo.h> |
104 | # Master asks the HSM to sign a node_announcement |
105 | msgtype,hsmd_node_announcement_sig_req,6 |
106 | msgdata,hsmd_node_announcement_sig_req,annlen,u16, |
107 | msgdata,hsmd_node_announcement_sig_req,announcement,u8,annlen |
108 | msgtype,hsmd_node_announcement_sig_reply,106 |
109 | msgdata,hsmd_node_announcement_sig_reply,signature,secp256k1_ecdsa_signature, |
110 | # Sign a withdrawal request |
111 | #include <bitcoin/psbt.h> |
112 | msgtype,hsmd_sign_withdrawal,7 |
113 | msgdata,hsmd_sign_withdrawal,num_inputs,u16, |
114 | msgdata,hsmd_sign_withdrawal,inputs,utxo,num_inputs |
115 | msgdata,hsmd_sign_withdrawal,psbt,wally_psbt, |
116 | msgtype,hsmd_sign_withdrawal_reply,107 |
117 | msgdata,hsmd_sign_withdrawal_reply,psbt,wally_psbt, |
118 | # Sign an invoice |
119 | msgtype,hsmd_sign_invoice,8 |
120 | msgdata,hsmd_sign_invoice,len,u16, |
121 | msgdata,hsmd_sign_invoice,u5bytes,u8,len |
122 | msgdata,hsmd_sign_invoice,hrplen,u16, |
123 | msgdata,hsmd_sign_invoice,hrp,u8,hrplen |
124 | msgtype,hsmd_sign_invoice_reply,108 |
125 | msgdata,hsmd_sign_invoice_reply,sig,secp256k1_ecdsa_recoverable_signature, |
126 | # Preapprove an invoice for payment |
127 | msgtype,hsmd_preapprove_invoice,38 |
128 | msgdata,hsmd_preapprove_invoice,invstring,wirestring, |
129 | # Result is true if approved, declined if false |
130 | msgtype,hsmd_preapprove_invoice_reply,138 |
131 | msgdata,hsmd_preapprove_invoice_reply,approved,bool, |
132 | # Preapprove a keysend payment |
133 | msgtype,hsmd_preapprove_keysend,39 |
134 | msgdata,hsmd_preapprove_keysend,destination,node_id, |
135 | msgdata,hsmd_preapprove_keysend,payment_hash,sha256, |
136 | msgdata,hsmd_preapprove_keysend,amount_msat,amount_msat, |
137 | # Result is true if approved, declined if false |
138 | msgtype,hsmd_preapprove_keysend_reply,139 |
139 | msgdata,hsmd_preapprove_keysend_reply,approved,bool, |
140 | msgtype,hsmd_preapprove_invoice_check,51 |
141 | msgdata,hsmd_preapprove_invoice_check,invstring,wirestring, |
142 | msgdata,hsmd_preapprove_invoice_check,check_only,bool, |
143 | # Result is true if approved, declined if false |
144 | msgtype,hsmd_preapprove_invoice_check_reply,151 |
145 | msgdata,hsmd_preapprove_invoice_check_reply,approved,bool, |
146 | msgtype,hsmd_preapprove_keysend_check,52 |
147 | msgdata,hsmd_preapprove_keysend_check,destination,node_id, |
148 | msgdata,hsmd_preapprove_keysend_check,payment_hash,sha256, |
149 | msgdata,hsmd_preapprove_keysend_check,amount_msat,amount_msat, |
150 | msgdata,hsmd_preapprove_keysend_check,check_only,bool, |
151 | # Result is true if approved, declined if false |
152 | msgtype,hsmd_preapprove_keysend_check_reply,152 |
153 | msgdata,hsmd_preapprove_keysend_check_reply,approved,bool, |
154 | # Give me ECDH(node-id-secret,point) |
155 | msgtype,hsmd_ecdh_req,1 |
156 | msgdata,hsmd_ecdh_req,point,pubkey, |
157 | msgtype,hsmd_ecdh_resp,100 |
158 | msgdata,hsmd_ecdh_resp,ss,secret, |
159 | msgtype,hsmd_cannouncement_sig_req,2 |
160 | msgdata,hsmd_cannouncement_sig_req,calen,u16, |
161 | msgdata,hsmd_cannouncement_sig_req,ca,u8,calen |
162 | msgtype,hsmd_cannouncement_sig_reply,102 |
163 | msgdata,hsmd_cannouncement_sig_reply,node_signature,secp256k1_ecdsa_signature, |
164 | msgdata,hsmd_cannouncement_sig_reply,bitcoin_signature,secp256k1_ecdsa_signature, |
165 | msgtype,hsmd_sign_any_cannouncement_req,4 |
166 | msgdata,hsmd_sign_any_cannouncement_req,calen,u16, |
167 | msgdata,hsmd_sign_any_cannouncement_req,ca,u8,calen |
168 | msgdata,hsmd_sign_any_cannouncement_req,peerid,node_id, |
169 | msgdata,hsmd_sign_any_cannouncement_req,channel_dbid,u64, |
170 | msgtype,hsmd_sign_any_cannouncement_reply,104 |
171 | msgdata,hsmd_sign_any_cannouncement_reply,node_signature,secp256k1_ecdsa_signature, |
172 | msgdata,hsmd_sign_any_cannouncement_reply,bitcoin_signature,secp256k1_ecdsa_signature, |
173 | msgtype,hsmd_cupdate_sig_req,3 |
174 | msgdata,hsmd_cupdate_sig_req,culen,u16, |
175 | msgdata,hsmd_cupdate_sig_req,cu,u8,culen |
176 | msgtype,hsmd_cupdate_sig_reply,103 |
177 | msgdata,hsmd_cupdate_sig_reply,culen,u16, |
178 | msgdata,hsmd_cupdate_sig_reply,cu,u8,culen |
179 | # Master asks HSM to sign a commitment transaction. |
180 | msgtype,hsmd_sign_commitment_tx,5 |
181 | msgdata,hsmd_sign_commitment_tx,peer_id,node_id, |
182 | msgdata,hsmd_sign_commitment_tx,channel_dbid,u64, |
183 | msgdata,hsmd_sign_commitment_tx,tx,bitcoin_tx, |
184 | msgdata,hsmd_sign_commitment_tx,remote_funding_key,pubkey, |
185 | msgdata,hsmd_sign_commitment_tx,commit_num,u64, |
186 | msgtype,hsmd_sign_commitment_tx_reply,105 |
187 | msgdata,hsmd_sign_commitment_tx_reply,sig,bitcoin_signature, |
188 | # Validate the counterparty's commitment signatures. |
189 | msgtype,hsmd_validate_commitment_tx,35 |
190 | msgdata,hsmd_validate_commitment_tx,tx,bitcoin_tx, |
191 | msgdata,hsmd_validate_commitment_tx,num_htlcs,u16, |
192 | msgdata,hsmd_validate_commitment_tx,htlcs,simple_htlc,num_htlcs |
193 | msgdata,hsmd_validate_commitment_tx,commit_num,u64, |
194 | msgdata,hsmd_validate_commitment_tx,feerate,u32, |
195 | msgdata,hsmd_validate_commitment_tx,sig,bitcoin_signature, |
196 | msgdata,hsmd_validate_commitment_tx,num_htlc_sigs,u16, |
197 | msgdata,hsmd_validate_commitment_tx,htlc_sigs,bitcoin_signature,num_htlc_sigs |
198 | msgtype,hsmd_validate_commitment_tx_reply,135 |
199 | msgdata,hsmd_validate_commitment_tx_reply,old_commitment_secret,?secret, |
200 | msgdata,hsmd_validate_commitment_tx_reply,next_per_commitment_point,pubkey, |
201 | # Revoke our local commitment, returns the revocation secret and next point |
202 | msgtype,hsmd_revoke_commitment_tx,40 |
203 | msgdata,hsmd_revoke_commitment_tx,commit_num,u64, |
204 | msgtype,hsmd_revoke_commitment_tx_reply,140 |
205 | msgdata,hsmd_revoke_commitment_tx_reply,old_commitment_secret,secret, |
206 | msgdata,hsmd_revoke_commitment_tx_reply,next_per_commitment_point,pubkey, |
207 | # Vaidate the counterparty's revocation secret |
208 | msgtype,hsmd_validate_revocation,36 |
209 | msgdata,hsmd_validate_revocation,revoke_num,u64, |
210 | msgdata,hsmd_validate_revocation,per_commitment_secret,secret, |
211 | # No value returned. |
212 | msgtype,hsmd_validate_revocation_reply,136 |
213 | # Onchaind asks HSM to sign a spend to-us. Four variants, since each set |
214 | # of keys is derived differently... |
215 | msgtype,hsmd_sign_delayed_payment_to_us,12 |
216 | msgdata,hsmd_sign_delayed_payment_to_us,commit_num,u64, |
217 | msgdata,hsmd_sign_delayed_payment_to_us,tx,bitcoin_tx, |
218 | msgdata,hsmd_sign_delayed_payment_to_us,wscript_len,u16, |
219 | msgdata,hsmd_sign_delayed_payment_to_us,wscript,u8,wscript_len |
220 | msgtype,hsmd_sign_remote_htlc_to_us,13 |
221 | msgdata,hsmd_sign_remote_htlc_to_us,remote_per_commitment_point,pubkey, |
222 | msgdata,hsmd_sign_remote_htlc_to_us,tx,bitcoin_tx, |
223 | msgdata,hsmd_sign_remote_htlc_to_us,wscript_len,u16, |
224 | msgdata,hsmd_sign_remote_htlc_to_us,wscript,u8,wscript_len |
225 | msgdata,hsmd_sign_remote_htlc_to_us,option_anchor_outputs,bool, |
226 | msgtype,hsmd_sign_penalty_to_us,14 |
227 | msgdata,hsmd_sign_penalty_to_us,revocation_secret,secret, |
228 | msgdata,hsmd_sign_penalty_to_us,tx,bitcoin_tx, |
229 | msgdata,hsmd_sign_penalty_to_us,wscript_len,u16, |
230 | msgdata,hsmd_sign_penalty_to_us,wscript,u8,wscript_len |
231 | # Onchaind asks HSM to sign a local HTLC success or HTLC timeout tx. |
232 | msgtype,hsmd_sign_local_htlc_tx,16 |
233 | msgdata,hsmd_sign_local_htlc_tx,commit_num,u64, |
234 | msgdata,hsmd_sign_local_htlc_tx,tx,bitcoin_tx, |
235 | msgdata,hsmd_sign_local_htlc_tx,wscript_len,u16, |
236 | msgdata,hsmd_sign_local_htlc_tx,wscript,u8,wscript_len |
237 | msgdata,hsmd_sign_local_htlc_tx,option_anchor_outputs,bool, |
238 | # Openingd/channeld asks HSM to sign the other sides' commitment tx. |
239 | #include <common/htlc_wire.h> |
240 | msgtype,hsmd_sign_remote_commitment_tx,19 |
241 | msgdata,hsmd_sign_remote_commitment_tx,tx,bitcoin_tx, |
242 | msgdata,hsmd_sign_remote_commitment_tx,remote_funding_key,pubkey, |
243 | msgdata,hsmd_sign_remote_commitment_tx,remote_per_commit,pubkey, |
244 | msgdata,hsmd_sign_remote_commitment_tx,option_static_remotekey,bool, |
245 | msgdata,hsmd_sign_remote_commitment_tx,commit_num,u64, |
246 | msgdata,hsmd_sign_remote_commitment_tx,num_htlcs,u16, |
247 | msgdata,hsmd_sign_remote_commitment_tx,htlcs,simple_htlc,num_htlcs |
248 | msgdata,hsmd_sign_remote_commitment_tx,feerate,u32, |
249 | # channeld asks HSM to sign remote HTLC tx. |
250 | msgtype,hsmd_sign_remote_htlc_tx,20 |
251 | msgdata,hsmd_sign_remote_htlc_tx,tx,bitcoin_tx, |
252 | msgdata,hsmd_sign_remote_htlc_tx,len,u16, |
253 | msgdata,hsmd_sign_remote_htlc_tx,wscript,u8,len |
254 | msgdata,hsmd_sign_remote_htlc_tx,remote_per_commit_point,pubkey, |
255 | msgdata,hsmd_sign_remote_htlc_tx,option_anchor_outputs,bool, |
256 | # closingd asks HSM to sign mutual close tx. |
257 | msgtype,hsmd_sign_mutual_close_tx,21 |
258 | msgdata,hsmd_sign_mutual_close_tx,tx,bitcoin_tx, |
259 | msgdata,hsmd_sign_mutual_close_tx,remote_funding_key,pubkey, |
260 | # channeld asks HSM to sign splice tx. |
261 | msgtype,hsmd_sign_splice_tx,29 |
262 | msgdata,hsmd_sign_splice_tx,tx,bitcoin_tx, |
263 | msgdata,hsmd_sign_splice_tx,remote_funding_key,pubkey, |
264 | msgdata,hsmd_sign_splice_tx,input_index,u32, |
265 | # Reply for all the above requests. |
266 | msgtype,hsmd_sign_tx_reply,112 |
267 | msgdata,hsmd_sign_tx_reply,sig,bitcoin_signature, |
268 | # Openingd/channeld/onchaind asks for Nth per_commitment_point |
269 | # Prior to HSM_VERSION 6 we will return an old_commitment_secret |
270 | msgtype,hsmd_get_per_commitment_point,18 |
271 | msgdata,hsmd_get_per_commitment_point,n,u64, |
272 | # IMPORTANT - Beginning HSM_VERSION 6 we never return an old_commitment_secret |
273 | msgtype,hsmd_get_per_commitment_point_reply,118 |
274 | msgdata,hsmd_get_per_commitment_point_reply,per_commitment_point,pubkey, |
275 | msgdata,hsmd_get_per_commitment_point_reply,old_commitment_secret,?secret, |
276 | # master -> hsmd: do you have a memleak? |
277 | msgtype,hsmd_dev_memleak,33 |
278 | msgtype,hsmd_dev_memleak_reply,133 |
279 | msgdata,hsmd_dev_memleak_reply,leak,bool, |
280 | # channeld asks to check if claimed future commitment_secret is correct. |
281 | msgtype,hsmd_check_future_secret,22 |
282 | msgdata,hsmd_check_future_secret,n,u64, |
283 | msgdata,hsmd_check_future_secret,commitment_secret,secret, |
284 | msgtype,hsmd_check_future_secret_reply,122 |
285 | msgdata,hsmd_check_future_secret_reply,correct,bool, |
286 | # lightningd asks us to sign a string. |
287 | msgtype,hsmd_sign_message,23 |
288 | msgdata,hsmd_sign_message,len,u16, |
289 | msgdata,hsmd_sign_message,msg,u8,len |
290 | msgtype,hsmd_sign_message_reply,123 |
291 | msgdata,hsmd_sign_message_reply,sig,secp256k1_ecdsa_recoverable_signature, |
292 | # lightningd needs to get a scriptPubkey for a utxo with closeinfo |
293 | msgtype,hsmd_get_output_scriptpubkey,24 |
294 | msgdata,hsmd_get_output_scriptpubkey,channel_id,u64, |
295 | msgdata,hsmd_get_output_scriptpubkey,peer_id,node_id, |
296 | msgdata,hsmd_get_output_scriptpubkey,commitment_point,?pubkey, |
297 | msgtype,hsmd_get_output_scriptpubkey_reply,124 |
298 | msgdata,hsmd_get_output_scriptpubkey_reply,script_len,u16, |
299 | msgdata,hsmd_get_output_scriptpubkey_reply,script,u8,script_len |
300 | # Sign a bolt12-style merkle hash |
301 | msgtype,hsmd_sign_bolt12,25 |
302 | msgdata,hsmd_sign_bolt12,messagename,wirestring, |
303 | msgdata,hsmd_sign_bolt12,fieldname,wirestring, |
304 | msgdata,hsmd_sign_bolt12,merkleroot,sha256, |
305 | # This is for invreq payer_id (temporary keys) |
306 | msgdata,hsmd_sign_bolt12,publictweaklen,u16, |
307 | msgdata,hsmd_sign_bolt12,publictweak,u8,publictweaklen |
308 | msgtype,hsmd_sign_bolt12_reply,125 |
309 | msgdata,hsmd_sign_bolt12_reply,sig,bip340sig, |
310 | # Sign a bolt12-style merkle hash (modern) |
311 | msgtype,hsmd_sign_bolt12_2,41 |
312 | msgdata,hsmd_sign_bolt12_2,messagename,wirestring, |
313 | msgdata,hsmd_sign_bolt12_2,fieldname,wirestring, |
314 | msgdata,hsmd_sign_bolt12_2,merkleroot,sha256, |
315 | # This is for signing with an alias (temporary key), used if *publictweak* not empty. |
316 | # derive_secret with info, then tweak privkey with SHA256(derived_secret || publictweak). |
317 | msgdata,hsmd_sign_bolt12_2,infolen,u16, |
318 | msgdata,hsmd_sign_bolt12_2,info,u8,infolen |
319 | msgdata,hsmd_sign_bolt12_2,publictweaklen,u16, |
320 | msgdata,hsmd_sign_bolt12_2,publictweak,u8,publictweaklen |
321 | msgtype,hsmd_sign_bolt12_2_reply,141 |
322 | msgdata,hsmd_sign_bolt12_2_reply,sig,bip340sig, |
323 | # Sign an option_will_fund offer hash |
324 | msgtype,hsmd_sign_option_will_fund_offer,26 |
325 | msgdata,hsmd_sign_option_will_fund_offer,funding_pubkey,pubkey, |
326 | msgdata,hsmd_sign_option_will_fund_offer,blockheight,u32, |
327 | msgdata,hsmd_sign_option_will_fund_offer,channel_fee_base_max_msat,u32, |
328 | msgdata,hsmd_sign_option_will_fund_offer,channel_fee_proportional_basis_max,u16, |
329 | msgtype,hsmd_sign_option_will_fund_offer_reply,126 |
330 | msgdata,hsmd_sign_option_will_fund_offer_reply,rsig,secp256k1_ecdsa_signature, |
331 | # Derive pseudorandom secret |
332 | msgtype,hsmd_derive_secret,27 |
333 | msgdata,hsmd_derive_secret,len,u16, |
334 | msgdata,hsmd_derive_secret,info,u8,len |
335 | # Reply with the derived secret |
336 | msgtype,hsmd_derive_secret_reply,127 |
337 | msgdata,hsmd_derive_secret_reply,secret,secret, |
338 | # Sanity check this pubkey derivation is correct (unhardened only) |
339 | msgtype,hsmd_check_pubkey,28 |
340 | msgdata,hsmd_check_pubkey,index,u32, |
341 | msgdata,hsmd_check_pubkey,pubkey,pubkey, |
342 | # Reply |
343 | msgtype,hsmd_check_pubkey_reply,128 |
344 | msgdata,hsmd_check_pubkey_reply,ok,bool, |
345 | msgtype,hsmd_sign_anchorspend,147 |
346 | msgdata,hsmd_sign_anchorspend,peerid,node_id, |
347 | msgdata,hsmd_sign_anchorspend,channel_dbid,u64, |
348 | msgdata,hsmd_sign_anchorspend,num_inputs,u16, |
349 | msgdata,hsmd_sign_anchorspend,inputs,utxo,num_inputs |
350 | msgdata,hsmd_sign_anchorspend,psbt,wally_psbt, |
351 | msgtype,hsmd_sign_anchorspend_reply,148 |
352 | msgdata,hsmd_sign_anchorspend_reply,psbt,wally_psbt, |
353 | # These are where lightningd asks for signatures on onchaind's behalf. |
354 | msgtype,hsmd_sign_any_delayed_payment_to_us,142 |
355 | msgdata,hsmd_sign_any_delayed_payment_to_us,commit_num,u64, |
356 | msgdata,hsmd_sign_any_delayed_payment_to_us,tx,bitcoin_tx, |
357 | msgdata,hsmd_sign_any_delayed_payment_to_us,wscript_len,u16, |
358 | msgdata,hsmd_sign_any_delayed_payment_to_us,wscript,u8,wscript_len |
359 | msgdata,hsmd_sign_any_delayed_payment_to_us,input,u32, |
360 | msgdata,hsmd_sign_any_delayed_payment_to_us,peerid,node_id, |
361 | msgdata,hsmd_sign_any_delayed_payment_to_us,channel_dbid,u64, |
362 | msgtype,hsmd_sign_any_remote_htlc_to_us,143 |
363 | msgdata,hsmd_sign_any_remote_htlc_to_us,remote_per_commitment_point,pubkey, |
364 | msgdata,hsmd_sign_any_remote_htlc_to_us,tx,bitcoin_tx, |
365 | msgdata,hsmd_sign_any_remote_htlc_to_us,wscript_len,u16, |
366 | msgdata,hsmd_sign_any_remote_htlc_to_us,wscript,u8,wscript_len |
367 | msgdata,hsmd_sign_any_remote_htlc_to_us,option_anchor_outputs,bool, |
368 | msgdata,hsmd_sign_any_remote_htlc_to_us,input,u32, |
369 | msgdata,hsmd_sign_any_remote_htlc_to_us,peerid,node_id, |
370 | msgdata,hsmd_sign_any_remote_htlc_to_us,channel_dbid,u64, |
371 | msgtype,hsmd_sign_any_penalty_to_us,144 |
372 | msgdata,hsmd_sign_any_penalty_to_us,revocation_secret,secret, |
373 | msgdata,hsmd_sign_any_penalty_to_us,tx,bitcoin_tx, |
374 | msgdata,hsmd_sign_any_penalty_to_us,wscript_len,u16, |
375 | msgdata,hsmd_sign_any_penalty_to_us,wscript,u8,wscript_len |
376 | msgdata,hsmd_sign_any_penalty_to_us,input,u32, |
377 | msgdata,hsmd_sign_any_penalty_to_us,peerid,node_id, |
378 | msgdata,hsmd_sign_any_penalty_to_us,channel_dbid,u64, |
379 | msgtype,hsmd_sign_any_local_htlc_tx,146 |
380 | msgdata,hsmd_sign_any_local_htlc_tx,commit_num,u64, |
381 | msgdata,hsmd_sign_any_local_htlc_tx,tx,bitcoin_tx, |
382 | msgdata,hsmd_sign_any_local_htlc_tx,wscript_len,u16, |
383 | msgdata,hsmd_sign_any_local_htlc_tx,wscript,u8,wscript_len |
384 | msgdata,hsmd_sign_any_local_htlc_tx,option_anchor_outputs,bool, |
385 | msgdata,hsmd_sign_any_local_htlc_tx,input,u32, |
386 | msgdata,hsmd_sign_any_local_htlc_tx,peerid,node_id, |
387 | msgdata,hsmd_sign_any_local_htlc_tx,channel_dbid,u64, |
388 | msgtype,hsmd_sign_htlc_tx_mingle,149 |
389 | msgdata,hsmd_sign_htlc_tx_mingle,peerid,node_id, |
390 | msgdata,hsmd_sign_htlc_tx_mingle,channel_dbid,u64, |
391 | msgdata,hsmd_sign_htlc_tx_mingle,num_inputs,u16, |
392 | msgdata,hsmd_sign_htlc_tx_mingle,inputs,utxo,num_inputs |
393 | msgdata,hsmd_sign_htlc_tx_mingle,psbt,wally_psbt, |
394 | msgtype,hsmd_sign_htlc_tx_mingle_reply,150 |
395 | msgdata,hsmd_sign_htlc_tx_mingle_reply,psbt,wally_psbt, |