Documentation ¶
Overview ¶
Package blockchain provides functionality for interacting with the Ethereum blockchain. It includes utilities for creating Ethereum accounts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountData ¶
AccountData contains the details of an Ethereum account
type BlockchainClient ¶ added in v0.3.0
type BlockchainClient interface {
CreateEthAccount() (AccountData, error)
}
type EthClient ¶ added in v0.3.0
EthClient provides methods to interact with an Ethereum blockchain network. It uses the Ethereum client to query information and perform blockchain operations.
func NewClient ¶
NewClient creates and returns a new Client instance connected to the specified Ethereum network URL.
func (*EthClient) CreateEthAccount ¶ added in v0.3.0
func (c *EthClient) CreateEthAccount() (AccountData, error)
CreateEthAccount generates a new Ethereum account with a private key, public key, and address. It also checks if the generated address is available (i.e., not used for contracts or transactions).
type MockClient ¶ added in v0.3.0
MockClient is a mock implementation of the blockchain Client interface.
func (*MockClient) CreateEthAccount ¶ added in v0.3.0
func (m *MockClient) CreateEthAccount() (AccountData, error)
CreateEthAccount mocks the creation of an Ethereum account.