Documentation ¶
Index ¶
- Constants
- Variables
- func GroupCollectibleUIDsByChainID(uids []CollectibleUniqueID) map[w_common.ChainID][]CollectibleUniqueID
- func GroupContractIDsByChainID(ids []ContractID) map[w_common.ChainID][]ContractID
- type CollectibleAccountOwnershipProvider
- type CollectibleContractOwnership
- type CollectibleContractOwnershipProvider
- type CollectibleData
- type CollectibleDataContainer
- type CollectibleDataProvider
- type CollectibleMetadataProvider
- type CollectibleOwner
- type CollectibleOwnershipContainer
- type CollectibleProvider
- type CollectibleTrait
- type CollectibleUniqueID
- type CollectiblesContainer
- type CollectionData
- type CollectionDataContainer
- type CollectionDataProvider
- type CollectionTrait
- type ContractID
- type DataParsed
- type DecoderProvider
- type FullCollectibleData
- type FullCollectibleDataContainer
- type HistoricalPrice
- type MarketDataProvider
- type TokenBalance
- type TokenBalancesPerContractAddress
- type TokenDetails
- type TokenMarketValues
Constants ¶
View Source
const FetchFromStartCursor = ""
View Source
const FetchNoLimit = 0
Variables ¶
View Source
var (
ErrChainIDNotSupported = errors.New("chainID not supported")
)
Functions ¶
func GroupCollectibleUIDsByChainID ¶ added in v0.162.13
func GroupCollectibleUIDsByChainID(uids []CollectibleUniqueID) map[w_common.ChainID][]CollectibleUniqueID
func GroupContractIDsByChainID ¶ added in v0.162.15
func GroupContractIDsByChainID(ids []ContractID) map[w_common.ChainID][]ContractID
Types ¶
type CollectibleAccountOwnershipProvider ¶ added in v0.162.15
type CollectibleAccountOwnershipProvider interface { CollectibleProvider FetchAllAssetsByOwner(chainID w_common.ChainID, owner common.Address, cursor string, limit int) (*FullCollectibleDataContainer, error) FetchAllAssetsByOwnerAndContractAddress(chainID w_common.ChainID, owner common.Address, contractAddresses []common.Address, cursor string, limit int) (*FullCollectibleDataContainer, error) }
type CollectibleContractOwnership ¶ added in v0.162.13
type CollectibleContractOwnership struct { ContractAddress common.Address `json:"contractAddress"` Owners []CollectibleOwner `json:"owners"` }
type CollectibleContractOwnershipProvider ¶ added in v0.162.13
type CollectibleContractOwnershipProvider interface { CollectibleProvider FetchCollectibleOwnersByContractAddress(chainID w_common.ChainID, contractAddress common.Address) (*CollectibleContractOwnership, error) }
type CollectibleData ¶ added in v0.162.13
type CollectibleData struct { ID CollectibleUniqueID `json:"id"` Provider string `json:"provider"` Name string `json:"name"` Description string `json:"description"` Permalink string `json:"permalink"` ImageURL string `json:"image_url"` AnimationURL string `json:"animation_url"` AnimationMediaType string `json:"animation_media_type"` Traits []CollectibleTrait `json:"traits"` BackgroundColor string `json:"background_color"` TokenURI string `json:"token_uri"` }
Collectible info
type CollectibleDataContainer ¶ added in v0.162.13
type CollectibleDataContainer CollectiblesContainer[CollectibleData]
type CollectibleDataProvider ¶ added in v0.162.15
type CollectibleDataProvider interface { CollectibleProvider FetchAssetsByCollectibleUniqueID(uniqueIDs []CollectibleUniqueID) ([]FullCollectibleData, error) }
type CollectibleMetadataProvider ¶ added in v0.162.13
type CollectibleMetadataProvider interface { CanProvideCollectibleMetadata(id CollectibleUniqueID, tokenURI string) (bool, error) FetchCollectibleMetadata(id CollectibleUniqueID, tokenURI string) (*FullCollectibleData, error) }
type CollectibleOwner ¶ added in v0.162.13
type CollectibleOwner struct { OwnerAddress common.Address `json:"ownerAddress"` TokenBalances []TokenBalance `json:"tokenBalances"` }
type CollectibleOwnershipContainer ¶ added in v0.162.13
type CollectibleOwnershipContainer CollectiblesContainer[CollectibleUniqueID]
type CollectibleProvider ¶ added in v0.162.15
type CollectibleTrait ¶ added in v0.162.13
type CollectibleUniqueID ¶ added in v0.162.13
type CollectibleUniqueID struct { ContractID ContractID `json:"contractID"` TokenID *bigint.BigInt `json:"tokenID"` }
func (*CollectibleUniqueID) HashKey ¶ added in v0.162.13
func (k *CollectibleUniqueID) HashKey() string
type CollectiblesContainer ¶ added in v0.162.15
type CollectionData ¶ added in v0.162.13
type CollectionData struct { ID ContractID `json:"id"` Provider string `json:"provider"` Name string `json:"name"` Slug string `json:"slug"` ImageURL string `json:"image_url"` Traits map[string]CollectionTrait `json:"traits"` }
Collection info
type CollectionDataContainer ¶ added in v0.162.15
type CollectionDataContainer CollectiblesContainer[CollectionData]
type CollectionDataProvider ¶ added in v0.163.14
type CollectionDataProvider interface { CollectibleProvider FetchCollectionsDataByContractID(ids []ContractID) ([]CollectionData, error) }
type CollectionTrait ¶ added in v0.162.13
type ContractID ¶ added in v0.162.15
type ContractID struct { ChainID w_common.ChainID `json:"chainID"` Address common.Address `json:"address"` }
func (*ContractID) HashKey ¶ added in v0.162.15
func (k *ContractID) HashKey() string
type DataParsed ¶ added in v0.159.2
type DecoderProvider ¶ added in v0.159.2
type DecoderProvider interface {
Run(data string) (*DataParsed, error)
}
type FullCollectibleData ¶ added in v0.162.15
type FullCollectibleData struct { CollectibleData CollectibleData CollectionData *CollectionData }
Combined Collection+Collectible info returned by the CollectibleProvider Some providers may not return the CollectionData in the same API call, so it's optional
type FullCollectibleDataContainer ¶ added in v0.162.15
type FullCollectibleDataContainer CollectiblesContainer[FullCollectibleData]
func (*FullCollectibleDataContainer) ToOwnershipContainer ¶ added in v0.162.15
func (c *FullCollectibleDataContainer) ToOwnershipContainer() CollectibleOwnershipContainer
type HistoricalPrice ¶ added in v0.133.2
type MarketDataProvider ¶ added in v0.133.2
type MarketDataProvider interface { FetchPrices(symbols []string, currencies []string) (map[string]map[string]float64, error) FetchHistoricalDailyPrices(symbol string, currency string, limit int, allData bool, aggregate int) ([]HistoricalPrice, error) FetchHistoricalHourlyPrices(symbol string, currency string, limit int, aggregate int) ([]HistoricalPrice, error) FetchTokenMarketValues(symbols []string, currency string) (map[string]TokenMarketValues, error) FetchTokenDetails(symbols []string) (map[string]TokenDetails, error) }
type TokenBalance ¶ added in v0.146.3
type TokenBalancesPerContractAddress ¶ added in v0.162.5
type TokenBalancesPerContractAddress = map[common.Address][]TokenBalance
type TokenDetails ¶ added in v0.133.2
type TokenDetails struct { ID string `json:"Id"` Name string `json:"Name"` Symbol string `json:"Symbol"` Description string `json:"Description"` TotalCoinsMined float64 `json:"TotalCoinsMined"` AssetLaunchDate string `json:"AssetLaunchDate"` AssetWhitepaperURL string `json:"AssetWhitepaperUrl"` AssetWebsiteURL string `json:"AssetWebsiteUrl"` BuiltOn string `json:"BuiltOn"` SmartContractAddress string `json:"SmartContractAddress"` }
type TokenMarketValues ¶ added in v0.133.2
type TokenMarketValues struct { MKTCAP float64 `json:"MKTCAP"` HIGHDAY float64 `json:"HIGHDAY"` LOWDAY float64 `json:"LOWDAY"` CHANGEPCTHOUR float64 `json:"CHANGEPCTHOUR"` CHANGEPCTDAY float64 `json:"CHANGEPCTDAY"` CHANGEPCT24HOUR float64 `json:"CHANGEPCT24HOUR"` CHANGE24HOUR float64 `json:"CHANGE24HOUR"` }
Click to show internal directories.
Click to hide internal directories.