diff options
author | Bas van Kervel <bas@ethdev.com> | 2015-06-16 20:59:39 +0800 |
---|---|---|
committer | Bas van Kervel <bas@ethdev.com> | 2015-06-22 14:54:21 +0800 |
commit | c3f6c322c07a96d3930c75d05ed3859e7d80ddbc (patch) | |
tree | 8d702eb65113923b0b6a40c0d1d064f82ae2fb44 /rpc/api/db_js.go | |
parent | 5c25403b13a698267230f859e822a7f714082198 (diff) | |
download | go-tangerine-c3f6c322c07a96d3930c75d05ed3859e7d80ddbc.tar go-tangerine-c3f6c322c07a96d3930c75d05ed3859e7d80ddbc.tar.gz go-tangerine-c3f6c322c07a96d3930c75d05ed3859e7d80ddbc.tar.bz2 go-tangerine-c3f6c322c07a96d3930c75d05ed3859e7d80ddbc.tar.lz go-tangerine-c3f6c322c07a96d3930c75d05ed3859e7d80ddbc.tar.xz go-tangerine-c3f6c322c07a96d3930c75d05ed3859e7d80ddbc.tar.zst go-tangerine-c3f6c322c07a96d3930c75d05ed3859e7d80ddbc.zip |
added DB api
Diffstat (limited to 'rpc/api/db_js.go')
-rw-r--r-- | rpc/api/db_js.go | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/rpc/api/db_js.go b/rpc/api/db_js.go new file mode 100644 index 000000000..62cdcd20e --- /dev/null +++ b/rpc/api/db_js.go @@ -0,0 +1,41 @@ +package api + +const Db_JS = ` +web3._extend({ + property: 'db', + methods: + [ + new web3._extend.Method({ + name: 'getString', + call: 'db_getString', + params: 2, + inputFormatter: [web3._extend.formatters.formatInputString, web3._extend.formatters.formatInputString], + outputFormatter: web3._extend.formatters.formatOutputString + }), + new web3._extend.Method({ + name: 'putString', + call: 'db_putString', + params: 3, + inputFormatter: [web3._extend.formatters.formatInputString, web3._extend.formatters.formatInputString, web3._extend.formatters.formatInputString], + outputFormatter: web3._extend.formatters.formatOutputBool + }), + new web3._extend.Method({ + name: 'getHex', + call: 'db_getHex', + params: 2, + inputFormatter: [web3._extend.formatters.formatInputString, web3._extend.formatters.formatInputString], + outputFormatter: web3._extend.formatters.formatOutputString + }), + new web3._extend.Method({ + name: 'putHex', + call: 'db_putHex', + params: 3, + inputFormatter: [web3._extend.formatters.formatInputString, web3._extend.formatters.formatInputString, web3._extend.formatters.formatInputString], + outputFormatter: web3._extend.formatters.formatOutputBool + }), + ], + properties: + [ + ] +}); +` |