Files
palladum-lightning/hsmd/hsmd_wire.csv
Sangbida Chaudhuri 32bb0ed20e hsmd_wire: remove hsmd_derive_bip86_key and add it to hsmd_init_reply_v4
Instead of having a separate field to derive the bip86 base key, we return it in the hsmd init reply once we know that the hsm_secret is of mnemonic type
2025-10-26 12:37:58 +10:30

20 KiB

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