laconicd-deprecated/rpc/apis.go
Austin Abell 6c72a79035
RPC unlock Ethermint key and eth_sign (#99)
* Set up personal account api for personal sign

* Added unlocking key functionality and attach to eth rpc

* Implemented eth_sign

* Transform V in sig based on yp and fix bug

* Fix lint issue

* Remove escape character from comment

* Switch error handling to panic on invalid unlocked key
2019-09-18 14:45:21 -04:00

34 lines
771 B
Go

// Package rpc contains RPC handler methods and utilities to start
// Ethermint's Web3-compatibly JSON-RPC server.
package rpc
import (
"github.com/cosmos/cosmos-sdk/client/context"
emintcrypto "github.com/cosmos/ethermint/crypto"
"github.com/ethereum/go-ethereum/rpc"
)
// GetRPCAPIs returns the list of all APIs
func GetRPCAPIs(cliCtx context.CLIContext, key emintcrypto.PrivKeySecp256k1) []rpc.API {
return []rpc.API{
{
Namespace: "web3",
Version: "1.0",
Service: NewPublicWeb3API(),
Public: true,
},
{
Namespace: "eth",
Version: "1.0",
Service: NewPublicEthAPI(cliCtx, key),
Public: true,
},
{
Namespace: "personal",
Version: "1.0",
Service: NewPersonalEthAPI(cliCtx),
Public: false,
},
}
}