Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions libevm/ethapi/ethapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,25 @@ type (
)

type (
// BlockChainAPI exposes RPC methods for querying chain data.
// EthereumAPI provides an API to access Ethereum related information.
EthereumAPI = ethapi.EthereumAPI
// BlockChainAPI provides an API to access Ethereum blockchain data.
BlockChainAPI = ethapi.BlockChainAPI
// TransactionAPI exposes RPC methods for querying and creating
// transactions.
// TransactionAPI exposes methods for reading and creating transaction data.
TransactionAPI = ethapi.TransactionAPI
// TxPoolAPI offers and API for the transaction pool. It only operates on
// data that is non-confidential.
TxPoolAPI = ethapi.TxPoolAPI
// DebugAPI is the collection of Ethereum APIs exposed over the debugging
// namespace.
DebugAPI = ethapi.DebugAPI
)

// NewEthereumAPI is identical to [ethapi.NewEthereumAPI].
func NewEthereumAPI(b Backend) *EthereumAPI {
return ethapi.NewEthereumAPI(b)
}

// NewBlockChainAPI is identical to [ethapi.NewBlockChainAPI].
func NewBlockChainAPI(b Backend) *BlockChainAPI {
return ethapi.NewBlockChainAPI(b)
Expand All @@ -42,3 +54,13 @@ func NewBlockChainAPI(b Backend) *BlockChainAPI {
func NewTransactionAPI(b Backend, nonceLock *AddrLocker) *TransactionAPI {
return ethapi.NewTransactionAPI(b, nonceLock)
}

// NewTxPoolAPI is identical to [ethapi.NewTxPoolAPI].
func NewTxPoolAPI(b Backend) *TxPoolAPI {
return ethapi.NewTxPoolAPI(b)
}

// NewDebugAPI is identical to [ethapi.NewDebugAPI].
func NewDebugAPI(b Backend) *DebugAPI {
return ethapi.NewDebugAPI(b)
}