You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.2 KiB
74 lines
2.2 KiB
8 years ago
|
# These are fatal.
|
||
|
hsmstatus_init_failed,0x8000
|
||
|
hsmstatus_writemsg_failed,0x8001
|
||
|
hsmstatus_bad_request,0x8002
|
||
|
hsmstatus_fd_failed,0x8003
|
||
|
hsmstatus_key_failed,0x8004
|
||
|
|
||
|
# Clients should not give a bad request but not the HSM's decision to crash.
|
||
|
hsmstatus_client_bad_request,1000
|
||
8 years ago
|
hsmstatus_client_bad_request,,unique_id,8
|
||
|
hsmstatus_client_bad_request,,len,2
|
||
|
hsmstatus_client_bad_request,,msg,len*u8
|
||
8 years ago
|
|
||
|
# Start the HSM.
|
||
|
hsmctl_init,1
|
||
8 years ago
|
hsmctl_init,,new,bool
|
||
8 years ago
|
|
||
8 years ago
|
#include <common/bip32.h>
|
||
8 years ago
|
hsmctl_init_reply,101
|
||
8 years ago
|
hsmctl_init_reply,,node_id,33
|
||
|
hsmctl_init_reply,,peer_seed,struct secret
|
||
8 years ago
|
hsmctl_init_reply,,bip32,struct ext_key
|
||
8 years ago
|
|
||
|
# ECDH returns an fd.
|
||
|
hsmctl_hsmfd_ecdh,3
|
||
8 years ago
|
hsmctl_hsmfd_ecdh,,unique_id,8
|
||
8 years ago
|
|
||
|
# No contents, just an fd.
|
||
|
hsmctl_hsmfd_ecdh_fd_reply,103
|
||
|
|
||
|
# Return signature for a funding tx.
|
||
8 years ago
|
#include <common/utxo.h>
|
||
8 years ago
|
# FIXME: This should also take their commit sig & details, to verify.
|
||
|
hsmctl_sign_funding,4
|
||
8 years ago
|
hsmctl_sign_funding,,satoshi_out,8
|
||
|
hsmctl_sign_funding,,change_out,8
|
||
|
hsmctl_sign_funding,,change_keyindex,4
|
||
|
hsmctl_sign_funding,,our_pubkey,33
|
||
|
hsmctl_sign_funding,,their_pubkey,33
|
||
|
hsmctl_sign_funding,,num_inputs,2
|
||
|
hsmctl_sign_funding,,inputs,num_inputs*struct utxo
|
||
8 years ago
|
|
||
|
hsmctl_sign_funding_reply,104
|
||
8 years ago
|
hsmctl_sign_funding_reply,,num_sigs,2
|
||
|
hsmctl_sign_funding_reply,,sig,num_sigs*secp256k1_ecdsa_signature
|
||
8 years ago
|
|
||
8 years ago
|
# Request a client socket for a `channeld`, allows signing announcements
|
||
|
hsmctl_hsmfd_channeld,5
|
||
8 years ago
|
hsmctl_hsmfd_channeld,,unique_id,8
|
||
8 years ago
|
|
||
8 years ago
|
# Empty reply, just an fd
|
||
8 years ago
|
hsmctl_hsmfd_channeld_reply,105
|
||
8 years ago
|
|
||
|
# Master asks the HSM to sign a node_announcement
|
||
|
hsmctl_node_announcement_sig_req,6
|
||
8 years ago
|
hsmctl_node_announcement_sig_req,,annlen,2
|
||
|
hsmctl_node_announcement_sig_req,,announcement,annlen*u8
|
||
8 years ago
|
|
||
|
hsmctl_node_announcement_sig_reply,106
|
||
8 years ago
|
hsmctl_node_announcement_sig_reply,,signature,secp256k1_ecdsa_signature
|
||
8 years ago
|
|
||
|
# Sign a withdrawal request
|
||
|
hsmctl_sign_withdrawal,7
|
||
|
hsmctl_sign_withdrawal,,satoshi_out,8
|
||
|
hsmctl_sign_withdrawal,,change_out,8
|
||
|
hsmctl_sign_withdrawal,,change_keyindex,4
|
||
|
hsmctl_sign_withdrawal,,pkh,20*u8
|
||
|
hsmctl_sign_withdrawal,,num_inputs,2
|
||
|
hsmctl_sign_withdrawal,,inputs,num_inputs*struct utxo
|
||
|
|
||
|
hsmctl_sign_withdrawal_reply,107
|
||
|
hsmctl_sign_withdrawal_reply,,num_sigs,2
|
||
|
hsmctl_sign_withdrawal_reply,,sig,num_sigs*secp256k1_ecdsa_signature
|