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