diff options
author | obscuren <geffobscura@gmail.com> | 2014-04-24 06:01:22 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-04-24 06:01:22 +0800 |
commit | bb72347acf8a82d1c20e8aae25c84e5dc75903dd (patch) | |
tree | c2ab64cf4bbbe23a9efab8efa1087ba775e12aa2 /ethereal/assets/ethereum.js | |
parent | 43f1214f97e52863b1f1ef7913991bef3d00c58e (diff) | |
download | go-tangerine-bb72347acf8a82d1c20e8aae25c84e5dc75903dd.tar go-tangerine-bb72347acf8a82d1c20e8aae25c84e5dc75903dd.tar.gz go-tangerine-bb72347acf8a82d1c20e8aae25c84e5dc75903dd.tar.bz2 go-tangerine-bb72347acf8a82d1c20e8aae25c84e5dc75903dd.tar.lz go-tangerine-bb72347acf8a82d1c20e8aae25c84e5dc75903dd.tar.xz go-tangerine-bb72347acf8a82d1c20e8aae25c84e5dc75903dd.tar.zst go-tangerine-bb72347acf8a82d1c20e8aae25c84e5dc75903dd.zip |
Minor fixes and sample coin "improvements"
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 = {} |