thirdparty

package
v0.162.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GroupCollectibleUIDsByChainID added in v0.162.13

func GroupCollectibleUIDsByChainID(uids []CollectibleUniqueID) map[w_common.ChainID][]CollectibleUniqueID

Types

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 {
	FetchCollectibleOwnersByContractAddress(chainID w_common.ChainID, contractAddress common.Address) (*CollectibleContractOwnership, error)
	IsChainSupported(chainID w_common.ChainID) bool
}

type CollectibleData added in v0.162.13

type CollectibleData struct {
	ID                 CollectibleUniqueID `json:"id"`
	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"`
	CollectionData     CollectionData      `json:"collection_data"`
}

type CollectibleDataContainer added in v0.162.13

type CollectibleDataContainer struct {
	Collectibles   []CollectibleData
	NextCursor     string
	PreviousCursor string
}

func (*CollectibleDataContainer) ToOwnershipContainer added in v0.162.13

func (c *CollectibleDataContainer) ToOwnershipContainer() CollectibleOwnershipContainer

type CollectibleHeader added in v0.162.13

type CollectibleHeader struct {
	ID                 CollectibleUniqueID `json:"id"`
	Name               string              `json:"name"`
	ImageURL           string              `json:"image_url"`
	AnimationURL       string              `json:"animation_url"`
	AnimationMediaType string              `json:"animation_media_type"`
	BackgroundColor    string              `json:"background_color"`
	CollectionName     string              `json:"collection_name"`
}

func CollectiblesToHeaders added in v0.162.13

func CollectiblesToHeaders(collectibles []CollectibleData) []CollectibleHeader

type CollectibleMetadataProvider added in v0.162.13

type CollectibleMetadataProvider interface {
	CanProvideCollectibleMetadata(id CollectibleUniqueID, tokenURI string) (bool, error)
	FetchCollectibleMetadata(id CollectibleUniqueID, tokenURI string) (*CollectibleData, 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 struct {
	Collectibles   []CollectibleUniqueID
	NextCursor     string
	PreviousCursor string
}

type CollectibleOwnershipProvider added in v0.162.13

type CollectibleOwnershipProvider interface {
	CanProvideAccountOwnership(chainID uint64) (bool, error)
	FetchAccountOwnership(chainID uint64, address common.Address) (*CollectibleData, error)
}

type CollectibleTrait added in v0.162.13

type CollectibleTrait struct {
	TraitType   string `json:"trait_type"`
	Value       string `json:"value"`
	DisplayType string `json:"display_type"`
	MaxValue    string `json:"max_value"`
}

type CollectibleUniqueID added in v0.162.13

type CollectibleUniqueID struct {
	ChainID         w_common.ChainID `json:"chainID"`
	ContractAddress common.Address   `json:"contractAddress"`
	TokenID         *bigint.BigInt   `json:"tokenID"`
}

func (*CollectibleUniqueID) HashKey added in v0.162.13

func (k *CollectibleUniqueID) HashKey() string

type CollectionData added in v0.162.13

type CollectionData struct {
	Name     string                     `json:"name"`
	Slug     string                     `json:"slug"`
	ImageURL string                     `json:"image_url"`
	Traits   map[string]CollectionTrait `json:"traits"`
}

type CollectionTrait added in v0.162.13

type CollectionTrait struct {
	Min float64 `json:"min"`
	Max float64 `json:"max"`
}

type DataParsed added in v0.159.2

type DataParsed struct {
	Name      string            `json:"name"`
	ID        string            `json:"id"`
	Inputs    map[string]string `json:"inputs"`
	Signature string            `json:"signature"`
}

type DecoderProvider added in v0.159.2

type DecoderProvider interface {
	Run(data string) (*DataParsed, error)
}

type HistoricalPrice added in v0.133.2

type HistoricalPrice struct {
	Timestamp int64   `json:"time"`
	Value     float64 `json:"close"`
}

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 TokenBalance struct {
	TokenID *bigint.BigInt `json:"tokenId"`
	Balance *bigint.BigInt `json:"balance"`
}

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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL