diff options
author | Bas van Kervel <bas@ethdev.com> | 2015-06-08 20:42:15 +0800 |
---|---|---|
committer | Bas van Kervel <basvankervel@gmail.com> | 2015-06-11 20:01:40 +0800 |
commit | 4b9b633dfe8c36d3a8909024ff23a1cdedce44d8 (patch) | |
tree | 34415e3133be061958f8cf33de731406c894f04a /rpc/api/utils.go | |
parent | cb7f2d43b6da260dff80e4b705271c7088112c34 (diff) | |
download | go-tangerine-4b9b633dfe8c36d3a8909024ff23a1cdedce44d8.tar.gz go-tangerine-4b9b633dfe8c36d3a8909024ff23a1cdedce44d8.tar.zst go-tangerine-4b9b633dfe8c36d3a8909024ff23a1cdedce44d8.zip |
added miner API
Diffstat (limited to 'rpc/api/utils.go')
-rw-r--r-- | rpc/api/utils.go | 11 |
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 "" +} |