mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
f765e0e846
Neater than using a u8 array as we do now. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2.2 KiB
2.2 KiB
1 | # These are fatal. |
---|---|
2 | hsmstatus_init_failed,0x8000 |
3 | hsmstatus_writemsg_failed,0x8001 |
4 | hsmstatus_bad_request,0x8002 |
5 | hsmstatus_fd_failed,0x8003 |
6 | hsmstatus_key_failed,0x8004 |
7 | # Clients should not give a bad request but not the HSM's decision to crash. |
8 | hsmstatus_client_bad_request,1000 |
9 | hsmstatus_client_bad_request,,unique_id,8 |
10 | hsmstatus_client_bad_request,,len,2 |
11 | hsmstatus_client_bad_request,,msg,len*u8 |
12 | # Start the HSM. |
13 | hsmctl_init,1 |
14 | hsmctl_init,,new,bool |
15 | #include <lightningd/bip32.h> |
16 | hsmctl_init_reply,101 |
17 | hsmctl_init_reply,,node_id,33 |
18 | hsmctl_init_reply,,peer_seed,struct secret |
19 | hsmctl_init_reply,,bip32,struct ext_key |
20 | # ECDH returns an fd. |
21 | hsmctl_hsmfd_ecdh,3 |
22 | hsmctl_hsmfd_ecdh,,unique_id,8 |
23 | # No contents, just an fd. |
24 | hsmctl_hsmfd_ecdh_fd_reply,103 |
25 | # Return signature for a funding tx. |
26 | #include <lightningd/utxo.h> |
27 | # FIXME: This should also take their commit sig & details, to verify. |
28 | hsmctl_sign_funding,4 |
29 | hsmctl_sign_funding,,satoshi_out,8 |
30 | hsmctl_sign_funding,,change_out,8 |
31 | hsmctl_sign_funding,,change_keyindex,4 |
32 | hsmctl_sign_funding,,our_pubkey,33 |
33 | hsmctl_sign_funding,,their_pubkey,33 |
34 | hsmctl_sign_funding,,num_inputs,2 |
35 | hsmctl_sign_funding,,inputs,num_inputs*struct utxo |
36 | hsmctl_sign_funding_reply,104 |
37 | hsmctl_sign_funding_reply,,num_sigs,2 |
38 | hsmctl_sign_funding_reply,,sig,num_sigs*secp256k1_ecdsa_signature |
39 | # Request a client socket for a `channeld`, allows signing announcements |
40 | hsmctl_hsmfd_channeld,5 |
41 | hsmctl_hsmfd_channeld,,unique_id,8 |
42 | # Empty reply, just an fd |
43 | hsmctl_hsmfd_channeld_reply,105 |
44 | # Master asks the HSM to sign a node_announcement |
45 | hsmctl_node_announcement_sig_req,6 |
46 | hsmctl_node_announcement_sig_req,,annlen,2 |
47 | hsmctl_node_announcement_sig_req,,announcement,annlen*u8 |
48 | hsmctl_node_announcement_sig_reply,106 |
49 | hsmctl_node_announcement_sig_reply,,signature,secp256k1_ecdsa_signature |
50 | # Sign a withdrawal request |
51 | hsmctl_sign_withdrawal,7 |
52 | hsmctl_sign_withdrawal,,satoshi_out,8 |
53 | hsmctl_sign_withdrawal,,change_out,8 |
54 | hsmctl_sign_withdrawal,,change_keyindex,4 |
55 | hsmctl_sign_withdrawal,,pkh,20*u8 |
56 | hsmctl_sign_withdrawal,,num_inputs,2 |
57 | hsmctl_sign_withdrawal,,inputs,num_inputs*struct utxo |
58 | hsmctl_sign_withdrawal_reply,107 |
59 | hsmctl_sign_withdrawal_reply,,num_sigs,2 |
60 | hsmctl_sign_withdrawal_reply,,sig,num_sigs*secp256k1_ecdsa_signature |