2017-03-10 11:49:43 +01:00
|
|
|
# Clients should not give a bad request but not the HSM's decision to crash.
|
|
|
|
hsmstatus_client_bad_request,1000
|
2017-10-22 15:32:46 +02:00
|
|
|
hsmstatus_client_bad_request,,id,struct pubkey
|
2017-09-28 05:41:19 +02:00
|
|
|
hsmstatus_client_bad_request,,len,u16
|
2017-05-25 04:16:04 +02:00
|
|
|
hsmstatus_client_bad_request,,msg,len*u8
|
2017-03-10 11:49:43 +01:00
|
|
|
|
|
|
|
# Start the HSM.
|
|
|
|
hsmctl_init,1
|
2017-05-25 04:16:04 +02:00
|
|
|
hsmctl_init,,new,bool
|
2017-03-10 11:49:43 +01:00
|
|
|
|
2017-08-28 18:05:01 +02:00
|
|
|
#include <common/bip32.h>
|
2017-03-10 11:49:43 +01:00
|
|
|
hsmctl_init_reply,101
|
2017-09-28 05:41:19 +02:00
|
|
|
hsmctl_init_reply,,node_id,struct pubkey
|
2017-05-25 04:16:04 +02:00
|
|
|
hsmctl_init_reply,,peer_seed,struct secret
|
2017-08-18 06:43:52 +02:00
|
|
|
hsmctl_init_reply,,bip32,struct ext_key
|
2017-03-10 11:49:43 +01:00
|
|
|
|
2017-10-22 15:32:46 +02:00
|
|
|
# ECDH returns an fd (for gossipd to do handshake)
|
2017-03-10 11:49:43 +01:00
|
|
|
hsmctl_hsmfd_ecdh,3
|
|
|
|
|
|
|
|
# No contents, just an fd.
|
|
|
|
hsmctl_hsmfd_ecdh_fd_reply,103
|
|
|
|
|
|
|
|
# Return signature for a funding tx.
|
2017-08-28 18:05:01 +02:00
|
|
|
#include <common/utxo.h>
|
2017-03-10 11:49:43 +01:00
|
|
|
# FIXME: This should also take their commit sig & details, to verify.
|
|
|
|
hsmctl_sign_funding,4
|
2017-09-28 05:41:19 +02:00
|
|
|
hsmctl_sign_funding,,satoshi_out,u64
|
|
|
|
hsmctl_sign_funding,,change_out,u64
|
|
|
|
hsmctl_sign_funding,,change_keyindex,u32
|
|
|
|
hsmctl_sign_funding,,our_pubkey,struct pubkey
|
|
|
|
hsmctl_sign_funding,,their_pubkey,struct pubkey
|
|
|
|
hsmctl_sign_funding,,num_inputs,u16
|
2017-05-25 04:16:04 +02:00
|
|
|
hsmctl_sign_funding,,inputs,num_inputs*struct utxo
|
2017-03-10 11:49:43 +01:00
|
|
|
|
|
|
|
hsmctl_sign_funding_reply,104
|
2017-09-28 05:41:19 +02:00
|
|
|
hsmctl_sign_funding_reply,,num_sigs,u16
|
2017-05-25 04:16:04 +02:00
|
|
|
hsmctl_sign_funding_reply,,sig,num_sigs*secp256k1_ecdsa_signature
|
2017-03-10 11:49:43 +01:00
|
|
|
|
2017-04-03 02:10:24 +02:00
|
|
|
# Request a client socket for a `channeld`, allows signing announcements
|
|
|
|
hsmctl_hsmfd_channeld,5
|
2017-10-22 15:32:46 +02:00
|
|
|
hsmctl_hsmfd_channeld,,id,struct pubkey
|
2017-03-10 11:49:43 +01:00
|
|
|
|
2017-04-03 02:10:24 +02:00
|
|
|
# Empty reply, just an fd
|
2017-05-06 04:19:44 +02:00
|
|
|
hsmctl_hsmfd_channeld_reply,105
|
2017-05-07 01:59:48 +02:00
|
|
|
|
|
|
|
# Master asks the HSM to sign a node_announcement
|
|
|
|
hsmctl_node_announcement_sig_req,6
|
2017-09-28 05:41:19 +02:00
|
|
|
hsmctl_node_announcement_sig_req,,annlen,u16
|
2017-05-25 04:16:04 +02:00
|
|
|
hsmctl_node_announcement_sig_req,,announcement,annlen*u8
|
2017-05-07 01:59:48 +02:00
|
|
|
|
|
|
|
hsmctl_node_announcement_sig_reply,106
|
2017-05-25 04:16:04 +02:00
|
|
|
hsmctl_node_announcement_sig_reply,,signature,secp256k1_ecdsa_signature
|
2017-06-20 16:50:19 +02:00
|
|
|
|
|
|
|
# Sign a withdrawal request
|
|
|
|
hsmctl_sign_withdrawal,7
|
2017-09-28 05:41:19 +02:00
|
|
|
hsmctl_sign_withdrawal,,satoshi_out,u64
|
|
|
|
hsmctl_sign_withdrawal,,change_out,u64
|
|
|
|
hsmctl_sign_withdrawal,,change_keyindex,u32
|
2017-06-20 16:50:19 +02:00
|
|
|
hsmctl_sign_withdrawal,,pkh,20*u8
|
2017-09-28 05:41:19 +02:00
|
|
|
hsmctl_sign_withdrawal,,num_inputs,u16
|
2017-06-20 16:50:19 +02:00
|
|
|
hsmctl_sign_withdrawal,,inputs,num_inputs*struct utxo
|
|
|
|
|
|
|
|
hsmctl_sign_withdrawal_reply,107
|
2017-09-28 05:41:19 +02:00
|
|
|
hsmctl_sign_withdrawal_reply,,num_sigs,u16
|
2017-06-20 16:50:19 +02:00
|
|
|
hsmctl_sign_withdrawal_reply,,sig,num_sigs*secp256k1_ecdsa_signature
|