model

package
v0.0.0-...-d110ae4 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	User          *User  `opensea:"user" json:"user"`
	ProfileImgURL string `opensea:"profile_img_url" json:"profileImgURL"`
	Address       string `opensea:"address" json:"address"`
	Config        string `opensea:"config" json:"config"`
}

func (*Account) AccountAddress

func (a *Account) AccountAddress() string

type AccountFees

type AccountFees struct {
	Account     *Account `opensea:"account" json:"account"`
	BasisPoints string   `opensea:"basis_points" json:"basisPoints"`
}

type Asset

type Asset struct {
	// OpenSea NFT ID
	ID int `opensea:"id" json:"id"`
	// The token ID of the NFT
	TokenID  string `opensea:"token_id" json:"tokenID"`
	NumSales int    `opensea:"num_sales" json:"numSales"`
	// The background color to be displayed with the item
	BackgroundColor *string `opensea:"background_color" json:"backgroundColor"`
	// An image for the item. Note that this is the cached URL we store on our end. The original image url is image_original_url
	ImageURL             string  `opensea:"image_url" json:"imageURL"`
	ImagePreviewURL      string  `opensea:"image_preview_url" json:"imagePreviewURL"`
	ImageThumbnailURL    string  `opensea:"image_thumbnail_url" json:"imageThumbnailURL"`
	ImageOriginalURL     string  `opensea:"image_original_url" json:"imageOriginalURL"`
	AnimationURL         *string `opensea:"animation_url" json:"animationURL"`
	AnimationOriginalURL *string `opensea:"animation_original_url" json:"animationOriginalURL"`
	// Name of the item
	Name        string  `opensea:"name" json:"name"`
	Description *string `opensea:"description" json:"description"`
	// External link to the original website for the item
	ExternalLink *string `opensea:"external_link" json:"externalLink"`
	// Dictionary of data on the contract itself (see asset contract section)
	AssetContract *Contract   `opensea:"asset_contract" json:"assetContract"`
	Permalink     string      `opensea:"permalink" json:"permalink"`
	Collection    *Collection `opensea:"collection" json:"collection"`
	Decimals      int         `opensea:"decimals" json:"decimals"`
	TokenMetadata string      `opensea:"token_metadata" json:"tokenMetadata"`
	// Dictionary of data on the owner (see account section)
	Owner      *Account     `opensea:"owner" json:"owner"`
	SellOrders []*SellOrder `opensea:"sell_orders,omitempty" json:"sellOrders,omitempty"`
	Creator    *Account     `opensea:"creator" json:"creator"`
	// A list of traits associated with the item (see traits section)
	Traits []*Trait `opensea:"traits" json:"traits"`
	// When this item was last sold (null if there was no last sale)
	LastSale                *LastSale       `opensea:"last_sale" json:"lastSale"`
	TopBid                  interface{}     `opensea:"top_bid" json:"topBid"`
	ListingDate             *string         `opensea:"listing_date" json:"listingDate"`
	IsPresale               bool            `opensea:"is_presale" json:"isPresale"`
	TransferFeePaymentToken *PaymentToken   `opensea:"transfer_fee_payment_token" json:"transferFeePaymentToken"`
	TransferFee             *string         `opensea:"transfer_fee" json:"transferFee"`
	RelatedAssets           []*Asset        `opensea:"related_assets" json:"relatedAssets"`
	Orders                  []*Order        `opensea:"orders" json:"orders"`
	Auctions                []interface{}   `opensea:"auctions" json:"auctions"`
	SupportsWyvern          bool            `opensea:"supports_wyvern" json:"supportsWyvern"`
	TopOwnerships           []*TopOwnership `opensea:"top_ownerships" json:"topOwnerships"`
	Ownership               interface{}     `opensea:"ownership" json:"ownership"`
	HighestBuyerCommitment  interface{}     `opensea:"highest_buyer_commitment" json:"highestBuyerCommitment"`
}

Asset The primary object in the OpenSea API is the asset, which represents a unique digital item whose ownership is managed by the blockchain. The below CryptoSaga hero is an example of an asset shown on OpenSea.

