infura

package
v0.163.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const InfuraID = "infura"

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset added in v0.162.15

type Asset struct {
	ContractAddress common.Address `json:"contract"`
	TokenID         *bigint.BigInt `json:"tokenId"`
	Metadata        AssetMetadata  `json:"metadata"`
}

type AssetMetadata added in v0.162.15

type AssetMetadata struct {
	Name         string      `json:"name"`
	Description  string      `json:"description"`
	Permalink    string      `json:"permalink"`
	ImageURL     string      `json:"image"`
	AnimationURL string      `json:"animation_url"`
	Attributes   []Attribute `json:"attributes"`
}

type Attribute added in v0.162.15

type Attribute struct {
	TraitType string         `json:"trait_type"`
	Value     AttributeValue `json:"value"`
}

type AttributeValue added in v0.162.15

type AttributeValue string

func (*AttributeValue) UnmarshalJSON added in v0.162.15

func (st *AttributeValue) UnmarshalJSON(b []byte) error

type Client

type Client struct {
	thirdparty.CollectibleContractOwnershipProvider

	IsConnected     bool
	IsConnectedLock sync.RWMutex
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiKey string, apiKeySecret string) *Client

func (*Client) FetchAllAssetsByOwner added in v0.162.15

func (o *Client) FetchAllAssetsByOwner(chainID walletCommon.ChainID, owner common.Address, cursor string, limit int) (*thirdparty.FullCollectibleDataContainer, error)

func (*Client) FetchAllAssetsByOwnerAndContractAddress added in v0.162.15

func (o *Client) FetchAllAssetsByOwnerAndContractAddress(chainID walletCommon.ChainID, owner common.Address, contractAddresses []common.Address, cursor string, limit int) (*thirdparty.FullCollectibleDataContainer, error)

func (*Client) FetchAssetsByCollectibleUniqueID added in v0.162.15

func (o *Client) FetchAssetsByCollectibleUniqueID(uniqueIDs []thirdparty.CollectibleUniqueID) ([]thirdparty.FullCollectibleData, error)

func (*Client) FetchCollectibleOwnersByContractAddress added in v0.162.13

func (o *Client) FetchCollectibleOwnersByContractAddress(chainID walletCommon.ChainID, contractAddress common.Address) (*thirdparty.CollectibleContractOwnership, error)

func (*Client) FetchCollectionsDataByContractID added in v0.162.15

func (o *Client) FetchCollectionsDataByContractID(contractIDs []thirdparty.ContractID) ([]thirdparty.CollectionData, error)

func (*Client) ID added in v0.162.15

func (o *Client) ID() string

func (*Client) IsChainSupported

func (o *Client) IsChainSupported(chainID walletCommon.ChainID) bool

type CollectibleContractOwnership added in v0.162.13

type CollectibleContractOwnership struct {
	Owners  []CollectibleOwner `json:"owners"`
	Network string             `json:"network"`
	Cursor  string             `json:"cursor"`
}

type CollectibleOwner added in v0.162.13

type CollectibleOwner struct {
	ContractAddress common.Address `json:"tokenAddress"`
	TokenID         *bigint.BigInt `json:"tokenId"`
	Amount          *bigint.BigInt `json:"amount"`
	OwnerAddress    common.Address `json:"ownerOf"`
}

type ContractMetadata added in v0.162.15

type ContractMetadata struct {
	ContractAddress string `json:"contract"`
	Name            string `json:"name"`
	Symbol          string `json:"symbol"`
	TokenType       string `json:"tokenType"`
}

type NFTList added in v0.162.15

type NFTList struct {
	Total      *bigint.BigInt `json:"total"`
	PageNumber int            `json:"pageNumber"`
	PageSize   int            `json:"pageSize"`
	Network    string         `json:"network"`
	Account    string         `json:"account"`
	Cursor     string         `json:"cursor"`
	Assets     []Asset        `json:"assets"`
}

Jump to

Keyboard shortcuts

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