| 480 | } |
| 481 | |
| 482 | shh::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 | |
| 494 | shh::Envelope toSealed(Json::Value const& _json, shh::Message const& _m, Secret const& _from) |
| 495 | { |
no test coverage detected