MCPcopy Create free account
hub / github.com/LUX-Core/lux / toMessage

Function toMessage

src/cpp-ethereum/libweb3jsonrpc/JsonHelper.cpp:482–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480}
481
482shh::Message toMessage(Json::Value const& _json)
483{
484 shh::Message ret;
485 if (!_json["from"].empty())
486 ret.setFrom(jsToPublic(_json["from"].asString()));
487 if (!_json["to"].empty())
488 ret.setTo(jsToPublic(_json["to"].asString()));
489 if (!_json["payload"].empty())
490 ret.setPayload(jsToBytes(_json["payload"].asString()));
491 return ret;
492}
493
494shh::Envelope toSealed(Json::Value const& _json, shh::Message const& _m, Secret const& _from)
495{

Callers 1

shh_postMethod · 0.85

Calls 6

jsToPublicFunction · 0.85
jsToBytesFunction · 0.85
setFromMethod · 0.80
setToMethod · 0.80
setPayloadMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected