MCPcopy Create free account
hub / github.com/ElementsProject/lightning / get_mnemonic

Function get_mnemonic

tools/hsmtool.c:461–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459}
460
461static void get_mnemonic(char *mnemonic) {
462 char *line = NULL;
463 size_t line_size = 0;
464
465 printf("Introduce your BIP39 word list separated by space (at least 12 words):\n");
466 fflush(stdout);
467 size_t characters = getline(&line, &line_size, stdin);
468 if (characters < 0)
469 errx(ERROR_USAGE, "Could not read line from stdin.");
470 line[characters-1] = '\0';
471 strcpy(mnemonic, line);
472 free(line);
473}
474
475static void read_mnemonic(char *mnemonic) {
476 /* Get words for the mnemonic language */

Callers 1

read_mnemonicFunction · 0.85

Calls 1

errxFunction · 0.85

Tested by

no test coverage detected