forked from Zondax/filecoin-signing-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.java
25 lines (22 loc) · 828 Bytes
/
Main.java
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
import ch.zondax.FilecoinSigner;
class Main {
public static void main(String[] args) {
long error = FilecoinSigner.errorNew();
long extendedKey = FilecoinSigner.keyDerive(
"equip will roof matter pink blind book anxiety banner elbow sun young",
"m/44'/461'/0/0/0",
"",
"en",
error
);
if (FilecoinSigner.errorCode(error) != 0) {
System.err.println(FilecoinSigner.errorMessage(error));
}
else {
String privateKey = FilecoinSigner.extendedKeyPrivateKey(extendedKey, error);
assert privateKey.equals("f15716d3b003b304b8055d9cc62e6b9c869d56cc930c3858d4d7c31f5f53f14a");
}
FilecoinSigner.extendedKeyFree(extendedKey);
FilecoinSigner.errorFree(error);
}
}