Is there a specific sample code of using recover_key()? I got an error with recover_key() in contract.
string msg="charlie";
checksum256 m_hash;
sha256( const_cast<char*>(msg.c_str()), msg.length(), &m_hash );
char* pub;
string sig="SIG_K1_K5cpBg7XHRfgdedEAR9w74bXQZk4TUQk9QDMfzNbttY3eZ5WhmpNuWKiRyidskkdjBH9L9pKKe29RiiELNLCNYzFtFyTqJ";
recover_key(&m_hash,sig.data(),strlen(maker.sig.data()),pub,sizeof(char));
Error Information:
assert_exception: Assert Exception
w < count():
{}
thread-0 static_variant.hpp:339 set_which
Error unpacking field _storage
{"field":"_storage"}
thread-0 raw.hpp:368 operator()
error unpacking fc::crypto::signature
{"type":"fc::crypto::signature"}
thread-0 raw.hpp:616 unpack