Documentation
¶
Index ¶
- Constants
- type Account
- type AdditionalRecipient
- type AdvancedOrder
- type AdvancedOrderFulfillmentData
- type AdvancedOrderFulfillmentDataResponse
- type AdvancedOrderFulfillmentTransaction
- type AdvancedOrderInputData
- type AssetEvent
- type AssetEventResponse
- type AvailableAdvancedOrdersInputData
- type AvailableOrdersInputData
- type BaseOfferAndConsideration
- type BaseQueryParams
- type BasicOrderFulfillmentData
- type BasicOrderFulfillmentDataResponse
- type BasicOrderFulfillmentTransaction
- type BasicOrderParameters
- type BuildOfferPayload
- type BuildOfferResponse
- type Collection
- type CollectionFee
- type CollectionListing
- type CollectionPayload
- type CollectionSlug
- type CollectionStats
- type CollectionStatsInterval
- type CollectionStatsTotal
- type CollectionsResponse
- type Consideration
- type Contract
- type ContractAddress
- type CreateCriteriaOfferPayload
- type CreateListingResponse
- type CreateOrderPayload
- type Criteria
- type CriteriaResolver
- type CriteriaTrait
- type Current
- type Execution
- type Fee
- type FulfillConsideration
- type FulfillListingPayload
- type FulfillOfferPayload
- type FulfillOrder
- type Fulfiller
- type Fulfillment
- type FulfillmentComponent
- type FulfillmentData
- type FulfillmentDataResponse
- type FulfillmentTransaction
- func (t *FulfillmentTransaction) FunctionName() string
- func (t *FulfillmentTransaction) ParseInputDataToAdvancedOrder() (p *AdvancedOrderInputData, err error)
- func (t *FulfillmentTransaction) ParseInputDataToAvailableAdvancedOrders() (p *AvailableAdvancedOrdersInputData, err error)
- func (t *FulfillmentTransaction) ParseInputDataToAvailableOrders() (p *AvailableOrdersInputData, err error)
- func (t *FulfillmentTransaction) ParseInputDataToBasicOrder() (p *InputDataBasicOrderParameters, err error)
- func (t *FulfillmentTransaction) ParseInputDataToMatchAdvancedOrders() (p *MatchAdvancedOrdersInputData, err error)
- func (t *FulfillmentTransaction) ParseInputDataToMatchOrders() (p *MatchOrdersInputData, err error)
- func (t *FulfillmentTransaction) ParseInputDataToOrder() (*OrderInputData, error)
- type GetAllListingsByCollectionPayload
- type GetEventsByAccountPayload
- type GetEventsByCollectionPayload
- type GetEventsByNftPayload
- type GetEventsQueryParams
- type GetNftPayload
- type GetNftsBasePayload
- type GetNftsByAccountPayload
- type GetNftsByContractPayload
- type GetOrderPayload
- type GetOrderResponse
- type GetTraitOffersPayload
- type Identifier
- type InputDataBasicOrderParameters
- type ListCollectionsPayload
- type ListingsByCollectionResponse
- type MatchAdvancedOrdersInputData
- type MatchOrdersInputData
- type Nft
- type NftResponse
- type NftTrait
- type Nfts
- type NftsResponse
- type Offer
- type OfferResponse
- type Offers
- type Order
- type OrderInputData
- type OrderPayload
- type OrderResponse
- type OrdersResponse
- type Owner
- type PageableOffers
- type Parameters
- type PartialParameters
- type Payment
- type Price
- type ProtocolData
- type RankingFeature
- type Rarity
- type ReceivedItem
- type SingleCollection
- type SocialMediaAccount
- type Trait
- type Transaction
Constants ¶
const ( OrderByCreatedDate = "created_date" OrderByEthPrice = "eth_price" OrderDirectionAsc = "asc" OrderDirectionDesc = "desc" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { // The unique public blockchain identifier for the wallet. Address common.Address `json:"address"` // The OpenSea account's username. Username string `json:"username"` // The OpenSea account's image url. ProfileImageUrl string `json:"profile_image_url"` // The OpenSea account's banner url. BannerImageUrl string `json:"banner_image_url"` // Personal website for the OpenSea user. Website string `json:"website"` SocialMediaAccounts []*SocialMediaAccount `json:"social_media_accounts"` // The OpenSea account's bio. Bio string `json:"bio"` // Date the account was first added to OpenSea. JoinedDate string `json:"joined_date"` }
type AdditionalRecipient ¶
type AdvancedOrder ¶
type AdvancedOrderFulfillmentData ¶
type AdvancedOrderFulfillmentData struct { Transaction *AdvancedOrderFulfillmentTransaction `json:"transaction"` Orders []*AdvancedOrder `json:"orders"` }
type AdvancedOrderFulfillmentDataResponse ¶
type AdvancedOrderFulfillmentDataResponse struct { Protocol string `json:"protocol"` FulfillmentData *AdvancedOrderFulfillmentData `json:"fulfillment_data"` }
type AdvancedOrderFulfillmentTransaction ¶
type AdvancedOrderFulfillmentTransaction struct { // Function: required: Seaport protocol contract method to use to fulfill the order Function string `json:"function"` // Chain: required: Numeric Chain Identifier Chain int `json:"chain"` // To: required: Protocol contract address to use fto fulfill the order. To string `json:"to"` // Value: required: Wei value of the transaction Value *big.Int `json:"value"` // InputData: required: Decoded Call Data. InputData *AdvancedOrderInputData `json:"input_data"` }
type AdvancedOrderInputData ¶ added in v1.0.0
type AdvancedOrderInputData struct { AdvancedOrder *AdvancedOrder `json:"order"` CriteriaResolvers []CriteriaResolver `json:"criteriaResolvers"` FulfillerConduitKey string `json:"fulfillerConduitKey"` Recipient common.Address `json:"recipient"` }
type AssetEvent ¶ added in v0.9.5
type AssetEvent struct { EventType openseaenums.EventType `json:"event_type"` OrderHash string `json:"order_hash,omitempty"` OrderType any `json:"order_type,omitempty"` Chain string `json:"chain,omitempty"` Transaction string `json:"transaction"` ProtocolAddress string `json:"protocol_address,omitempty"` FromAddress string `json:"from_address,omitempty"` ToAddress string `json:"to_address,omitempty"` StartDate int64 `json:"start_date,omitempty"` ClosingDate int64 `json:"closing_date,omitempty"` ExpirationDate int64 `json:"expiration_date,omitempty"` Asset *Nft `json:"asset,omitempty"` Nft *Nft `json:"nft,omitempty"` Quantity int `json:"quantity,omitempty"` Maker string `json:"maker,omitempty"` Taker string `json:"taker,omitempty"` Payment *Payment `json:"payment,omitempty"` Criteria *Criteria `json:"criteria,omitempty"` }
type AssetEventResponse ¶ added in v0.9.5
type AssetEventResponse struct { AssetEvent []AssetEvent `json:"asset_event"` Next string `json:"next"` }
type AvailableAdvancedOrdersInputData ¶
type AvailableAdvancedOrdersInputData struct { AdvancedOrders []AdvancedOrder `json:"orders"` CriteriaResolvers []CriteriaResolver `json:"criteriaResolvers"` OfferFulfillments [][]FulfillmentComponent `json:"offerFulfillments"` ConsiderationFulfillments [][]FulfillmentComponent `json:"considerationFulfillments"` FulfillerConduitKey string `json:"fulfillerConduitKey"` Recipient common.Address `json:"recipient"` MaximumFulfilled string `json:"maximumFulfilled"` }
type AvailableOrdersInputData ¶
type AvailableOrdersInputData struct { Orders []Order `json:"orders"` OfferFulfillments [][]FulfillmentComponent `json:"offerFulfillments"` ConsiderationFulfillments [][]FulfillmentComponent `json:"considerationFulfillments"` FulfillerConduitKey string `json:"fulfillerConduitKey"` MaximumFulfilled string `json:"maximumFulfilled"` }
type BaseOfferAndConsideration ¶
type BaseOfferAndConsideration struct { ItemType openseaenums.ItemType `json:"itemType"` // Token: required: The item's token contract (with the null address used for native tokens) Token common.Address `json:"token"` // IdentifierOrCriteria: required: string or int // The ERC721 or ERC1155 token identifier or, in the case of a criteria-based item type, // a merkle root composed of the valid set of token identifiers for the item. // This value will be ignored for Ether and ERC20 item types, // and can optionally be zero for criteria-based item types to allow for any identifier. IdentifierOrCriteria json.Number `json:"identifierOrCriteria"` // StartAmount: required: string or int: The amount of the token in question that will be required should the order be fulfilled. StartAmount json.Number `json:"startAmount"` // EndAmount: required: string or int: When endAmount differs from startAmount, // the realized amount is calculated linearly based on the time elapsed since the order became active. EndAmount json.Number `json:"endAmount"` }
func (*BaseOfferAndConsideration) Validate ¶
func (b *BaseOfferAndConsideration) Validate() error
type BaseQueryParams ¶
type BaseQueryParams struct { // The number of NFTs to return. Must be between 1 and 200. Default: 50 Limit int `json:"limit"` // The cursor for the next page of results. This is returned from a previous request. Next string `json:"next"` }
func (*BaseQueryParams) ToQuery ¶
func (b *BaseQueryParams) ToQuery() url.Values
func (*BaseQueryParams) Validate ¶
func (b *BaseQueryParams) Validate() error
type BasicOrderFulfillmentData ¶
type BasicOrderFulfillmentData struct { // Transaction: required: The name of the fulfillment method and associated call data. Transaction *BasicOrderFulfillmentTransaction `json:"transaction"` // Orders: required: Array of Seaport Orders. Orders []*Order `json:"orders"` }
type BasicOrderFulfillmentDataResponse ¶
type BasicOrderFulfillmentDataResponse struct { Protocol string `json:"protocol"` FulfillmentData *BasicOrderFulfillmentData `json:"fulfillment_data"` }
type BasicOrderFulfillmentTransaction ¶
type BasicOrderFulfillmentTransaction struct { // Function: required: Seaport protocol contract method to use to fulfill the order Function string `json:"function"` // Chain: required: Numeric Chain Identifier Chain int `json:"chain"` // To: required: Protocol contract address to use fto fulfill the order. To string `json:"to"` // Value: required: Wei value of the transaction Value *big.Int `json:"value"` // InputData: required: Decoded Call Data. InputData *InputDataBasicOrderParameters `json:"input_data"` }
type BasicOrderParameters ¶
type BasicOrderParameters struct { ConsiderationToken string `json:"considerationToken"` ConsiderationIdentifier string `json:"considerationIdentifier"` ConsiderationAmount string `json:"considerationAmount"` Offerer string `json:"offerer"` Zone string `json:"zone"` OfferToken string `json:"offerToken"` OfferIdentifier string `json:"offerIdentifier"` OfferAmount string `json:"offerAmount"` BasicOrderType uint8 `json:"basicOrderType"` StartTime string `json:"startTime"` EndTime string `json:"endTime"` ZoneHash string `json:"zoneHash"` Salt string `json:"salt"` OffererConduitKey string `json:"offererConduitKey"` FulfillerConduitKey string `json:"fulfillerConduitKey"` TotalOriginalAdditionalRecipients string `json:"totalOriginalAdditionalRecipients"` AdditionalRecipients []*AdditionalRecipient `json:"additionalRecipients"` Signature string `json:"signature"` }
BasicOrderParameters is an auto generated low-level Go binding around an user-defined struct.
type BuildOfferPayload ¶
type BuildOfferPayload struct { // The address which supplies all the items in the offer. Offerer string `json:"offerer"` // The number of offers to place. Quantity int `json:"quantity"` // Criteria for the collection or trait offer Criteria *Criteria `json:"criteria"` // Exchange contract address. Must be one of ['0x00000000000000adc04c56bf30ac9d3c0aaf14dc'] ProtocolAddress string `json:"protocol_address"` // Builds the offer on OpenSea's signed zone to provide offer protections from receiving an item which is disabled from trading. OfferProtectionEnabled bool `json:"offer_protection_enabled"` }
func (*BuildOfferPayload) Validate ¶
func (p *BuildOfferPayload) Validate() error
type BuildOfferResponse ¶
type BuildOfferResponse struct { // Partial set of Seaport Order Parameters PartialParameters *PartialParameters `json:"partialParameters"` // Represents a list of token ids which can be used to fulfill the criteria offer. // When decoded using the provided SDK function, // developers can now see a list of all tokens that could be used to fulfill the offer. EncodedTokenIDs string `json:"encoded_token_ids"` }
type Collection ¶
type Collection struct { // Collection slug. A unique string to identify a collection on OpenSea Collection string `json:"collection"` // Name of the collection Name string `json:"name"` // Description of the collection Description string `json:"description"` // Square image used to represent the collection ImageUrl string `json:"image_url"` // Banner image used to represent the collection BannerImageUrl string `json:"banner_image_url"` // The unique public blockchain identifier, address, for the owner wallet. Owner string `json:"owner"` // Status of the collection verification requests. // not_requested requested approved verified disabled_top_trending SafelistStatus openseaenums.SafelistStatus `json:"safelist_status"` // Category of the collection (e.g. PFPs, Memberships, Art) Category string `json:"category"` // If the collection is currently able to be bought or sold using OpenSea IsDisabled bool `json:"is_disabled"` // If the collection is currently classified as 'Not Safe for Work' by OpenSea IsNsfw bool `json:"is_nsfw"` // If trait offers are currently being accepted for the collection TraitOffersEnabled bool `json:"trait_offers_enabled"` // OpenSea Link to collection OpenSeaUrl string `json:"opensea_url"` // External URL for the collection's website ProjectUrl string `json:"project_url"` // External URL for the collection's wiki WikiUrl string `json:"wiki_url"` // External URL for the collection's Discord server DiscordUrl string `json:"discord_url"` // External URL for the collection's Telegram group TelegramUrl string `json:"telegram_url"` // Username for the collection's Twitter account TwitterUsername string `json:"twitter_username"` // Username for the collection's Instagram account InstagramUsername string `json:"instagram_username"` // Define the Contract's Addresses and Chain Contracts []*Contract `json:"contracts"` }
type CollectionFee ¶
type CollectionFee struct { // Percentage of the sale price that is paid to the recipient Fee decimal.Decimal `json:"fee"` // The unique public blockchain identifier, address, for the recipient Recipient common.Address `json:"recipient"` // If the fee is required for the collection Required bool `json:"required"` }
type CollectionListing ¶
type CollectionListing struct { OrderHash string `json:"order_hash"` Type openseaenums.Type `json:"type"` Price *Price `json:"price"` ProtocolData *ProtocolData `json:"protocol_data"` }
type CollectionPayload ¶
type CollectionPayload struct { *BaseQueryParams CollectionSlug string `json:"collection_slug"` }
func (*CollectionPayload) Validate ¶
func (p *CollectionPayload) Validate() error
type CollectionSlug ¶
type CollectionSlug struct { // Unique string to identify a collection on OpenSea. // This can be found by visiting the collection on the OpenSea website and noting the last path parameter. Slug string `json:"slug"` }
type CollectionStats ¶
type CollectionStats struct { // The aggregate stats over the collection's lifetime Total *CollectionStatsTotal `json:"total"` // The stats for each interval Intervals []*CollectionStatsInterval `json:"intervals"` }
type CollectionStatsInterval ¶
type CollectionStatsInterval struct { // The interval for which the stats are calculated // one_day one_week one_month Interval string `json:"interval"` // The volume of sales for the collection during the specified interval Volume decimal.Decimal `json:"volume"` // The volume differential compared to the previous interval VolumeDiff decimal.Decimal `json:"volume_diff"` // The percentage change in volume compared to the previous interval VolumeChange decimal.Decimal `json:"volume_change"` // The number of sales for the collection during the specified interval Sales int64 `json:"sales"` // The percentage change in number of sales compared to the previous interval SalesDiff int64 `json:"sales_diff"` // The average sale price of NFTs in the collection during the interval AveragePrice decimal.Decimal `json:"average_price"` }
type CollectionStatsTotal ¶
type CollectionStatsTotal struct { // The all time volume of sales for the collection Volume decimal.Decimal `json:"volume"` // The all time number of sales for the collection Sales int64 `json:"sales"` // The all time average sale price of NFTs in the collection AveragePrice decimal.Decimal `json:"average_price"` // The current number of unique owners of NFTs in the collection NumOwners int64 `json:"num_owners"` // The current market cap of the collection MarketCap decimal.Decimal `json:"market_cap"` // The current lowest price of NFTs in the collection FloorPrice decimal.Decimal `json:"floor_price"` // The symbol of the payment asset for the floor price FloorPriceSymbol string `json:"floor_price_symbol"` }
type CollectionsResponse ¶
type CollectionsResponse struct { Collections []*Collection `json:"collections"` Next string `json:"next"` }
type Consideration ¶
type Consideration struct { *BaseOfferAndConsideration Recipient common.Address `json:"recipient"` }
func (*Consideration) Validate ¶
func (c *Consideration) Validate() error
type Contract ¶
type Contract struct { // The unique public blockchain identifier for the contract Address common.Address `json:"address"` // The chain on which the contract exists Chain string `json:"chain"` // A unique string (collection slug) to identify a collection on OpenSea Collection string `json:"collection,omitempty"` // The standard of the contract (e.g., ERC721, ERC1155) ContractStandaard string `json:"contract_standaard,omitempty"` // The name of the contract Name string `json:"name,omitempty"` // The total supply of the contract Supply int `json:"supply,omitempty"` }
Contract defines the Contract's Addresses and Chain
type ContractAddress ¶
type ContractAddress struct {
Address string `json:"address"`
}
type CreateCriteriaOfferPayload ¶
type CreateCriteriaOfferPayload struct { ProtocolData *ProtocolData `json:"protocol_data"` Criteria *Criteria `json:"criteria"` ProtocolAddress string `json:"protocol_address"` }
func (*CreateCriteriaOfferPayload) Validate ¶
func (p *CreateCriteriaOfferPayload) Validate() error
type CreateListingResponse ¶
type CreateListingResponse struct {
Order *OrderResponse `json:"order"`
}
type CreateOrderPayload ¶
type CreateOrderPayload struct { Parameters *Parameters `json:"parameters"` // Signature of the signed type data represented by the parameters field. Signature string `json:"signature"` // Exchange contract address. Must be one of ['0x00000000000000adc04c56bf30ac9d3c0aaf14dc'] ProtocolAddress string `json:"protocol_address"` }
func (*CreateOrderPayload) Validate ¶
func (p *CreateOrderPayload) Validate() error
type Criteria ¶
type Criteria struct { // The collection in which the criteria offer is being made for. Collection *CollectionSlug `json:"collection"` // The unique public blockchain identifier, address, for the NFT contract Contract *ContractAddress `json:"contract"` // The trait that the criteria offer is being made for. Trait *CriteriaTrait `json:"trait"` // Represents a list of token ids which can be used to fulfill the criteria offer. // When decoded using the provided SDK function, // developers can now see a list of all tokens that could be used to fulfill the offer. EncodedTokenIDs string `json:"encoded_token_ids"` }
type CriteriaResolver ¶
type CriteriaResolver struct { OrderIndex json.Number `json:"orderIndex"` Side openseaenums.OrderSide `json:"side"` Index json.Number `json:"index"` Identifier json.Number `json:"identifier"` CriteriaProof []string `json:"criteriaProof"` }
CriteriaResolver is an auto generated low-level Go binding around an user-defined struct.
type CriteriaTrait ¶
type Execution ¶
type Execution struct { Item ReceivedItem `json:"item"` Offerer common.Address `json:"offerer"` ConduitKey string `json:"conduitKey"` }
Execution is an auto generated low-level Go binding around an user-defined struct.
type Fee ¶
type Fee struct { Account *Identifier `json:"account"` BasisPoints string `json:"basis_points"` }
type FulfillConsideration ¶
type FulfillListingPayload ¶
type FulfillListingPayload struct { // Listing: required Listing *FulfillOrder `json:"listing"` // FulFiller: required FulFiller *Fulfiller `json:"fulfiller"` }
type FulfillOfferPayload ¶
type FulfillOfferPayload struct { Offer *FulfillOrder `json:"offer"` Fulfiller *Fulfiller `json:"fulfiller"` Consideration *FulfillConsideration `json:"consideration"` }
func (*FulfillOfferPayload) Validate ¶
func (p *FulfillOfferPayload) Validate() error
type FulfillOrder ¶
type Fulfiller ¶
type Fulfiller struct { // Address: required: Fulfiller address. Address string `json:"address"` }
type Fulfillment ¶
type Fulfillment struct { ConsiderationComponents []FulfillmentComponent `json:"considerationComponents"` OfferComponents []FulfillmentComponent `json:"offerComponents"` }
Fulfillment is an auto generated low-level Go binding around an user-defined struct.
type FulfillmentComponent ¶
type FulfillmentComponent struct { OrderIndex json.Number `json:"orderIndex"` ItemIndex json.Number `json:"itemIndex"` }
FulfillmentComponent is an auto generated low-level Go binding around an user-defined struct.
type FulfillmentData ¶
type FulfillmentData struct { // Transaction: required: The name of the fulfillment method and associated call data. Transaction *FulfillmentTransaction `json:"transaction"` // Orders: required: Array of Seaport Orders. Orders []*Order `json:"orders"` }
type FulfillmentDataResponse ¶
type FulfillmentDataResponse struct { Protocol string `json:"protocol"` FulfillmentData *FulfillmentData `json:"fulfillment_data"` }
type FulfillmentTransaction ¶
type FulfillmentTransaction struct { // Function: required: Seaport protocol contract method to use to fulfill the order Function string `json:"function"` // Chain: required: Numeric Chain Identifier Chain int `json:"chain"` // To: required: Protocol contract address to use fto fulfill the order. To string `json:"to"` // Value: required: Wei value of the transaction Value *big.Int `json:"value"` // InputData: required: Decoded Call Data. InputData any `json:"input_data"` }
func (*FulfillmentTransaction) FunctionName ¶
func (t *FulfillmentTransaction) FunctionName() string
func (*FulfillmentTransaction) ParseInputDataToAdvancedOrder ¶ added in v1.0.0
func (t *FulfillmentTransaction) ParseInputDataToAdvancedOrder() (p *AdvancedOrderInputData, err error)
func (*FulfillmentTransaction) ParseInputDataToAvailableAdvancedOrders ¶
func (t *FulfillmentTransaction) ParseInputDataToAvailableAdvancedOrders() (p *AvailableAdvancedOrdersInputData, err error)
func (*FulfillmentTransaction) ParseInputDataToAvailableOrders ¶
func (t *FulfillmentTransaction) ParseInputDataToAvailableOrders() (p *AvailableOrdersInputData, err error)
func (*FulfillmentTransaction) ParseInputDataToBasicOrder ¶
func (t *FulfillmentTransaction) ParseInputDataToBasicOrder() (p *InputDataBasicOrderParameters, err error)
func (*FulfillmentTransaction) ParseInputDataToMatchAdvancedOrders ¶
func (t *FulfillmentTransaction) ParseInputDataToMatchAdvancedOrders() (p *MatchAdvancedOrdersInputData, err error)
func (*FulfillmentTransaction) ParseInputDataToMatchOrders ¶ added in v0.9.6
func (t *FulfillmentTransaction) ParseInputDataToMatchOrders() (p *MatchOrdersInputData, err error)
func (*FulfillmentTransaction) ParseInputDataToOrder ¶ added in v1.0.0
func (t *FulfillmentTransaction) ParseInputDataToOrder() (*OrderInputData, error)
type GetAllListingsByCollectionPayload ¶
type GetAllListingsByCollectionPayload struct { // Unique string to identify a collection on OpenSea. // This can be found by visiting the collection on the OpenSea website and noting the last path parameter. CollectionSlug string `json:"collection_slug"` // required // The number of listings to return. Must be between 1 and 100. Default: 100 Limit int `json:"limit"` // The cursor for the next page of results. This is returned from a previous request. Next string `json:"next"` }
func (*GetAllListingsByCollectionPayload) ToQuery ¶
func (p *GetAllListingsByCollectionPayload) ToQuery() url.Values
func (*GetAllListingsByCollectionPayload) Validate ¶
func (p *GetAllListingsByCollectionPayload) Validate() error
type GetEventsByAccountPayload ¶ added in v0.9.5
type GetEventsByAccountPayload struct { *GetEventsQueryParams // Address : required: The unique public blockchain identifier for the contract or wallet. Address string `json:"address"` }
func (*GetEventsByAccountPayload) Validate ¶ added in v0.9.5
func (p *GetEventsByAccountPayload) Validate() error
type GetEventsByCollectionPayload ¶ added in v0.9.5
type GetEventsByCollectionPayload struct { *GetEventsQueryParams // CollectionSlug : required: Unique string to identify a collection on OpenSea. // This can be found by visiting the collection on the OpenSea website and noting the last path parameter. CollectionSlug string `json:"collection_slug"` }
func (*GetEventsByCollectionPayload) Validate ¶ added in v0.9.5
func (p *GetEventsByCollectionPayload) Validate() error
type GetEventsByNftPayload ¶ added in v0.9.5
type GetEventsByNftPayload struct { *GetEventsQueryParams // The unique public blockchain identifier for the contract or wallet. Address string `json:"address"` // The blockchain on which to filter the results. Chain chain.Chain `json:"chain"` // The NFT token id. Identifier string `json:"identifier"` }
func (*GetEventsByNftPayload) Validate ¶ added in v0.9.5
func (p *GetEventsByNftPayload) Validate() error
type GetEventsQueryParams ¶ added in v0.9.5
type GetEventsQueryParams struct { // Filter to only include events that occurred at or after the given timestamp. // The Unix epoch timstamp must be in seconds After *int64 `json:"after"` // Filter to only include events that occurred before the given timestamp. // The Unix epoch timstamp must be in seconds. Before *int64 `json:"before"` // The type of event to filter by. If not provided, only sales will be returned. EventType []openseaenums.EventType `json:"event_type"` // The cursor for the next page of results. This is returned from a previous request. Next *string `json:"next"` }
func (*GetEventsQueryParams) ToQuery ¶ added in v0.9.5
func (p *GetEventsQueryParams) ToQuery() url.Values
type GetNftPayload ¶
type GetNftPayload struct { // The unique public blockchain identifier for the contract or wallet. Address common.Address `json:"address"` // The NFT token id. Identifier string `json:"identifier"` }
func (*GetNftPayload) Validate ¶
func (p *GetNftPayload) Validate() error
type GetNftsBasePayload ¶
type GetNftsBasePayload struct { *BaseQueryParams // The unique public blockchain identifier for the contract or wallet. Address common.Address `json:"address"` // required }
func (*GetNftsBasePayload) ToQuery ¶
func (p *GetNftsBasePayload) ToQuery() url.Values
func (*GetNftsBasePayload) Validate ¶
func (p *GetNftsBasePayload) Validate() error
type GetNftsByAccountPayload ¶
type GetNftsByAccountPayload struct { *GetNftsBasePayload // Unique string to identify a collection on OpenSea. // This can be found by visiting the collection on the OpenSea website and noting the last path parameter. Collection string `json:"collection"` }
func (*GetNftsByAccountPayload) ToQuery ¶
func (p *GetNftsByAccountPayload) ToQuery() url.Values
func (*GetNftsByAccountPayload) Validate ¶
func (p *GetNftsByAccountPayload) Validate() error
type GetNftsByContractPayload ¶
type GetNftsByContractPayload struct {
*GetNftsBasePayload
}
type GetOrderPayload ¶
type GetOrderPayload struct { // The blockchain on which to filter the results. Chain string `json:"chain"` // The hash of the order to retrieve. OrderHash string `json:"order_hash"` // The contract address of the protocol to use in the request. ProtocolAddress string `json:"protocol_address"` }
func (*GetOrderPayload) Validate ¶
func (p *GetOrderPayload) Validate() error
type GetOrderResponse ¶
type GetOrderResponse struct { OrderHash string `json:"order_hash"` // An enumeration. // "listing" "auction" "item_offer" "collection_offer" "trait_offer" Type any `json:"type"` Price *Price `json:"price"` ProtocolData *ProtocolData `json:"protocol_data"` ProtocolAddress string `json:"protocol_address"` }
type GetTraitOffersPayload ¶
type GetTraitOffersPayload struct { // CollectionSlug: required: Unique string to identify a collection on OpenSea. // This can be found by visiting the collection on the OpenSea website and noting the last path parameter. CollectionSlug string `json:"collection_slug"` // The value of the trait (e.g. 0.5). // This is only used for decimal-based numeric traits to ensure it is parsed correctly. FloatValue *float64 `json:"float_value"` // The value of the trait (e.g. 10). // This is only used for numeric traits to ensure it is parsed correctly. IntValue *int `json:"int_value"` // The name of the trait (e.g. 'Background') Type *string `json:"type"` // The value of the trait (e.g. 'Red') Value *string `json:"value"` }
func (*GetTraitOffersPayload) ToQuery ¶
func (p *GetTraitOffersPayload) ToQuery() url.Values
func (*GetTraitOffersPayload) Validate ¶
func (p *GetTraitOffersPayload) Validate() error
type Identifier ¶
type Identifier struct { User int `json:"user"` // A placeholder image. For the actual profile image, call the Get Account endpoint. ProfileImgUrl string `json:"profile_img_url"` // The unique blockchain identifier, address, of the account. Address string `json:"address"` // affiliate - affiliate // affiliate_partner - affiliate_partner // affiliate_requested - affiliate_requested // affiliate_blacklisted - affiliate_blacklisted // verified - verified // moderator - moderator // staff - staff // employee - employee Config string `json:"config"` }
type InputDataBasicOrderParameters ¶
type InputDataBasicOrderParameters struct {
Parameters *BasicOrderParameters `json:"parameters"`
}
type ListCollectionsPayload ¶
type ListCollectionsPayload struct { // The blockchain on which to filter the results ChainIdentifier string `json:"chain_identifier"` // If true, will return hidden collections. Default: false IncludeHidden *bool `json:"include_hidden"` // The number of collections to return. Must be between 1 and 100. Default: 100 Limit int `json:"limit"` // The cursor for the next page of results. This is returned from a previous request. Next string `json:"next"` }
func (*ListCollectionsPayload) ToQuery ¶
func (p *ListCollectionsPayload) ToQuery() url.Values
func (*ListCollectionsPayload) Validate ¶
func (p *ListCollectionsPayload) Validate() error
type ListingsByCollectionResponse ¶
type ListingsByCollectionResponse struct { Listings []*CollectionListing `json:"listings"` Next string `json:"next"` }
type MatchAdvancedOrdersInputData ¶
type MatchAdvancedOrdersInputData struct { Orders []AdvancedOrder `json:"orders"` CriteriaResolvers []CriteriaResolver `json:"criteriaResolvers"` Fulfillments []Fulfillment `json:"fulfillments"` Recipient common.Address `json:"recipient"` }
type MatchOrdersInputData ¶ added in v0.9.5
type MatchOrdersInputData struct { Fulfillments []Fulfillment `json:"fulfillments"` Orders []Order `json:"orders"` }
type Nft ¶
type Nft struct { // The NFT's unique identifier within the smart contract (also referred to as token_id) Identifier string `json:"identifier"` // Collection slug. A unique string to identify a collection on OpenSea Collection string `json:"collection"` // The unique public blockchain identifier for the contract Contract string `json:"contract"` // ERC standard of the token (erc721, erc1155) TokenStandard string `json:"token_standard"` // Name of the NFT Name string `json:"name"` // Description of the NFT Description string `json:"description"` // Link to the image associated with the NFT ImageUrl string `json:"image_url"` // Link to the offchain metadata store MetadataUrl string `json:"metadata_url"` // Deprecated Field CreatedAt string `json:"created_at"` // Last time that the NFT's metadata was updated by OpenSea UpdatedAt string `json:"updated_at"` // If the item is currently able to be bought or sold using OpenSea IsDisabled bool `json:"is_disabled"` // If the item is currently classified as 'Not Safe for Work' by OpenSea IsNsfw bool `json:"is_nsfw"` // Link to the NFT's original animation. AnimationUrl string `json:"animation_url,omitempty"` // If the item has been reported for suspicious activity by OpenSea IsSuspicious bool `json:"is_suspicious,omitempty"` // The unique public blockchain identifier, wallet address, for the creator Creator string `json:"creator,omitempty"` // List of Trait objects. The field will be null if the NFT has more than 50 traits Traits []*NftTrait `json:"traits,omitempty"` // List of Owners. The field will be null if the NFT has more than 50 owners Owners []*Owner `json:"owners,omitempty"` // Rarity data for the NFT Rarity *Rarity `json:"rarity,omitempty"` }
type NftResponse ¶
type NftResponse struct {
Nft *Nft `json:"nft"`
}
type NftTrait ¶
type NftTrait struct { // The name of the trait category (e.g. 'Background') TraitType string `json:"trait_type"` // A field indicating how to display. None is used for string traits. // number boost_percentage boost_number author date None DisplayType *string `json:"display_type"` // Ceiling for possible numeric trait values MaxValue *string `json:"max_value"` // Deprecated Field. Use Get Collection API instead. TraitCount int `json:"trait_count"` // Deprecated Field Order *int `json:"order"` // The value of the trait (e.g. 'Red') // Type could be: number | integer | date | string Value any `json:"value"` }
type NftsResponse ¶
type Offer ¶
type Offer struct {
*BaseOfferAndConsideration
}
type OfferResponse ¶
type OfferResponse struct { // Order hash OrderHash string `json:"order_hash"` // OpenSea supported chains. Chain any `json:"chain"` // Criteria for collection or trait offers Criteria *Criteria `json:"criteria"` // The onchain order data. ProtocolData *ProtocolData `json:"protocol_data"` // Exchange contract address ProtocolAddress string `json:"protocol_address"` }
type Offers ¶
type Offers struct {
Offers []OfferResponse `json:"offers"`
}
type Order ¶
type Order struct { Parameters *Parameters `json:"parameters"` // Signature: required: The order maker's signature used to validate the order. Signature string `json:"signature"` }
type OrderInputData ¶
type OrderPayload ¶
type OrderPayload struct { // Filter results by the contract address for NFT(s). // NOTE: If used, token_ids or token_id is required. AssetContractAddress *string `query:"asset_contract_address"` // Restricts results to only include orders that are bundles of NFTs. Default: false Bundled *bool `query:"bundled"` // The cursor for the next page of results. This is returned from a previous request. Cursor *string `query:"cursor"` // The number of orders to return. Must be between 1 and 50. Default: 20 Limit *int `query:"limit"` // Filter to only include orders that were listed after the given timestamp. This is a Unix epoch timestamp in seconds. ListedAfter *time.Time `query:"listed_after"` // Filter to only include orders that were listed before the given timestamp. This is a Unix epoch timestamp in seconds. ListedBefore *time.Time `query:"listed_before"` // Filter results by the order maker's wallet address. Maker *string `query:"maker"` // The order in which to sort the results. Default: created_date // NOTE: If eth_price is used, asset_contract_address and token_id are required. OrderBy *string `query:"order_by"` // The direction in which to sort the results. Default: desc OrderDirection *string `query:"order_direction"` // Payment Token Address to filter results. This ensures all returned orders are listed in a single currency. PaymentTokenAddress *string `query:"payment_token_address"` // Filter results by the order taker's wallet address. Taker *string `query:"taker"` // An array of token IDs to search for (e.g. ?token_ids=1&token_ids=209). // This endpoint will return a list of orders with token_id matching any of the IDs in this array. // NOTE: If used, asset_contract_address is required. TokenIDs []json.Number `query:"token_ids"` }
func (*OrderPayload) Validate ¶
func (p *OrderPayload) Validate() error
type OrderResponse ¶
type OrderResponse struct { // Date the order was created CreatedDate string `json:"created_date"` // Date the order was closed ClosingDate string `json:"closing_date"` // Timestamp representation of created_date ListingTime int64 `json:"listing_time"` // Timestamp representation of closing_date ExpirationTime int64 `json:"expiration_time"` // An identifier for the order OrderHash string `json:"order_hash"` ProtocolData *ProtocolData `json:"protocol_data"` // Exchange Contract Address. Typically the address of the Seaport contract. ProtocolAddress string `json:"protocol_address"` // Current price of the order CurrentPrice string `json:"current_price"` // The unique blockchain identifier, address, of the wallet which is the order maker. Maker *Identifier `json:"maker"` // The unique blockchain identifier, address, of the wallet which is the order taker. Taker *Identifier `json:"taker"` MakerFees []*Fee `json:"maker_fees"` TakerFees []*Fee `json:"taker_fees"` // The side of the order, either bid (offer) or ask(listing). Side string `json:"side"` // basic - basic // dutch - dutch // english - english // criteria - criteria OrderType string `json:"order_type"` // If true, the order maker has canceled the order which means it can no longer be filled. Cancelled bool `json:"cancelled"` // If true, the order has already been filled. Finalized bool `json:"finalized"` // If true, the order is currently invalid and can not be filled. MarkedInvalid bool `json:"marked_invalid"` // The remaining quantity of the order that has not been filled. This is useful for erc1155 orders. RemainingQuantity int `json:"remaining_quantity"` // Deprecated Field RelayId string `json:"relay_id"` // A merkle root composed of the valid set of token identifiers for the order CriteriaProof []string `json:"criteria_proof"` // Deprecated MakerAssetBundle any `json:"maker_asset_bundle,omitempty"` // Deprecated TakerAssetBundle any `json:"taker_asset_bundle,omitempty"` }
type OrdersResponse ¶
type OrdersResponse struct { // The cursor for the next page of results. Next string `json:"next"` // The cursor for the previous page of results. Previous string `json:"previous"` // Models OrderV2 objects to serialize to a 'similar' schema to what we have with OrderV1s Orders []*OrderResponse `json:"orders"` }
func (*OrdersResponse) IsNotFound ¶
func (r *OrdersResponse) IsNotFound() bool
func (*OrdersResponse) ToJson ¶
func (r *OrdersResponse) ToJson() []byte
type PageableOffers ¶
type PageableOffers struct { Offers []OfferResponse `json:"offers"` Next string `json:"next"` }
type Parameters ¶
type Parameters struct { // Offerer: required: The address which supplies all the items in the offer. Offerer string `json:"offerer"` Offer []*Offer `json:"offer"` Consideration []*Consideration `json:"consideration"` StartTime json.Number `json:"startTime"` // string or int EndTime json.Number `json:"endTime"` // string or int // OrderType: required: The type of order, which determines how it can be executed. OrderType openseaenums.OrderType `json:"orderType"` // Zone: required: Optional secondary account attached the order which can cancel orders. // Additionally, when the OrderType is Restricted, the zone or the offerer are the only entities which can execute the order. // For open orders, use the zero address. // For restricted orders, use the signed zone address <SIGNED_ZONE_ADDRESS> Zone string `json:"zone"` // ZoneHash: required: A value that will be supplied to the zone when fulfilling restricted orders // that the zone can utilize when making a determination on whether to authorize the order. // Most often this value will be the zero hash 0x0000000000000000000000000000000000000000000000000000000000000000 ZoneHash string `json:"zoneHash"` // Salt: required: an arbitrary source of entropy for the order Salt string `json:"salt"` // ConduitKey: required: Indicates what conduit, if any, should be utilized as a source for // token approvals when performing transfers. // By default (i.e. when conduitKey is set to the zero hash), the offerer will grant transfer approvals to Seaport directly. // To utilize OpenSea's conduit, use 0x0000007b02230091a7ed01230072f7006a004d60a8d4e71d599b8104250f0000 ConduitKey string `json:"conduitKey"` // TotalOriginalConsiderationItems: required: Size of the consideration array. TotalOriginalConsiderationItems json.Number `json:"totalOriginalConsiderationItems"` Counter any `json:"counter,omitempty"` // any could be an integer or string }
func (*Parameters) Validate ¶
func (p *Parameters) Validate() error
type PartialParameters ¶
type PartialParameters struct { Considerations []Consideration `json:"considerations"` // Optional secondary account attached the order which can cancel orders. // Additionally, when the OrderType is Restricted, the zone or the offerer are the only entities which can execute the order. // For open orders, use the zero address. // For restricted orders, use the signed zone address 0x000000e7ec00e7b300774b00001314b8610022b8 Zone string `json:"zone"` // A value that will be supplied to the zone when fulfilling restricted orders that the zone can utilize // when making a determination on whether to authorize the order. // Most often this value will be the zero hash 0x0000000000000000000000000000000000000000000000000000000000000000 ZoneHash string `json:"zoneHash"` }
PartialParameters : Partial set of Seaport Order Parameters
type Payment ¶ added in v0.9.5
type Payment struct { // Amount of tokens in the order Quantity int `json:"quantity"` // The contract address for the ERC20 token TokenAddress string `json:"token_address"` // Returns the number of decimals the token uses - // e.g. 8, means to divide the token amount by 100000000 to get its user representation. Decimals *big.Int `json:"decimals"` // Returns the symbol of the token, e.g. ETH, WETH, USDC, etc Symbol string `json:"symbol"` }
type ProtocolData ¶
type ProtocolData struct { Parameters *Parameters `json:"parameters"` Signature string `json:"signature"` }
type RankingFeature ¶
type RankingFeature struct { // Deprecated Field. UniqueAttributeCount int `json:"unique_attribute_count"` }
type Rarity ¶
type Rarity struct { // Rarity algorithm used. Currently, always 'openrarity' (but in fact, the value may be null) StrategyId any `json:"strategy_id"` // Deprecated Field StrategyVersion *string `json:"strategy_version"` // Rarity : required: Rank of the NFT in the collection Rank int `json:"rank"` // Deprecated Field: should be a number Score any `json:"score"` // Deprecated Field CalculatedAt string `json:"calculated_at"` // Deprecated Field: should be an integer MaxRank any `json:"max_rank"` TokensScored int `json:"tokens_scored"` // Deprecated Field RankingFeatures *RankingFeature `json:"ranking_features"` }
Rarity data for the NFT
type ReceivedItem ¶
type ReceivedItem struct { ItemType uint8 `json:"itemType"` Token common.Address `json:"token"` Identifier json.Number `json:"identifier"` Amount json.Number `json:"amount"` Recipient common.Address `json:"recipient"` }
ReceivedItem is an auto generated low-level Go binding around an user-defined struct.
type SingleCollection ¶
type SingleCollection struct { *Collection // List of editor addresses for the collection Editors []common.Address `json:"editors"` // List of fees for the collection including creator earnings and OpenSea fees Fees []*CollectionFee `json:"fees"` }
type SocialMediaAccount ¶
type Trait ¶
type Trait struct { // List of trait categories, e.g. Background, in the collection and their type, e.g. string Categories map[string]any `json:"categories"` // If the category type is STRING, the dict will contain each trait value and its count. // Otherwise, the dict will contain the min and max value seen in the collection Counts map[string]any `json:"counts"` }
type Transaction ¶
type Transaction struct { // Function: required: Seaport protocol contract method to use to fulfill the order Function string `json:"function"` // Chain: required: Numeric Chain Identifier Chain int `json:"chain"` // To: required: Protocol contract address to use fto fulfill the order. To string `json:"to"` // Value: required: Wei value of the transaction Value *big.Int `json:"value"` // InputData: required: Decoded Call Data. InputData any `json:"input_data"` }
Transaction is the name of the fulfillment method and associated call data.