status-go/services/utils.go
Adrià Cidre 5bbfabde94
New debug_postSync endpoint (#1046)
* [#ISSUE-1041] New debug_postconfirm endpoint

* move debug service api inside shhext service
2018-06-25 15:27:17 +02:00

13 lines
304 B
Go

package services
import "github.com/ethereum/go-ethereum/rpc"
// APIByNamespace retrieve an api by its namespace or returns nil.
func APIByNamespace(apis []rpc.API, namespace string) interface{} {
for _, api := range apis {
if api.Namespace == namespace {
return api.Service
}
}
return nil
}