added miner API
This commit is contained in:
committed by
Bas van Kervel
parent
cb7f2d43b6
commit
4b9b633dfe
@@ -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 ""
|
||||
}
|
||||
|
Reference in New Issue
Block a user