You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
By default, C API is not accessible any more. Your mentioning recover_key with 5 arguments is C API (considered as low-level interface and not recommended to be called directly), so it becomes hidden. You need to set your build configuration manually or use the following C++ API with 2 arguments (recommended way).
I'm trying to add ECDSA signature verification to my contract.
However, using the example ECDSA from 3 years ago doesn't seem to work anymore. There are tons of errors I'm getting but this is one of the errors:
error: too many arguments to function call, expected 2, have 5 auto n = eosio::recover_key(&digest, (char *)&sig, sizeof(sig), pub, 34);
I checked the API and it does say that there should be 5 parameters but the compiler seems to be only expecting 2. Any suggestions?
My contract code (referenced):
`///@abi action
void ecrecover(std::string data, const signature &sig)
{
std::string tmp;
checksum256 digest;
sha256(&data[0], data.size(), &digest);
}
///@abi action
void ecverify(std::string data, const signature &sig, const public_key &pk)
{
checksum256 digest;
sha256(&data[0], data.size(), &digest);
}`
The text was updated successfully, but these errors were encountered: