diff options
Diffstat (limited to 'ethereal/assets/ethereum.js')
-rw-r--r-- | ethereal/assets/ethereum.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ethereal/assets/ethereum.js b/ethereal/assets/ethereum.js index 173eaff22..74f851936 100644 --- a/ethereal/assets/ethereum.js +++ b/ethereal/assets/ethereum.js @@ -5,6 +5,10 @@ function postData(data, cb) { eth._callbacks[data._seed] = cb; } + if(data.args === undefined) { + data.args = [] + } + navigator.qt.postMessage(JSON.stringify(data)); } @@ -34,6 +38,14 @@ window.eth = { createTx: function(recipient, value, gas, gasPrice, data, cb) { postData({call: "createTx", args: [recipient, value, gas, gasPrice, data]}, cb) }, + + getStorage: function(address, storageAddress, cb) { + postData({call: "getStorage", args: [address, storageAddress]}, cb) + }, + + getKey: function(cb) { + postData({call: "getKey"}, cb) + }, } window.eth._callbacks = {} |