You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
858 B
40 lines
858 B
package hmyapi
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/rpc"
|
|
"github.com/harmony-one/harmony/core"
|
|
)
|
|
|
|
// GetAPIs returns all the APIs.
|
|
func GetAPIs(b *core.HmyAPIBackend) []rpc.API {
|
|
nonceLock := new(AddrLocker)
|
|
return []rpc.API{
|
|
{
|
|
Namespace: "hmy",
|
|
Version: "1.0",
|
|
Service: NewPublicHarmonyAPI(b),
|
|
Public: true,
|
|
},
|
|
{
|
|
Namespace: "hmy",
|
|
Version: "1.0",
|
|
Service: NewPublicBlockChainAPI(b),
|
|
Public: true,
|
|
}, {
|
|
Namespace: "hmy",
|
|
Version: "1.0",
|
|
Service: NewPublicTransactionPoolAPI(b, nonceLock),
|
|
Public: true,
|
|
}, {
|
|
Namespace: "hmy",
|
|
Version: "1.0",
|
|
Service: NewPublicAccountAPI(b.AccountManager()),
|
|
Public: true,
|
|
}, {
|
|
Namespace: "hmy",
|
|
Version: "1.0",
|
|
Service: NewDebugAPI(b),
|
|
Public: true, // FIXME: change to false once IPC implemented
|
|
},
|
|
}
|
|
}
|
|
|