aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api/utils.go
diff options
context:
space:
mode:
authorBas van Kervel <bas@ethdev.com>2015-06-08 20:42:15 +0800
committerBas van Kervel <basvankervel@gmail.com>2015-06-11 20:01:40 +0800
commit4b9b633dfe8c36d3a8909024ff23a1cdedce44d8 (patch)
tree34415e3133be061958f8cf33de731406c894f04a /rpc/api/utils.go
parentcb7f2d43b6da260dff80e4b705271c7088112c34 (diff)
downloaddexon-4b9b633dfe8c36d3a8909024ff23a1cdedce44d8.tar
dexon-4b9b633dfe8c36d3a8909024ff23a1cdedce44d8.tar.gz
dexon-4b9b633dfe8c36d3a8909024ff23a1cdedce44d8.tar.bz2
dexon-4b9b633dfe8c36d3a8909024ff23a1cdedce44d8.tar.lz
dexon-4b9b633dfe8c36d3a8909024ff23a1cdedce44d8.tar.xz
dexon-4b9b633dfe8c36d3a8909024ff23a1cdedce44d8.tar.zst
dexon-4b9b633dfe8c36d3a8909024ff23a1cdedce44d8.zip
added miner API
Diffstat (limited to 'rpc/api/utils.go')
-rw-r--r--rpc/api/utils.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/rpc/api/utils.go b/rpc/api/utils.go
index 7024365e4..488eb1ec6 100644
--- a/rpc/api/utils.go
+++ b/rpc/api/utils.go
@@ -23,6 +23,8 @@ func ParseApiString(apistr string, codec codec.Codec, xeth *xeth.XEth, eth *eth.
switch strings.ToLower(strings.TrimSpace(name)) {
case EthApiName:
apis[i] = NewEthApi(xeth, codec)
+ case MinerApiName:
+ apis[i] = NewMinerApi(eth, codec)
case Web3ApiName:
apis[i] = NewWeb3(xeth, codec)
default:
@@ -32,3 +34,12 @@ func ParseApiString(apistr string, codec codec.Codec, xeth *xeth.XEth, eth *eth.
return apis, nil
}
+
+func Javascript(name string) string {
+ switch strings.ToLower(strings.TrimSpace(name)) {
+ case MinerApiName:
+ return Miner_JS
+ }
+
+ return ""
+}