Documentation ¶
Index ¶
- Constants
- type Asset
- type AssetContainer
- type AssetContract
- type Client
- func (o *Client) FetchAllAssetsByOwner(chainID walletCommon.ChainID, owner common.Address, cursor string, limit int) (*thirdparty.FullCollectibleDataContainer, error)
- func (o *Client) FetchAllAssetsByOwnerAndCollection(chainID walletCommon.ChainID, owner common.Address, collectionSlug string, ...) (*thirdparty.FullCollectibleDataContainer, error)
- func (o *Client) FetchAllAssetsByOwnerAndContractAddress(chainID walletCommon.ChainID, owner common.Address, ...) (*thirdparty.FullCollectibleDataContainer, error)
- func (o *Client) FetchAllCollectionsByOwner(chainID walletCommon.ChainID, owner common.Address) ([]OwnedCollection, error)
- func (o *Client) FetchAllOpenseaAssetsByOwnerAndCollection(chainID walletCommon.ChainID, owner common.Address, collectionSlug string, ...) (*AssetContainer, error)
- func (o *Client) FetchAssetsByCollectibleUniqueID(uniqueIDs []thirdparty.CollectibleUniqueID) ([]thirdparty.FullCollectibleData, error)
- func (o *Client) FetchCollectionsDataByContractID(ids []thirdparty.ContractID) ([]thirdparty.CollectionData, error)
- func (o *Client) ID() string
- func (o *Client) IsChainSupported(chainID walletCommon.ChainID) bool
- type ClientV2
- func (o *ClientV2) FetchAllAssetsByOwner(chainID walletCommon.ChainID, owner common.Address, cursor string, limit int) (*thirdparty.FullCollectibleDataContainer, error)
- func (o *ClientV2) FetchAllAssetsByOwnerAndContractAddress(chainID walletCommon.ChainID, owner common.Address, ...) (*thirdparty.FullCollectibleDataContainer, error)
- func (o *ClientV2) FetchAssetsByCollectibleUniqueID(uniqueIDs []thirdparty.CollectibleUniqueID) ([]thirdparty.FullCollectibleData, error)
- func (o *ClientV2) ID() string
- func (o *ClientV2) IsChainSupported(chainID walletCommon.ChainID) bool
- type Collection
- type CollectionTrait
- type Contract
- type DetailedNFT
- type DetailedNFTContainer
- type HTTPClient
- type LastSale
- type NFT
- type NFTContainer
- type OwnedCollection
- type OwnerV2
- type PaymentToken
- type SellOrder
- type Trait
- type TraitV2
- type TraitValue
Constants ¶
View Source
const AssetLimit = 200
View Source
const ChainIDRequiringAPIKey = walletCommon.EthereumMainnet
View Source
const CollectionLimit = 300
View Source
const (
EventOpenseaV1StatusChanged walletevent.EventType = "wallet-collectible-opensea-v1-status-changed"
)
View Source
const (
EventOpenseaV2StatusChanged walletevent.EventType = "wallet-collectible-opensea-v2-status-changed"
)
View Source
const OpenseaV1ID = "openseaV1"
View Source
const (
OpenseaV2ID = "openseaV2"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Asset ¶
type Asset struct { ID int `json:"id"` TokenID *bigint.BigInt `json:"token_id"` Name string `json:"name"` Description string `json:"description"` Permalink string `json:"permalink"` ImageThumbnailURL string `json:"image_thumbnail_url"` ImageURL string `json:"image_url"` AnimationURL string `json:"animation_url"` Contract Contract `json:"asset_contract"` Collection Collection `json:"collection"` Traits []Trait `json:"traits"` LastSale LastSale `json:"last_sale"` SellOrders []SellOrder `json:"sell_orders"` BackgroundColor string `json:"background_color"` TokenURI string `json:"token_metadata"` }
type AssetContainer ¶
type AssetContract ¶ added in v0.162.15
type AssetContract struct {
Collection Collection `json:"collection"`
}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶ added in v0.162.13
func NewClient(apiKey string, httpClient *HTTPClient, feed *event.Feed) *Client
new opensea v1 client.
func (*Client) FetchAllAssetsByOwner ¶ added in v0.138.1
func (o *Client) FetchAllAssetsByOwner(chainID walletCommon.ChainID, owner common.Address, cursor string, limit int) (*thirdparty.FullCollectibleDataContainer, error)
func (*Client) FetchAllAssetsByOwnerAndCollection ¶
func (o *Client) FetchAllAssetsByOwnerAndCollection(chainID walletCommon.ChainID, owner common.Address, collectionSlug string, cursor string, limit int) (*thirdparty.FullCollectibleDataContainer, error)
func (*Client) FetchAllAssetsByOwnerAndContractAddress ¶ added in v0.138.8
func (o *Client) FetchAllAssetsByOwnerAndContractAddress(chainID walletCommon.ChainID, owner common.Address, contractAddresses []common.Address, cursor string, limit int) (*thirdparty.FullCollectibleDataContainer, error)
func (*Client) FetchAllCollectionsByOwner ¶
func (o *Client) FetchAllCollectionsByOwner(chainID walletCommon.ChainID, owner common.Address) ([]OwnedCollection, error)
func (*Client) FetchAllOpenseaAssetsByOwnerAndCollection ¶ added in v0.162.13
func (o *Client) FetchAllOpenseaAssetsByOwnerAndCollection(chainID walletCommon.ChainID, owner common.Address, collectionSlug string, cursor string, limit int) (*AssetContainer, error)
Only here for compatibility with mobile app, to be removed
func (*Client) FetchAssetsByCollectibleUniqueID ¶ added in v0.162.13
func (o *Client) FetchAssetsByCollectibleUniqueID(uniqueIDs []thirdparty.CollectibleUniqueID) ([]thirdparty.FullCollectibleData, error)
func (*Client) FetchCollectionsDataByContractID ¶ added in v0.162.15
func (o *Client) FetchCollectionsDataByContractID(ids []thirdparty.ContractID) ([]thirdparty.CollectionData, error)
func (*Client) IsChainSupported ¶ added in v0.162.15
func (o *Client) IsChainSupported(chainID walletCommon.ChainID) bool
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, feed *event.Feed) *ClientV2
new opensea v2 client.
func (*ClientV2) FetchAllAssetsByOwner ¶ added in v0.163.14
func (o *ClientV2) FetchAllAssetsByOwner(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(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(uniqueIDs []thirdparty.CollectibleUniqueID) ([]thirdparty.FullCollectibleData, error)
func (*ClientV2) IsChainSupported ¶ added in v0.163.14
func (o *ClientV2) IsChainSupported(chainID walletCommon.ChainID) bool
type Collection ¶
type Collection struct { Name string `json:"name"` Slug string `json:"slug"` ImageURL string `json:"image_url"` Traits map[string]CollectionTrait `json:"traits"` }
type CollectionTrait ¶
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"` 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 LastSale ¶
type LastSale struct {
PaymentToken PaymentToken `json:"payment_token"`
}
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 OwnedCollection ¶ added in v0.137.2
type OwnedCollection struct { Collection OwnedAssetCount *bigint.BigInt `json:"owned_asset_count"` }
type PaymentToken ¶
type Trait ¶
type Trait struct { TraitType string `json:"trait_type"` Value TraitValue `json:"value"` DisplayType string `json:"display_type"` MaxValue string `json:"max_value"` }
type TraitValue ¶
type TraitValue string
func (*TraitValue) UnmarshalJSON ¶
func (st *TraitValue) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.