| 29 | #define ERROR_TERM 7 |
| 30 | |
| 31 | static void show_usage(const char *progname) |
| 32 | { |
| 33 | printf("%s <method> [arguments]\n", progname); |
| 34 | printf("methods:\n"); |
| 35 | printf(" - decrypt <path/to/hsm_secret>\n"); |
| 36 | printf(" - encrypt <path/to/hsm_secret>\n"); |
| 37 | printf(" - dumpcommitments <node id> <channel dbid> <depth> " |
| 38 | "<path/to/hsm_secret>\n"); |
| 39 | printf(" - guesstoremote <P2WPKH address> <node id> <tries> " |
| 40 | "<path/to/hsm_secret>\n"); |
| 41 | printf(" - generatehsm <path/to/new/hsm_secret>\n"); |
| 42 | printf(" - checkhsm <path/to/new/hsm_secret>\n"); |
| 43 | printf(" - dumponchaindescriptors <path/to/hsm_secret> [network]\n"); |
| 44 | exit(0); |
| 45 | } |
| 46 | |
| 47 | static bool ensure_hsm_secret_exists(int fd, const char *path) |
| 48 | { |