Documentation
¶
Overview ¶
Package notinchain provides a temporary sollution for missing data in the blockchain. Remove the THOR node REST URL from the configuration once removed.
Index ¶
- Variables
- func AsgardVaultsLookup() (*[]AsgardVaults, error)
- func AsyncAsgardVaultsLookup(wg *sync.WaitGroup, ch chan<- interface{})
- func AsyncNetworkLookup(wg *sync.WaitGroup, ch chan<- interface{})
- func AsyncNodeAccountsLookup(wg *sync.WaitGroup, ch chan<- interface{})
- func LoadConstants() error
- type AsgardVaults
- type Coin
- type Constants
- type JailInfo
- type Network
- type NodeAccount
- type NodeCache
- type PublicKeys
Constants ¶
This section is empty.
Variables ¶
View Source
var BaseURL string
BaseURL defines the REST root.
View Source
var Client http.Client
Functions ¶
func AsgardVaultsLookup ¶
func AsgardVaultsLookup() (*[]AsgardVaults, error)
Get asgard vault data from the thorchain api
func AsyncAsgardVaultsLookup ¶
func AsyncNetworkLookup ¶
func AsyncNodeAccountsLookup ¶
func LoadConstants ¶
func LoadConstants() error
Types ¶
type AsgardVaults ¶
type Constants ¶
func GetConstants ¶
func GetConstants() *Constants
Looks up thorchain constants, query is run once then cached in memory
type Network ¶
type NodeAccount ¶
type NodeAccount struct { NodeAddr string `json:"node_address"` Status string `json:"status"` TotalBond int64 `json:"total_bond,string"` PublicKeys PublicKeys `json:"pub_key_set"` RequestedToLeave bool `json:"requested_to_leave"` ForcedToLeave bool `json:"forced_to_leave"` LeaveHeight int64 `json:"leave_height"` IpAddress string `json:"ip_address"` Version string `json:"version"` SlashPoints int64 `json:"slash_points"` Jail JailInfo `json:"jail"` CurrentAward int64 `json:"current_award,string"` }
func CachedNodeAccountLookup ¶
func CachedNodeAccountLookup(address string) (*NodeAccount, error)
Return a cached version of nodeaccount to reduce load on thorchain nodes
func CachedNodeAccountsLookup ¶
func CachedNodeAccountsLookup() ([]*NodeAccount, error)
Return a cached version of nodeaccounts to reduce load on thorchain nodes
func NodeAccountLookup ¶
func NodeAccountLookup(addr string) (*NodeAccount, error)
Get node details by address from the thorchain api
func NodeAccountsLookup ¶
func NodeAccountsLookup() ([]*NodeAccount, error)
Get all nodes from the thorchain api
type NodeCache ¶
type NodeCache struct { Node *NodeAccount CachedAt time.Time }
type PublicKeys ¶
Click to show internal directories.
Click to hide internal directories.