mirror of
https://github.com/status-im/status-dev-cli.git
synced 2026-08-30 21:11:13 +00:00
33 lines
1020 B
JavaScript
33 lines
1020 B
JavaScript
var status = {
|
|
addDApp: function(to, argsHex) {
|
|
web3.shh.post({
|
|
"from": to,
|
|
"to": to,
|
|
"topics": ["status-dapp-topic"],
|
|
"ttl": 5,
|
|
"payload": web3.fromAscii("{:type :debug :action :add-dapp :args \"" + argsHex + "\"}\n")
|
|
});
|
|
return "Request sent";
|
|
},
|
|
removeDApp: function(to, argsHex) {
|
|
web3.shh.post({
|
|
"from": to,
|
|
"to": to,
|
|
"topics": ["status-dapp-topic"],
|
|
"ttl": 5,
|
|
"payload": web3.fromAscii("{:type :debug :action :remove-dapp :args \"" + argsHex + "\"}\n")
|
|
});
|
|
return "Request sent";
|
|
},
|
|
notifyDAppChanged: function(to, argsHex) {
|
|
web3.shh.post({
|
|
"from": to,
|
|
"to": to,
|
|
"topics": ["status-dapp-topic"],
|
|
"ttl": 2,
|
|
"payload": web3.fromAscii("{:type :debug :action :dapp-changed :args \"" + argsHex + "\"}\n")
|
|
});
|
|
return "Notification sent";
|
|
}
|
|
};
|