type AssetAddress

type AssetAddress struct {
	ID      string `opensea:"id" json:"id"`
	Address string `opensea:"address" json:"address"`
}

type AssetToken

type AssetToken struct {
	TokenID  string `opensea:"token_id" json:"tokenID"`
	Decimals int    `opensea:"decimals" json:"decimals"`
}

type AuctionType

type AuctionType string

AuctionType Auction type

const (
	// ATEnglish English Auctions
	ATEnglish AuctionType = "english"
	// ATDutch fixed-price and declining-price sell orders (Dutch Auctions)
	ATDutch AuctionType = "dutch"
	// ATMinPrice CryptoPunks bidding auctions
	ATMinPrice AuctionType = "min-price"
)

type Bundle

type Bundle struct {
	Maker         *Account     `opensea:"maker" json:"maker"`
	Slug          string       `opensea:"slug" json:"slug"`
	Assets        []*Asset     `opensea:"assets" json:"assets"`
	Name          string       `opensea:"name" json:"name"`
	Description   string       `opensea:"description" json:"description"`
	ExternalLink  *string      `opensea:"external_link" json:"externalLink"`
	AssetContract *Contract    `opensea:"asset_contract" json:"assetContract"`
	Permalink     string       `opensea:"permalink" json:"permalink"`
	SellOrders    []*SellOrder `opensea:"sell_orders" json:"sellOrders"`
}

Bundle Bundles are groups of items for sale on OpenSea. You can buy them all at once in one transaction, and you can create them without any transactions or gas, as long as you've already approved the assets inside.

func (*Bundle) BundleSlug

func (b *Bundle) BundleSlug() string

type BundleAccount

type BundleAccount struct {
	Account
	User int32 `opensea:"user" json:"user"`
}

type Collection

type Collection struct {
	// The collection name. Typically derived from the first contract imported to the collection but can be changed by the user
	Name string `opensea:"name" json:"name"`
	// Description for the model
	Description      string  `opensea:"description" json:"description"`
	ShortDescription *string `opensea:"short_description" json:"shortDescription"`
	// The collection slug that is used to link to the collection on OpenSea.
	// This value can change by the owner but must be unique across all collection slugs in OpenSea
	Slug string `opensea:"slug" json:"slug"`
	// External link to the original website for the collection
	ExternalURL string `opensea:"external_url" json:"externalURL"`
	// An image for the collection. Note that this is the cached URL we store on our end.
	// The original image url is image_original_url
	ImageURL      string  `opensea:"image_url" json:"imageURL"`
	LargeImageURL *string `opensea:"large_image_url" json:"largeImageURL"`
	// Approved editors on this collection.
	Editors []string `opensea:"editors" json:"editors"`
	// The payment tokens accepted for this collection
	PaymentTokens []*PaymentToken `opensea:"payment_tokens" json:"paymentTokens"`
	// A list of the contracts that are associated with this collection
	PrimaryAssetContracts []*Contract `opensea:"primary_asset_contracts" json:"primaryAssetContracts"`
	// A dictionary listing all the trait types available within this collection
	Traits map[string]map[string]float64 `opensea:"traits" json:"traits"`
	// A dictionary containing some sales statistics related to this collection, including trade volume and floor prices
	Stats *CollectionStats `opensea:"stats" json:"stats"`
	// Image used in the horizontal top banner for the collection.
	BannerImageURL string `opensea:"banner_image_url" json:"bannerImageURL"`
	// The payout address for the collection's royalties
	PayoutAddress string `opensea:"payout_address" json:"payoutAddress"`
	// The collector's fees that get paid out to them when sales are made for their collections
	DevSellerFeeBasisPoints string `opensea:"dev_seller_fee_basis_points" json:"devSellerFeeBasisPoints"`
	// The collection's approval status within OpenSea.
	// Can be not_requested (brand new collections), requested (collections that requested safelisting on our site),
	// approved (collections that are approved on our site and can be found in search results),
	// and verified (verified collections)
	SafelistRequestStatus string `opensea:"safelist_request_status" json:"safelistRequestStatus"`

	CreatedDate                 string      `opensea:"created_date" json:"createdDate"`
	DefaultToFiat               bool        `opensea:"default_to_fiat" json:"defaultToFiat"`
	DevBuyerFeeBasisPoints      string      `opensea:"dev_buyer_fee_basis_points" json:"devBuyerFeeBasisPoints"`
	DisplayData                 DisplayData `opensea:"display_data" json:"displayData"`
	Featured                    bool        `opensea:"featured" json:"featured"`
	FeaturedImageURL            *string     `opensea:"featured_image_url" json:"featuredImageURL"`
	Hidden                      bool        `opensea:"hidden" json:"hidden"`
	IsSubjectToWhitelist        bool        `opensea:"is_subject_to_whitelist" json:"isSubjectToWhitelist"`
	OnlyProxiedTransfers        bool        `opensea:"only_proxied_transfers" json:"onlyProxiedTransfers"`
	OpenseaBuyerFeeBasisPoints  string      `opensea:"opensea_buyer_fee_basis_points" json:"openseaBuyerFeeBasisPoints"`
	OpenseaSellerFeeBasisPoints string      `opensea:"opensea_seller_fee_basis_points" json:"openseaSellerFeeBasisPoints"`
	RequireEmail                bool        `opensea:"require_email" json:"requireEmail"`

	TwitterUsername   *string `opensea:"twitter_username" json:"twitterUsername"`
	InstagramUsername string  `opensea:"instagram_username" json:"instagramUsername"`
	MediumUsername    *string `opensea:"medium_username" json:"mediumUsername"`

	TelegramURL *string `opensea:"telegram_url" json:"telegramURL"`
	DiscordURL  string  `opensea:"discord_url" json:"discordURL"`
	ChatURL     *string `opensea:"chat_url" json:"chatURL"`
	WikiURL     *string `opensea:"wiki_url" json:"wikiURL"`
}

