opensea

package
v0.174.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OpenseaV2ID = "openseaV2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientV2 added in v0.163.14

type ClientV2 struct {
	// contains filtered or unexported fields
}

func NewClientV2 added in v0.163.14

func NewClientV2(apiKey string, httpClient *HTTPClient) *ClientV2

new opensea v2 client.

func (*ClientV2) FetchAllAssetsByOwner added in v0.163.14

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

func (*ClientV2) FetchAllAssetsByOwnerAndContractAddress added in v0.163.14

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

func (*ClientV2) FetchAssetsByCollectibleUniqueID added in v0.163.14

func (o *ClientV2) FetchAssetsByCollectibleUniqueID(ctx context.Context, uniqueIDs []thirdparty.CollectibleUniqueID) ([]thirdparty.FullCollectibleData, error)

func (*ClientV2) FetchCollectionsDataByContractID added in v0.170.0

func (o *ClientV2) FetchCollectionsDataByContractID(ctx context.Context, contractIDs []thirdparty.ContractID) ([]thirdparty.CollectionData, error)

func (*ClientV2) ID added in v0.163.14

func (o *ClientV2) ID() string

func (*ClientV2) IsChainSupported added in v0.163.14

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

func (*ClientV2) IsConnected added in v0.167.5

func (o *ClientV2) IsConnected() bool

type CollectionData added in v0.170.0

type CollectionData struct {
	Collection  string         `json:"collection"`
	Name        string         `json:"name"`
	Description string         `json:"description"`
	Owner       common.Address `json:"owner"`
	ImageURL    string         `json:"image_url"`
	Contracts   []ContractID   `json:"contracts"`
}

type ContractData added in v0.170.0

type ContractData struct {
	Address          common.Address `json:"address"`
	Chain            string         `json:"chain"`
	Collection       string         `json:"collection"`
	ContractStandard string         `json:"contract_standard"`
	Name             string         `json:"name"`
}

type ContractID added in v0.170.0

type ContractID struct {
	Address common.Address `json:"address"`
	Chain   string         `json:"chain"`
}

type DetailedNFT added in v0.163.14

type DetailedNFT struct {
	TokenID       *bigint.BigInt `json:"identifier"`
	Collection    string         `json:"collection"`
	Contract      common.Address `json:"contract"`
	TokenStandard string         `json:"token_standard"`
	Name          string         `json:"name"`
	Description   string         `json:"description"`
	ImageURL      string         `json:"image_url"`
	AnimationURL  string         `json:"animation_url"`
	MetadataURL   string         `json:"metadata_url"`
	Owners        []OwnerV2      `json:"owners"`
	Traits        []TraitV2      `json:"traits"`
}

type DetailedNFTContainer added in v0.166.11

type DetailedNFTContainer struct {
	NFT DetailedNFT `json:"nft"`
}

type HTTPClient added in v0.142.2

type HTTPClient struct {
	// contains filtered or unexported fields
}

func NewHTTPClient added in v0.163.14

func NewHTTPClient() *HTTPClient

type NFT added in v0.163.14

type NFT struct {
	TokenID       *bigint.BigInt `json:"identifier"`
	Collection    string         `json:"collection"`
	Contract      common.Address `json:"contract"`
	TokenStandard string         `json:"token_standard"`
	Name          string         `json:"name"`
	Description   string         `json:"description"`
	ImageURL      string         `json:"image_url"`
	MetadataURL   string         `json:"metadata_url"`
}

type NFTContainer added in v0.163.14

type NFTContainer struct {
	NFTs       []NFT  `json:"nfts"`
	NextCursor string `json:"next"`
}

type OwnerV2 added in v0.163.14

type OwnerV2 struct {
	Address  common.Address `json:"address"`
	Quantity *bigint.BigInt `json:"quantity"`
}

type TraitV2 added in v0.163.14

type TraitV2 struct {
	TraitType   string     `json:"trait_type"`
	DisplayType string     `json:"display_type"`
	MaxValue    string     `json:"max_value"`
	TraitCount  int        `json:"trait_count"`
	Order       string     `json:"order"`
	Value       TraitValue `json:"value"`
}

type TraitValue

type TraitValue string

func (*TraitValue) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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