Documentation ¶
Index ¶
- type APIClient
- func (c APIClient) AdminAPI() admin.Client
- func (c APIClient) CChainAPI() evm.Client
- func (c APIClient) CChainEthAPI() EthClient
- func (c APIClient) CChainIndexAPI() indexer.Client
- func (c APIClient) HealthAPI() health.Client
- func (c APIClient) InfoAPI() info.Client
- func (c APIClient) KeystoreAPI() keystore.Client
- func (c APIClient) PChainAPI() platformvm.Client
- func (c APIClient) PChainIndexAPI() indexer.Client
- func (c APIClient) XChainAPI() avm.Client
- func (c APIClient) XChainWalletAPI() avm.WalletClient
- type Client
- type EthClient
- type NewAPIClientF
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
APIClient gives access to most metalgo apis (or suitable wrappers)
func (APIClient) CChainEthAPI ¶
func (APIClient) CChainIndexAPI ¶
func (APIClient) KeystoreAPI ¶
func (APIClient) PChainAPI ¶
func (c APIClient) PChainAPI() platformvm.Client
func (APIClient) PChainIndexAPI ¶
func (APIClient) XChainWalletAPI ¶
func (c APIClient) XChainWalletAPI() avm.WalletClient
type Client ¶
type Client interface { PChainAPI() platformvm.Client XChainAPI() avm.Client XChainWalletAPI() avm.WalletClient CChainAPI() evm.Client CChainEthAPI() EthClient // ethclient websocket wrapper that adds mutexed calls, and lazy conn init (on first call) InfoAPI() info.Client HealthAPI() health.Client KeystoreAPI() keystore.Client AdminAPI() admin.Client PChainIndexAPI() indexer.Client CChainIndexAPI() indexer.Client }
Issues API calls to a node TODO: byzantine api. check if appropriate. improve implementation.
func NewAPIClient ¶
NewAPIClient initialize most of metalgo apis
type EthClient ¶
type EthClient interface { Close() SendTransaction(context.Context, *types.Transaction) error TransactionReceipt(context.Context, common.Hash) (*types.Receipt, error) BalanceAt(context.Context, common.Address, *big.Int) (*big.Int, error) BlockByNumber(context.Context, *big.Int) (*types.Block, error) BlockByHash(context.Context, common.Hash) (*types.Block, error) BlockNumber(context.Context) (uint64, error) CallContract(context.Context, interfaces.CallMsg, *big.Int) ([]byte, error) NonceAt(context.Context, common.Address, *big.Int) (uint64, error) AssetBalanceAt(context.Context, common.Address, ids.ID, *big.Int) (*big.Int, error) SuggestGasPrice(context.Context) (*big.Int, error) AcceptedCodeAt(context.Context, common.Address) ([]byte, error) AcceptedNonceAt(context.Context, common.Address) (uint64, error) CodeAt(context.Context, common.Address, *big.Int) ([]byte, error) EstimateGas(context.Context, interfaces.CallMsg) (uint64, error) AcceptedCallContract(context.Context, interfaces.CallMsg) ([]byte, error) HeaderByNumber(context.Context, *big.Int) (*types.Header, error) SuggestGasTipCap(context.Context) (*big.Int, error) FilterLogs(context.Context, interfaces.FilterQuery) ([]types.Log, error) SubscribeFilterLogs(context.Context, interfaces.FilterQuery, chan<- types.Log) (interfaces.Subscription, error) }
func NewEthClient ¶
NewEthClient mainly takes ip/port info for usage in future calls Connection can't be initialized in constructor because node is not ready when the constructor is called It follows convention of most metalgo api constructors that can be called without having a ready node
type NewAPIClientF ¶
Returns a new API client for a node at [ipAddr]:[port].
Click to show internal directories.
Click to hide internal directories.