Collection Collections are used to represent all the assets in a single (or multiple) contract addresses and help users group items from the same creator. They have one or more owners and are typically associated with important metadata such as creator royalties and descriptions. Visit it(https://docs.opensea.io/reference/collection-model) to learn anymore.

func (*Collection) CollectionSlug

func (c *Collection) CollectionSlug() string

type CollectionStats

type CollectionStats struct {
	OneDayVolume          float64 `opensea:"one_day_volume" json:"oneDayVolume"`
	OneDayChange          float64 `opensea:"one_day_change" json:"oneDayChange"`
	OneDaySales           float64 `opensea:"one_day_sales" json:"oneDaySales"`
	OneDayAveragePrice    float64 `opensea:"one_day_average_price" json:"oneDayAveragePrice"`
	SevenDayVolume        float64 `opensea:"seven_day_volume" json:"sevenDayVolume"`
	SevenDayChange        float64 `opensea:"seven_day_change" json:"sevenDayChange"`
	SevenDaySales         float64 `opensea:"seven_day_sales" json:"sevenDaySales"`
	SevenDayAveragePrice  float64 `opensea:"seven_day_average_price" json:"sevenDayAveragePrice"`
	ThirtyDayVolume       float64 `opensea:"thirty_day_volume" json:"thirtyDayVolume"`
	ThirtyDayChange       float64 `opensea:"thirty_day_change" json:"thirtyDayChange"`
	ThirtyDaySales        float64 `opensea:"thirty_day_sales" json:"thirtyDaySales"`
	ThirtyDayAveragePrice float64 `opensea:"thirty_day_average_price" json:"thirtyDayAveragePrice"`
	TotalVolume           float64 `opensea:"total_volume" json:"totalVolume"`
	TotalSales            float64 `opensea:"total_sales" json:"totalSales"`
	TotalSupply           float64 `opensea:"total_supply" json:"totalSupply"`
	Count                 float64 `opensea:"count" json:"count"`
	NumOwners             int     `opensea:"num_owners" json:"numOwners"`
	AveragePrice          float64 `opensea:"average_price" json:"averagePrice"`
	NumReports            int     `opensea:"num_reports" json:"numReports"`
	MarketCap             float64 `opensea:"market_cap" json:"marketCap"`
	FloorPrice            float64 `opensea:"floor_price" json:"floorPrice"`
}

type Consideration

type Consideration struct {
	ItemType             int    `opensea:"itemType" json:"itemType"`
	Token                string `opensea:"token" json:"token"`
	IdentifierOrCriteria string `opensea:"identifierOrCriteria" json:"identifierOrCriteria"`
	StartAmount          string `opensea:"startAmount" json:"startAmount"`
	EndAmount            string `opensea:"endAmount" json:"endAmount"`
	Recipient            string `opensea:"recipient" json:"recipient"`
}

type Contract

type Contract struct {
	// Address of the asset contract
	Address           string       `opensea:"address" json:"address"`
	AssetContractType ContractType `opensea:"asset_contract_type" json:"assetContractType"`
	CreatedDate       string       `opensea:"created_date" json:"createdDate"`
	// Name of the asset contract
	Name           string  `opensea:"name" json:"name"`
	NftVersion     string  `opensea:"nft_version" json:"nftVersion"`
	OpenseaVersion *string `opensea:"opensea_version" json:"openseaVersion"`
	Owner          int     `opensea:"owner" json:"owner"`
	SchemaName     string  `opensea:"schema_name" json:"schemaName"`
	// Symbol, such as CKITTY
	Symbol      string `opensea:"symbol" json:"symbol"`
	TotalSupply string `opensea:"total_supply" json:"totalSupply"`
	// Description of the asset contract
	Description string `opensea:"description" json:"description"`
	// Link to the original website for this contract
	ExternalLink string `opensea:"external_link" json:"externalLink"`
	// Image associated with the asset contract
	ImageURL                    string      `opensea:"image_url" json:"imageURL"`
	DefaultToFiat               bool        `opensea:"default_to_fiat" json:"defaultToFiat"`
	DevBuyerFeeBasisPoints      int         `opensea:"dev_buyer_fee_basis_points" json:"devBuyerFeeBasisPoints"`
	DevSellerFeeBasisPoints     int         `opensea:"dev_seller_fee_basis_points" json:"devSellerFeeBasisPoints"`
	OnlyProxiedTransfers        bool        `opensea:"only_proxied_transfers" json:"onlyProxiedTransfers"`
	OpenseaBuyerFeeBasisPoints  int         `opensea:"opensea_buyer_fee_basis_points" json:"openseaBuyerFeeBasisPoints"`
	OpenseaSellerFeeBasisPoints int         `opensea:"opensea_seller_fee_basis_points" json:"openseaSellerFeeBasisPoints"`
	BuyerFeeBasisPoints         int         `opensea:"buyer_fee_basis_points" json:"buyerFeeBasisPoints"`
	SellerFeeBasisPoints        int         `opensea:"seller_fee_basis_points" json:"sellerFeeBasisPoints"`
	PayoutAddress               string      `opensea:"payout_address" json:"payoutAddress"`
	Collection                  *Collection `opensea:"collection,omitempty" json:"collection"`
}

Contract Asset contracts contain data about the contract itself, such as the CryptoKitties contract or the CoolCats contract.

func (*Contract) ContractAddress

func (c *Contract) ContractAddress() string

type ContractType

type ContractType string

ContractType Types of asset contracts Given by the asset_contract_type in the OpenSea API

const (
	Fungible     ContractType = "fungible"
	SemiFungible ContractType = "semi-fungible"
	NonFungible  ContractType = "non-fungible"
	Unknown      ContractType = "unknown"
)

type DisplayData

type DisplayData struct {
	CardDisplayStyle string `opensea:"card_display_style" json:"cardDisplayStyle"`
}

type Event

type Event struct {
	ApprovedAccount *Account `opensea:"approved_account" json:"approvedAccount"`
	// A subfield containing a simplified version of the Asset or Asset Bundle on which this event happened
	Asset *Asset `opensea:"asset" json:"asset"`
	// Ditto
	AssetBundle     *Bundle      `opensea:"asset_bundle" json:"assetBundle"`
	AuctionType     *AuctionType `opensea:"auction_type" json:"auctionType"`
	BidAmount       string       `opensea:"bid_amount" json:"bidAmount"`
	CollectionSlug  string       `opensea:"collection_slug" json:"collectionSlug"`
	ContractAddress string       `opensea:"contract_address" json:"contractAddress"`
	// When the event was recorded
	CreatedDate             string           `opensea:"created_date" json:"createdDate"`
	CustomEventName         *string          `opensea:"custom_event_name" json:"customEventName"`
	DevFeePaymentEvent      interface{}      `opensea:"dev_fee_payment_event" json:"devFeePaymentEvent"`
	DevSellerFeeBasisPoints int              `opensea:"dev_seller_fee_basis_points" json:"devSellerFeeBasisPoints"`
	Duration                *int32           `opensea:"duration,string" json:"duration,string"`
	EndingPrice             *decimal.Decimal `opensea:"ending_price" json:"endingPrice"`
	// Describes the event type
	EventType EventType `opensea:"event_type" json:"eventType"`
	// The accounts associated with this event.
	FromAccount *Account `opensea:"from_account" json:"fromAccount"`
	// Ditto
	ToAccount *Account `opensea:"to_account" json:"toAccount"`
	ID        int64    `opensea:"id" json:"id"`
	// A boolean value that is true if the sale event was a private sale
	IsPrivate    *bool    `opensea:"is_private" json:"isPrivate"`
	OwnerAccount *Account `opensea:"owner_account" json:"ownerAccount"`
	// The payment asset used in this transaction, such as ETH, WETH or DAI
	PaymentToken *PaymentToken `opensea:"payment_token" json:"paymentToken"`
	// The amount of the item that was sold. Applicable for semi-fungible assets
	Quantity      string           `opensea:"quantity" json:"quantity"`
	Seller        *Account         `opensea:"seller" json:"seller"`
	StartingPrice *decimal.Decimal `opensea:"starting_price" json:"startingPrice"`
	// The total price that the asset was bought for. This includes any royalties that might have been collected
	TotalPrice    *decimal.Decimal `opensea:"total_price" json:"totalPrice"`
	Transaction   *Transaction     `opensea:"transaction" json:"transaction"`
	WinnerAccount *Account         `opensea:"winner_account" json:"winnerAccount"`
	// eg: 2017-07-21T17:32:28Z
	ListingTime *string `opensea:"listing_time" json:"listingTime"`
}

Event Asset events represent state changes that occur for assets. This includes putting them on sale, bidding on them, selling them, cancelling sales, transferring them, and more.

type EventType

type EventType string

EventType Describes the event type

const (
	// ETCreated new auctions
	ETCreated EventType = "created"
	// ETSuccessful sales
	ETSuccessful EventType = "successful"
	// ETCancelled cancelled auctions
	ETCancelled    EventType = "cancelled"
	ETBidEntered   EventType = "bid_entered"
	ETBidWithdrawn EventType = "bid_withdrawn"
	ETTransfer     EventType = "transfer"
	ETOfferEntered EventType = "offer_entered"
	ETApprove      EventType = "approve"
)

type FeeMethod

type FeeMethod uint8
const (
	ProtocolFee FeeMethod = iota
	SplitFee
)

type HowToCall

type HowToCall uint8
const (
	Call HowToCall = iota
	DelegateCall
)

type LastSale

type LastSale struct {
	Asset          *AssetToken   `opensea:"asset" json:"asset"`
	AssetBundle    *Bundle       `opensea:"asset_bundle" json:"assetBundle"`
	EventType      string        `opensea:"event_type" json:"eventType"`
	EventTimestamp string        `opensea:"event_timestamp" json:"eventTimestamp"`
	AuctionType    *AuctionType  `opensea:"auction_type" json:"auctionType"`
	TotalPrice     string        `opensea:"total_price" json:"totalPrice"`
	PaymentToken   *PaymentToken `opensea:"payment_token" json:"paymentToken"`
	Transaction    *Transaction  `opensea:"transaction" json:"transaction"`
	CreatedDate    string        `opensea:"created_date" json:"createdDate"`
	Quantity       string        `opensea:"quantity" json:"quantity"`
}

type MakerAssetBundle

type MakerAssetBundle struct {
	Assets []*Asset `opensea:"assets" json:"assets"`
}

type Metadata

type Metadata struct {
	Asset           *AssetAddress `opensea:"asset" json:"asset"`
	Schema          string        `opensea:"schema" json:"schema"`
	ReferrerAddress string        `opensea:"referrerAddress" json:"referrerAddress"`
}

type Offer

type Offer struct {
	ItemType             int    `opensea:"itemType" json:"itemType"`
	Token                string `opensea:"token" json:"token"`
	IdentifierOrCriteria string `opensea:"identifierOrCriteria" json:"identifierOrCriteria"`
	StartAmount          string `opensea:"startAmount" json:"startAmount"`
	EndAmount            string `opensea:"endAmount" json:"endAmount"`
}

type Order

type Order struct {
	CreatedDate      string           `opensea:"created_date" json:"createdDate"`
	ClosingDate      string           `opensea:"closing_date" json:"closingDate"`
	ListingTime      int              `opensea:"listing_time" json:"listingTime"`
	ExpirationTime   int              `opensea:"expiration_time" json:"expirationTime"`
	OrderHash        string           `opensea:"order_hash" json:"orderHash"`
	ProtocolData     *Protocol        `opensea:"protocol_data" json:"protocolData"`
	ProtocolAddress  string           `opensea:"protocol_address" json:"protocolAddress"`
	Maker            *Account         `opensea:"maker" json:"maker"`
	Taker            *Account         `opensea:"taker" json:"taker"`
	CurrentPrice     *decimal.Decimal `opensea:"current_price" json:"currentPrice"`
	MakerFees        []*AccountFees   `opensea:"maker_fees" json:"makerFees"`
	TakerFees        []*AccountFees   `opensea:"taker_fees" json:"takerFees"`
	Side             Side             `opensea:"side" json:"side"`
	OrderType        string           `opensea:"order_type" json:"orderType"`
	Cancelled        bool             `opensea:"cancelled" json:"cancelled"`
	Finalized        bool             `opensea:"finalized" json:"finalized"`
	MarkedInvalid    bool             `opensea:"marked_invalid" json:"markedInvalid"`
	ClientSignature  string           `opensea:"client_signature" json:"clientSignature"`
	RelayId          string           `opensea:"relay_id" json:"relayId"`
	CriteriaProof    *string          `opensea:"criteria_proof" json:"criteriaProof"`
	MakerAssetBundle []*Bundle        `opensea:"maker_asset_bundle" json:"makerAssetBundle"`
	TakerAssetBundle []*Bundle        `opensea:"taker_asset_bundle" json:"takerAssetBundle"`
}

func (*Order) Hash

func (o *Order) Hash() string

type Owner

type Owner struct {
	Owner       *Account `opensea:"owner" json:"owner"`
	Quantity    string   `opensea:"quantity" json:"quantity"`
	CreatedDate string   `opensea:"created_date" json:"created_date"`
}

type Parameters

type Parameters struct {
	Offerer                         string           `opensea:"offerer" json:"offerer"`
	Offer                           *Offer           `opensea:"offer" json:"offer"`
	Consideration                   []*Consideration `opensea:"consideration" json:"consideration"`
	StartTime                       string           `opensea:"startTime" json:"startTime"`
	EndTime                         string           `opensea:"endTime" json:"endTime"`
	OrderType                       string           `opensea:"orderType" json:"orderType"`
	Zone                            string           `opensea:"zone" json:"zone"`
	ZoneHash                        string           `opensea:"zoneHash" json:"zoneHash"`
	Salt                            string           `opensea:"salt" json:"salt"`
	ConduitKey                      string           `opensea:"conduitKey" json:"conduitKey"`
	TotalOriginalConsiderationItems int              `opensea:"totalOriginalConsiderationItems" json:"totalOriginalConsiderationItems"`
	Counter                         int              `opensea:"counter" json:"counter"`
}

type PaymentToken

type PaymentToken struct {
	ID       int              `opensea:"id" json:"id"`
	Symbol   string           `opensea:"symbol" json:"symbol"`
	Address  string           `opensea:"address" json:"address"`
	ImageURL string           `opensea:"image_url" json:"imageURL"`
	Name     string           `opensea:"name" json:"name"`
	Decimals int              `opensea:"decimals" json:"decimals"`
	EthPrice *decimal.Decimal `opensea:"eth_price" json:"ethPrice"`
	UsdPrice *decimal.Decimal `opensea:"usd_price" json:"usdPrice"`
}

type Protocol

type Protocol struct {
	Parameters *Parameters `opensea:"parameters" json:"parameters"`
	Signature  string      `opensea:"signature" json:"signature"`
}

type SaleKind

type SaleKind uint8

SaleKind the kind of sell order use only_english=true for filtering for only English Auctions

const (
	// SaleKindFixedOrMinBidPrice fixed-price sales or min-bid auctions
	SaleKindFixedOrMinBidPrice SaleKind = iota
	// SaleKindDecliningPrice declining-price Dutch Auctions
	SaleKindDecliningPrice
)

type SellOrder

type SellOrder struct {
	Order
	Metadata     *SellOrderMetadata `opensea:"metadata" json:"metadata"`
	Maker        *BundleAccount     `opensea:"maker" json:"maker"`
	Taker        *BundleAccount     `opensea:"taker" json:"taker"`
	FeeRecipient *BundleAccount     `opensea:"fee_recipient" json:"feeRecipient"`
}

type SellOrderMetadata

type SellOrderMetadata struct {
	Bundle *SellOrderMetadataBundle `opensea:"bundle" json:"bundle"`
}

type SellOrderMetadataBundle

type SellOrderMetadataBundle struct {
	Assets      []*AssetAddress `opensea:"assets" json:"assets"`
	Schemas     []string        `opensea:"schemas" json:"schemas"`
	Name        string          `opensea:"name" json:"name"`
	Description string          `opensea:"description" json:"description"`
}

type Side

type Side uint8
const (
	SideBuy Side = iota
	SideSell
)

type TopOwnership

type TopOwnership struct {
	Owner    *Account `opensea:"owner" json:"owner"`
	Quantity string   `opensea:"quantity" json:"quantity"`
}

type Trait

type Trait struct {
	// The name of the trait (for example color)
	TraitType string `opensea:"trait_type" json:"traitType"`
	// The value of this trait (can be a string or number)
	Value interface{} `opensea:"value" json:"value"`
	// How this trait will be displayed (options are number, boost_percentage, boost_number, and date).
	// See the adding metadata section for more details
	DisplayType *TraitDisplayType `opensea:"display_type" json:"displayType"`
	MaxValue    *decimal.Decimal  `opensea:"max_value" json:"maxValue"`
	TraitCount  int32             `opensea:"trait_count" json:"traitCount"`
	Order       interface{}       `opensea:"order" json:"order"`
}

Trait Traits are special properties on the item, that can either be numbers or strings. Below is an example of how OpenSea displays the traits for a specific item.

type TraitDisplayType

type TraitDisplayType string
const (
	TraitDTNumber          TraitDisplayType = "number"
	TraitDTBoostPercentage TraitDisplayType = "boost_percentage"
	TraitDTBoostNumber     TraitDisplayType = "boost_number"
	TraitDTDate            TraitDisplayType = "date"
)

type Transaction

type Transaction struct {
	BlockHash        string   `opensea:"block_hash" json:"blockHash"`
	BlockNumber      string   `opensea:"block_number" json:"blockNumber"`
	FromAccount      *Account `opensea:"from_account" json:"fromAccount"`
	ID               int      `opensea:"id" json:"id"`
	Timestamp        string   `opensea:"timestamp" json:"timestamp"`
	ToAccount        *Account `opensea:"to_account" json:"toAccount"`
	TransactionHash  string   `opensea:"transaction_hash" json:"transactionHash"`
	TransactionIndex string   `opensea:"transaction_index" json:"transactionIndex"`
}

type User

type User struct {
	Username string `opensea:"username" json:"username"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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