opensea

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormalizeCollectible

func NormalizeCollectible(c Collectible, coinIndex uint) types.Collectible

func NormalizeCollectiblePage

func NormalizeCollectiblePage(collectibles []Collectible, coinIndex uint) (page types.CollectiblePage)

func NormalizeCollection

func NormalizeCollection(c Collection, coinIndex uint, owner string) types.Collection

func NormalizeCollections

func NormalizeCollections(collections []Collection, coinIndex uint, owner string) (page types.CollectionPage)

Types

type AssetContract

type AssetContract struct {
	Address      string `json:"address"`
	Category     string `json:"name"`
	ExternalLink string `json:"external_link"`
	Type         string `json:"schema_name"`
	Version      string `json:"nft_version"`
}

type Client

type Client struct {
	client.Request
}

func InitClient

func InitClient(api string, apiKey string) *Client

func (*Client) GetCollectibles

func (c *Client) GetCollectibles(owner, collectionId string, coinIndex uint) (types.CollectiblePage, error)

func (Client) GetCollectiblesByCollectionId

func (c Client) GetCollectiblesByCollectionId(owner string, collectionId string) ([]Collectible, error)

func (*Client) GetCollections

func (c *Client) GetCollections(owner string, coinIndex uint) (types.CollectionPage, error)

func (Client) GetCollectionsByOwner

func (c Client) GetCollectionsByOwner(owner string) (page []Collection, err error)

type Collectible

type Collectible struct {
	TokenId         string                 `json:"token_id"`
	AssetContract   AssetContract          `json:"asset_contract"`
	ImageUrl        string                 `json:"image_url"`
	ImagePreviewUrl string                 `json:"image_preview_url"`
	Name            string                 `json:"name"`
	ExternalLink    string                 `json:"external_link"`
	Permalink       string                 `json:"permalink"`
	Description     string                 `json:"description"`
	Collection      CollectibleCollections `json:"collection"`

	// only available for ERC1155
	FeeToken    *TransferFeeToken `json:"transfer_fee_payment_token,omitempty"`
	TransferFee string            `json:"transfer_fee,omitempty"`
}

type CollectibleCollections

type CollectibleCollections struct {
	Name         string `json:"name"`
	Slug         string `json:"slug"`
	ExternalLink string `json:"external_url"`
}

type CollectiblePage

type CollectiblePage struct {
	Collectibles []Collectible `json:"assets"`
}

type Collection

type Collection struct {
	Name        string                 `json:"name"`
	ImageUrl    string                 `json:"image_url"`
	Description string                 `json:"description"`
	ExternalUrl string                 `json:"external_url"`
	Slug        string                 `json:"slug"`
	Total       *big.Int               `json:"owned_asset_count"`
	Contracts   []PrimaryAssetContract `json:"primary_asset_contracts"`
}

type DisplayData

type DisplayData struct {
	Images []string `json:"images"`
}

type PrimaryAssetContract

type PrimaryAssetContract struct {
	Name        string      `json:"name"`
	Address     string      `json:"address"`
	NftVersion  string      `json:"nft_version"`
	Symbol      string      `json:"symbol"`
	Description string      `json:"description"`
	Type        string      `json:"schema_name"`
	Data        DisplayData `json:"display_data"`
	Url         string      `json:"external_link"`
}

type TransferFeeToken

type TransferFeeToken struct {
	Address string `json:"address"`
}

Jump to

Keyboard shortcuts

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