Documentation ¶
Index ¶
- type AvmBalance
- type AvmClient
- type Balance
- type Blockchain
- type BlockchainsResponse
- type Call
- type Client
- type ClientPool
- type Container
- type ContainersResponse
- type Delegator
- type EvmClient
- type FlatCall
- type GetAllBalancesResponse
- type GetStakeResponse
- type IndexClient
- type InfoClient
- func (c InfoClient) BlockchainID(alias string) (string, error)
- func (c InfoClient) Endpoint() string
- func (c InfoClient) NetworkID() (int, error)
- func (c InfoClient) NetworkName() (string, error)
- func (c InfoClient) NodeID() (string, error)
- func (c InfoClient) NodeVersion() (string, error)
- func (c InfoClient) Peers() ([]Peer, error)
- func (c InfoClient) TxFee() (*TxFeeResponse, error)
- type IpcClient
- type MinStakeResponse
- type Peer
- type PlatformClient
- func (c PlatformClient) Endpoint() string
- func (c PlatformClient) GetBalance(address string) (resp *Balance, err error)
- func (c PlatformClient) GetBlockchains() (resp *BlockchainsResponse, err error)
- func (c PlatformClient) GetCurrentHeight() (uint64, error)
- func (c PlatformClient) GetCurrentValidators() (resp *ValidatorsResponse, err error)
- func (c PlatformClient) GetMinStake() (resp *MinStakeResponse, err error)
- func (c PlatformClient) GetPendingValidators() (resp *ValidatorsResponse, err error)
- func (c PlatformClient) GetRewardUTXOs(id string) (resp *RewardUTXOsResponse, err error)
- func (c PlatformClient) GetStake(addresses []string) (resp *GetStakeResponse, err error)
- type RewardOwner
- type RewardUTXOsResponse
- type TxFeeResponse
- type Validator
- type ValidatorsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvmBalance ¶ added in v0.2.0
type AvmClient ¶
type AvmClient struct {
// contains filtered or unexported fields
}
AvmClient talks to the X chain
func NewAvmClient ¶
func (AvmClient) GetAllBalances ¶ added in v0.2.0
func (c AvmClient) GetAllBalances(address string) (result GetAllBalancesResponse, err error)
GetAllBalances returns all assets balances for a given address
type Blockchain ¶
type BlockchainsResponse ¶
type BlockchainsResponse struct {
Blockchains []Blockchain `json:"blockchains"`
}
type Call ¶ added in v0.3.0
type Call struct { Type string `json:"type"` From common.Address `json:"from"` To common.Address `json:"to"` Value *hexutil.Big `json:"value"` Gas *hexutil.Big `json:"gas"` GasUsed *hexutil.Big `json:"gasUsed"` Revert bool `json:"revert"` Error string `json:"error,omitempty"` Calls []*Call `json:"calls"` }
func (*Call) UnmarshalJSON ¶ added in v0.3.0
type Client ¶
type Client struct { Avm AvmClient Evm EvmClient Platform PlatformClient Info InfoClient Ipc IpcClient Index IndexClient }
type ClientPool ¶ added in v0.6.0
type ClientPool struct {
// contains filtered or unexported fields
}
func NewClientPool ¶ added in v0.6.0
func NewClientPool(endpoints ...string) ClientPool
func (*ClientPool) Get ¶ added in v0.6.0
func (pool *ClientPool) Get() *Client
type ContainersResponse ¶ added in v0.3.0
type ContainersResponse struct {
Containers []Container `json:"containers"`
}
type Delegator ¶
type Delegator struct { TxID string `json:"txID"` StartTime string `json:"startTime"` EndTime string `json:"endTime"` StakeAmount string `json:"stakeAmount"` NodeID string `json:"nodeID"` RewardOwner RewardOwner `json:"rewardOwner"` PotentialReward string `json:"potentialReward"` DelegationFee string `json:"delegationFee"` Uptime string `json:"uptime"` Connected bool `json:"connected"` }
type EvmClient ¶ added in v0.3.0
func NewEVmClient ¶ added in v0.3.0
type GetAllBalancesResponse ¶ added in v0.2.0
type GetAllBalancesResponse struct {
Balances []AvmBalance `json:"balances"`
}
type GetStakeResponse ¶ added in v0.5.0
type GetStakeResponse struct {
Staked string `json:"staked"`
}
type IndexClient ¶ added in v0.3.0
type IndexClient struct {
// contains filtered or unexported fields
}
func NewIndexClient ¶ added in v0.3.0
func NewIndexClient(endpoint string) IndexClient
func (IndexClient) GetContainerRange ¶ added in v0.3.0
func (c IndexClient) GetContainerRange(chain string, startIndex uint64, numToFetch int) (*ContainersResponse, error)
func (IndexClient) GetLastAccepted ¶ added in v0.3.0
func (c IndexClient) GetLastAccepted(chain string) (*Container, error)
type InfoClient ¶
type InfoClient struct {
// contains filtered or unexported fields
}
func NewInfoClient ¶
func NewInfoClient(endpoint string) InfoClient
func (InfoClient) BlockchainID ¶
func (c InfoClient) BlockchainID(alias string) (string, error)
func (InfoClient) NetworkID ¶
func (c InfoClient) NetworkID() (int, error)
func (InfoClient) NetworkName ¶
func (c InfoClient) NetworkName() (string, error)
func (InfoClient) NodeID ¶
func (c InfoClient) NodeID() (string, error)
func (InfoClient) NodeVersion ¶
func (c InfoClient) NodeVersion() (string, error)
func (InfoClient) Peers ¶
func (c InfoClient) Peers() ([]Peer, error)
func (InfoClient) TxFee ¶
func (c InfoClient) TxFee() (*TxFeeResponse, error)
type IpcClient ¶
type IpcClient struct {
// contains filtered or unexported fields
}
func NewIpcClient ¶
type MinStakeResponse ¶
type Peer ¶
type PlatformClient ¶
type PlatformClient struct {
// contains filtered or unexported fields
}
PlatformClient talks to the P chain
func NewPlatformClient ¶
func NewPlatformClient(endpoint string) PlatformClient
func (PlatformClient) GetBalance ¶
func (c PlatformClient) GetBalance(address string) (resp *Balance, err error)
func (PlatformClient) GetBlockchains ¶
func (c PlatformClient) GetBlockchains() (resp *BlockchainsResponse, err error)
func (PlatformClient) GetCurrentHeight ¶
func (c PlatformClient) GetCurrentHeight() (uint64, error)
func (PlatformClient) GetCurrentValidators ¶
func (c PlatformClient) GetCurrentValidators() (resp *ValidatorsResponse, err error)
func (PlatformClient) GetMinStake ¶
func (c PlatformClient) GetMinStake() (resp *MinStakeResponse, err error)
func (PlatformClient) GetPendingValidators ¶
func (c PlatformClient) GetPendingValidators() (resp *ValidatorsResponse, err error)
func (PlatformClient) GetRewardUTXOs ¶ added in v0.3.0
func (c PlatformClient) GetRewardUTXOs(id string) (resp *RewardUTXOsResponse, err error)
func (PlatformClient) GetStake ¶ added in v0.5.0
func (c PlatformClient) GetStake(addresses []string) (resp *GetStakeResponse, err error)
type RewardOwner ¶
type RewardUTXOsResponse ¶ added in v0.3.0
type TxFeeResponse ¶
type Validator ¶
type Validator struct { TxID string `json:"txID"` StartTime string `json:"startTime"` EndTime string `json:"endTime"` StakeAmount string `json:"stakeAmount"` NodeID string `json:"nodeID"` RewardOwner RewardOwner `json:"rewardOwner"` PotentialReward string `json:"potentialReward"` DelegationFee string `json:"delegationFee"` Uptime string `json:"uptime"` Connected bool `json:"connected"` Delegators []Delegator `json:"delegators"` }
type ValidatorsResponse ¶
Click to show internal directories.
Click to hide internal directories.