rgb-cln/hsmd/hsm_wire.csv

2.3 KiB

1# Clients should not give a bad request but not the HSM's decision to crash.
2hsmstatus_client_bad_request,1000
3hsmstatus_client_bad_request,,id,struct pubkey
4hsmstatus_client_bad_request,,len,u16
5hsmstatus_client_bad_request,,msg,len*u8
6# Start the HSM.
7hsmctl_init,1
8hsmctl_init,,new,bool
9#include <common/bip32.h>
10hsmctl_init_reply,101
11hsmctl_init_reply,,node_id,struct pubkey
12hsmctl_init_reply,,peer_seed,struct secret
13hsmctl_init_reply,,bip32,struct ext_key
14# ECDH returns an fd (for gossipd to do handshake)
15hsmctl_hsmfd_ecdh,3
16# No contents, just an fd.
17hsmctl_hsmfd_ecdh_fd_reply,103
18# Return signature for a funding tx.
19#include <common/utxo.h>
20# FIXME: This should also take their commit sig & details, to verify.
21hsmctl_sign_funding,4
22hsmctl_sign_funding,,satoshi_out,u64
23hsmctl_sign_funding,,change_out,u64
24hsmctl_sign_funding,,change_keyindex,u32
25hsmctl_sign_funding,,our_pubkey,struct pubkey
26hsmctl_sign_funding,,their_pubkey,struct pubkey
27hsmctl_sign_funding,,num_inputs,u16
28hsmctl_sign_funding,,inputs,num_inputs*struct utxo
29hsmctl_sign_funding_reply,104
30hsmctl_sign_funding_reply,,num_sigs,u16
31hsmctl_sign_funding_reply,,sig,num_sigs*secp256k1_ecdsa_signature
32# Request a client socket for a `channeld`, allows signing announcements
33hsmctl_hsmfd_channeld,5
34hsmctl_hsmfd_channeld,,id,struct pubkey
35# Empty reply, just an fd
36hsmctl_hsmfd_channeld_reply,105
37# Master asks the HSM to sign a node_announcement
38hsmctl_node_announcement_sig_req,6
39hsmctl_node_announcement_sig_req,,annlen,u16
40hsmctl_node_announcement_sig_req,,announcement,annlen*u8
41hsmctl_node_announcement_sig_reply,106
42hsmctl_node_announcement_sig_reply,,signature,secp256k1_ecdsa_signature
43# Sign a withdrawal request
44hsmctl_sign_withdrawal,7
45hsmctl_sign_withdrawal,,satoshi_out,u64
46hsmctl_sign_withdrawal,,change_out,u64
47hsmctl_sign_withdrawal,,change_keyindex,u32
48hsmctl_sign_withdrawal,,pkh,20*u8
49hsmctl_sign_withdrawal,,num_inputs,u16
50hsmctl_sign_withdrawal,,inputs,num_inputs*struct utxo
51hsmctl_sign_withdrawal_reply,107
52hsmctl_sign_withdrawal_reply,,num_sigs,u16
53hsmctl_sign_withdrawal_reply,,sig,num_sigs*secp256k1_ecdsa_signature
54# Sign an invoice
55hsmctl_sign_invoice,8
56hsmctl_sign_invoice,,len,u16
57hsmctl_sign_invoice,,u5bytes,len*u8
58hsmctl_sign_invoice,,hrplen,u16
59hsmctl_sign_invoice,,hrp,hrplen*u8
60hsmctl_sign_invoice_reply,108
61hsmctl_sign_invoice_reply,,sig,secp256k1_ecdsa_recoverable_signature