-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Open the file secp256k1_lib.cpp and go to line 187. Change:
cpp
pk = Secp256K1::DecodePrivateKey2(wif);
to:
cpp
pk = Secp256K1::DecodePrivateKey(wif);
Also check the function signature:
Looking at the header, the function signature is:
cpp
static Int DecodePrivateKey(char *key, bool *compressed);
It expects a second parameter bool *compressed to return whether the key is compressed. You'll need to update the function call to match this signature.
In secp256k1_lib.cpp, find the wif_to_privatekey function and modify it:
cpp
void wif_to_privatekey(char* wif, unsigned char* pk) {
bool compressed;
Int privKey = Secp256K1::DecodePrivateKey(wif, &compressed);
privKey.Get32Bytes(pk);
}
You may also want to handle the compressed flag if needed for your application.
After making these changes, run make again and it should compile successfully.