laconicd-deprecated/rpc/apis.go
Austin Abell 28aaba0695
Implement eth_sendTransaction (#104)
* Set up framework for sending transaction with correct args and nonce mutex locking

* Set up printing ethereum address through emintkeys and getting chainid from flags

* Implemented defaults for eth_sendTransaction

* Fix bug with no data provided

* Updated comments and error, as well as RLP encoded tx bytes for return instead of amino encoded
2019-09-20 09:30:20 -04:00

35 lines
823 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 {
nonceLock := new(AddrLocker)
return []rpc.API{
{
Namespace: "web3",
Version: "1.0",
Service: NewPublicWeb3API(),
Public: true,
},
{
Namespace: "eth",
Version: "1.0",
Service: NewPublicEthAPI(cliCtx, nonceLock, key),
Public: true,
},
{
Namespace: "personal",
Version: "1.0",
Service: NewPersonalEthAPI(cliCtx, nonceLock),
Public: false,
},
}
}