aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/api/utils.go
diff options
context:
space:
mode:
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 ""
+}