Documentation
¶
Index ¶
- Variables
- type Address
- type Balance
- type ExplorerApi
- func (e *ExplorerApi) GetAddress(hash string) (address Address, err error)
- func (e *ExplorerApi) GetAddressTransactions(hash string, filters []TransactionType, page int, size int) (transactions []Transaction, paginator Paginator, err error)
- func (e *ExplorerApi) GetAddresses(page int, size int) (addresses []Address, paginator Paginator, err error)
- func (e *ExplorerApi) GetBalances(addresses []string) (balances []Balance, err error)
- func (e *ExplorerApi) GetStakingRewardsForAddresses(addresses []string) (rewards []Reward, err error)
- func (e *ExplorerApi) ValidateAddress(hash string) (validateAddress ValidateAddress, err error)
- type ExplorerClient
- type Paginator
- type Reward
- type RewardPeriod
- type Transaction
- type TransactionType
- type ValidateAddress
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrorExplorerConnectionError = errors.New("Could not connect to the NavExplorer API")
)
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
Hash string `json:"hash"`
Received int64 `json:"received"`
ReceivedCount uint `json:"receivedCount"`
Sent int64 `json:"sent"`
SentCount uint `json:"sentCount"`
Staked int64 `json:"staked"`
StakedCount uint `json:"stakedCount"`
ColdStaked int64 `json:"coldStaked"`
ColdStakedCount uint `json:"coldStakedCount"`
ColdStakedSent int64 `json:"coldSent"`
ColdStakedReceived int64 `json:"coldStakedReceived"`
ColdStakedBalance int64 `json:"coldStakedBalance"`
Balance int64 `json:"balance"`
Position int64 `json:"position"`
}
type ExplorerApi ¶
type ExplorerApi struct {
// contains filtered or unexported fields
}
func NewExplorerApi ¶
func NewExplorerApi(host string, network string) (*ExplorerApi, error)
func (*ExplorerApi) GetAddress ¶
func (e *ExplorerApi) GetAddress(hash string) (address Address, err error)
func (*ExplorerApi) GetAddressTransactions ¶
func (e *ExplorerApi) GetAddressTransactions(hash string, filters []TransactionType, page int, size int) (transactions []Transaction, paginator Paginator, err error)
func (*ExplorerApi) GetAddresses ¶
func (*ExplorerApi) GetBalances ¶
func (e *ExplorerApi) GetBalances(addresses []string) (balances []Balance, err error)
func (*ExplorerApi) GetStakingRewardsForAddresses ¶
func (e *ExplorerApi) GetStakingRewardsForAddresses(addresses []string) (rewards []Reward, err error)
func (*ExplorerApi) ValidateAddress ¶
func (e *ExplorerApi) ValidateAddress(hash string) (validateAddress ValidateAddress, err error)
type ExplorerClient ¶
type ExplorerClient struct {
// contains filtered or unexported fields
}
type Reward ¶
type Reward struct {
Address string `json:"address"`
Periods []RewardPeriod `json:"periods"`
}
type RewardPeriod ¶
type Transaction ¶
type Transaction struct {
Time time.Time `json:"time"`
Address string `json:"address"`
Type string `json:"type"`
Transaction string `json:"transaction"`
Height int `json:"height"`
Balance float64 `json:"balance"`
Sent float64 `json:"sent"`
Received float64 `json:"received"`
ColdStaking bool `json:"coldStaking"`
ColdStakingBalance float64 `json:"coldStakingBalance"`
ColdStakingSent float64 `json:"coldStakingSent"`
ColdStakingReceived float64 `json:"coldStakingReceived"`
}
type TransactionType ¶
type TransactionType string
const ( TX_SEND TransactionType = "SEND" TX_RECEIVE TransactionType = "RECEIVE" TX_STAKING TransactionType = "STAKING" TX_COLD_STAKING TransactionType = "COLD_STAKING" )
Click to show internal directories.
Click to hide internal directories.