-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.cpp
More file actions
36 lines (29 loc) · 921 Bytes
/
main.cpp
File metadata and controls
36 lines (29 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) 2023 barrystyle
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <bip32.h>
#include <bip39.h>
#include <btc/bip32.h>
#include <btc/utils.h>
#include <ios>
#include <iomanip>
bool ecc_started{false};
extern "C" {
void btc_ecc_start();
void btc_ecc_stop();
}
int main()
{
if (!ecc_started) {
btc_ecc_start();
ecc_started = true;
}
std::vector<std::string> p2khlist;
std::string path = "m/44'/0'/0'/0/";
std::string phrase = "time decade that over find among shift civil world what six mother father frequent people this gold exchange main room where hidden trap day";
mnemonic_to_p2kh(phrase, path, 0, 20, p2khlist);
for (int i=0; i<p2khlist.size(); i++) {
printf("%s%d - %s\n", path.c_str(), i, p2khlist[i].c_str());
}
return 1;
}