alchemy

package
v0.179.17 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Overview

nolint: misspell

Index

Constants

View Source
const AlchemyID = "alchemy"

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset added in v0.162.15

type Asset struct {
	Contract    Contract       `json:"contract"`
	TokenID     *bigint.BigInt `json:"tokenId"`
	Name        string         `json:"name"`
	Description string         `json:"description"`
	Image       Image          `json:"image"`
	Raw         Raw            `json:"raw"`
	TokenURI    string         `json:"tokenUri"`
	Balance     *bigint.BigInt `json:"balance,omitempty"`
}

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 BatchContractAddresses added in v0.162.15

type BatchContractAddresses struct {
	Addresses []common.Address `json:"contractAddresses"`
}

type BatchTokenIDs added in v0.162.15

type BatchTokenIDs struct {
	IDs []TokenID `json:"tokens"`
}

type Client

type Client struct {
	thirdparty.CollectibleContractOwnershipProvider
	// contains filtered or unexported fields
}

func NewClient

func NewClient(apiKeys map[uint64]string) *Client

func (*Client) FetchAllAssetsByOwner added in v0.162.15

func (o *Client) FetchAllAssetsByOwner(ctx context.Context, 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(ctx context.Context, 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(ctx context.Context, uniqueIDs []thirdparty.CollectibleUniqueID) ([]thirdparty.FullCollectibleData, error)

func (*Client) FetchCollectibleOwnersByContractAddress added in v0.162.13

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

func (*Client) FetchCollectionSocials added in v0.179.17

func (o *Client) FetchCollectionSocials(ctx context.Context, contractID thirdparty.ContractID) (*thirdparty.CollectionSocials, error)

func (*Client) FetchCollectionsDataByContractID added in v0.162.15

func (o *Client) FetchCollectionsDataByContractID(ctx context.Context, 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

func (*Client) IsConnected

func (o *Client) IsConnected() bool

type CollectibleContractOwnership added in v0.162.13

type CollectibleContractOwnership struct {
	Owners  []CollectibleOwner `json:"owners"`
	PageKey string             `json:"pageKey"`
}

type CollectibleOwner added in v0.162.13

type CollectibleOwner struct {
	OwnerAddress  common.Address `json:"ownerAddress"`
	TokenBalances []TokenBalance `json:"tokenBalances"`
}

type Contract added in v0.162.15

type Contract struct {
	Address         common.Address  `json:"address"`
	Name            string          `json:"name"`
	Symbol          string          `json:"symbol"`
	TokenType       string          `json:"tokenType"`
	OpenSeaMetadata OpenSeaMetadata `json:"openseaMetadata"`
}

type ContractList added in v0.162.15

type ContractList struct {
	Contracts []Contract `json:"contracts"`
}

type Image added in v0.162.15

type Image struct {
	ImageURL             string `json:"pngUrl"`
	CachedAnimationURL   string `json:"cachedUrl"`
	OriginalAnimationURL string `json:"originalUrl"`
}

type NFTList added in v0.162.15

type NFTList struct {
	NFTs []Asset `json:"nfts"`
}

type OpenSeaMetadata added in v0.162.15

type OpenSeaMetadata struct {
	ImageURL        string `json:"imageUrl"`
	TwitterUsername string `json:"twitterUsername"`
	ExternalURL     string `json:"externalUrl"`
}

type OwnedNFTList added in v0.162.15

type OwnedNFTList struct {
	OwnedNFTs  []Asset        `json:"ownedNfts"`
	TotalCount *bigint.BigInt `json:"totalCount"`
	PageKey    string         `json:"pageKey"`
}

type Raw added in v0.162.15

type Raw struct {
	RawMetadata interface{} `json:"metadata"`
}

func (*Raw) UnmarshalJSON added in v0.168.1

func (r *Raw) UnmarshalJSON(b []byte) error

type RawFull added in v0.171.21

type RawFull struct {
	RawMetadata RawMetadata `json:"metadata"`
}

type RawMetadata added in v0.162.15

type RawMetadata struct {
	Attributes []Attribute `json:"attributes"`
}

type TokenBalance

type TokenBalance struct {
	TokenID *bigint.BigInt `json:"tokenId"`
	Balance *bigint.BigInt `json:"balance"`
}

type TokenID added in v0.162.15

type TokenID struct {
	ContractAddress common.Address `json:"contractAddress"`
	TokenID         *bigint.BigInt `json:"tokenId"`
}

Jump to

Keyboard shortcuts

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