예제 #1
0
bool response_message::decode_payload(const bc::data_chunk& payload)
{
    bool result = false;

    std::string text = std::string(payload.begin(), payload.end());
    std::shared_ptr<response> data(new response());

    if (data->ParseFromString(text))
    {
        response_ = data;
        result = true;
    }

    return result;
}
예제 #2
0
const std::string generate_public_key(const bc::deterministic_wallet& wallet,
    size_t n)
{
    const bc::data_chunk pubkey = wallet.generate_public_key(n);
    return std::string(pubkey.begin(), pubkey.end());
}