Versions in this module Expand all Collapse all v0 v0.1.0 Jun 1, 2024 Changes in this version + var ErrAssetMissing = errors.New("asset missing") + var ErrDuplicate = errors.New("duplicate") + type AddressInfo struct + AddrStr string + Address string + Name string + type Alert struct + Content string + Type string + type AssetInfo struct + Creator string + Decimals int + ID string + Metadata string + StrSymbol string + Supply string + Symbol string + type Backend struct + func New(fatal func(error)) *Backend + func (b *Backend) AddAddressBook(name string, address string) error + func (b *Backend) AddAsset(asset string) error + func (b *Backend) AddBlock(newBlock *BlockInfo) + func (b *Backend) CreateAsset(symbol string, decimals string, metadata string) error + func (b *Backend) GetAccountStats() []*GenericInfo + func (b *Backend) GetAddress() string + func (b *Backend) GetAddressBook() []*AddressInfo + func (b *Backend) GetAllAssets() []*AssetInfo + func (b *Backend) GetBalance() ([]*BalanceInfo, error) + func (b *Backend) GetChainID() string + func (b *Backend) GetConfig() *Config + func (b *Backend) GetFaucetSolutions() *FaucetSolutions + func (b *Backend) GetFeed(subnetID, chainID string, limit int) ([]*FeedObject, error) + func (b *Backend) GetFeedInfo() (*FeedInfo, error) + func (b *Backend) GetLatestBlocks(page int, count int) []*BlockInfo + func (b *Backend) GetMyAssets() []*AssetInfo + func (b *Backend) GetPrivateKey() string + func (b *Backend) GetPublicKey() string + func (b *Backend) GetSubnetID() string + func (b *Backend) GetTotalBlocks() int + func (b *Backend) GetTransactionStats() []*GenericInfo + func (b *Backend) GetTransactions() *Transactions + func (b *Backend) GetUnitPrices() []*GenericInfo + func (b *Backend) Message(message string, url string) error + func (b *Backend) MintAsset(asset string, address string, amount string) error + func (b *Backend) Shutdown(context.Context) error + func (b *Backend) Start(ctx context.Context) error + func (b *Backend) StartFaucetSearch() (*FaucetSearchInfo, error) + func (b *Backend) Transfer(asset string, address string, amount string, memo string) error + func (b *Backend) UpdateFaucetRPC(newFaucetRPCUrl string) + func (b *Backend) UpdateFeedRPC(newFeedRPCUrl string) + func (b *Backend) UpdateNuklaiRPC(newNuklaiRPCUrl string) error + type BalanceInfo struct + Bal string + Has bool + ID string + Str string + type BlockInfo struct + Consumed string + FailTxs int + Height uint64 + ID string + Latency int64 + Prices string + Size string + StateRoot string + TPS string + Timestamp int64 + Txs int + type Config struct + FaucetRPC string + FeedRPC string + NuklaiRPC string + SearchCores int + type FaucetSearchInfo struct + Amount string + Attempts uint64 + Difficulty uint16 + Elapsed string + Err string + FaucetAddress string + Salt string + Solution string + TxID string + type FaucetSolutions struct + Alerts []*Alert + CurrentSearch *FaucetSearchInfo + PastSearches []*FaucetSearchInfo + type FeedInfo struct + Address string + Fee string + type FeedObject struct + Address string + ChainID string + Fee string + ID string + Message string + SubnetID string + Timestamp int64 + URL string + URLMeta *HTMLMeta + type GenericInfo struct + Category string + Count uint64 + Timestamp int64 + type HTMLMeta struct + Description string + Host string + Image string + SiteName string + Title string + URL string + func ParseHTML(url string, host string, resp io.Reader) *HTMLMeta + type Storage struct + func OpenStorage(databasePath string) (*Storage, error) + func (s *Storage) Close() error + func (s *Storage) DeleteDBKey(subnetID, chainID ids.ID, keyData []byte) error + func (s *Storage) GetAddresses(subnetID, chainID ids.ID) ([]*AddressInfo, error) + func (s *Storage) GetAssets(subnetID, chainID ids.ID) ([]ids.ID, []bool, error) + func (s *Storage) GetKey() (ed25519.PrivateKey, error) + func (s *Storage) GetSolutions(subnetID, chainID ids.ID) ([]*FaucetSearchInfo, error) + func (s *Storage) GetTransactions(subnetID, chainID ids.ID) ([]*TransactionInfo, error) + func (s *Storage) HasAsset(subnetID, chainID ids.ID, assetID ids.ID) (bool, error) + func (s *Storage) StoreAddress(subnetID, chainID ids.ID, address string, nickname string) error + func (s *Storage) StoreAsset(subnetID, chainID ids.ID, assetID ids.ID, owned bool) error + func (s *Storage) StoreKey(privateKey ed25519.PrivateKey) error + func (s *Storage) StoreSolution(subnetID, chainID ids.ID, solution *FaucetSearchInfo) error + func (s *Storage) StoreTransaction(subnetID, chainID ids.ID, tx *TransactionInfo) error + type TimeStat struct + Accounts set.Set[string] + Prices chain.Dimensions + Timestamp int64 + Transactions int + type TransactionInfo struct + Actor string + Fee string + ID string + Size string + Success bool + Summary string + Timestamp int64 + Type string + Units string + type Transactions struct + Alerts []*Alert + TxInfos []*TransactionInfo