Documentation
      ¶
    
    
  
    
  
    Overview ¶
marketplace-api dcacc720f7916d3ba392b7467260ddd610d76bd4 -- Code generated by webrpc-gen@v0.25.4 with golang generator. DO NOT EDIT.
webrpc-gen -schema=marketplace.ridl -target=golang -pkg=marketplace -client -out=./clients/marketplace.gen.go
Index ¶
- Constants
 - Variables
 - func HTTPRequestHeaders(ctx context.Context) (http.Header, bool)
 - func MethodCtx(ctx context.Context) (method, bool)
 - func MethodNameFromContext(ctx context.Context) string
 - func RequestFromContext(ctx context.Context) *http.Request
 - func ServiceNameFromContext(ctx context.Context) string
 - func WebRPCSchemaHash() string
 - func WebRPCSchemaVersion() string
 - func WebRPCVersion() string
 - func WebrpcMethods() map[string]method
 - func WithHTTPRequestHeaders(ctx context.Context, h http.Header) (context.Context, error)
 - type Activity
 - type ActivityAction
 - type AdditionalFee
 - type Admin
 - type AdminClient
 - type Asset
 - type CheckoutOptions
 - type CheckoutOptionsItem
 - type CheckoutOptionsMarketplaceOrder
 - type Collectible
 - type CollectibleOrder
 - type CollectiblePrimarySaleItem
 - type CollectibleSource
 - type CollectibleStatus
 - type CollectiblesFilter
 - type Collection
 - type CollectionConfig
 - type CollectionLastSynced
 - type CollectionPriority
 - type CollectionStatus
 - type ContractType
 - type CreateReq
 - type Currency
 - type CurrencyStatus
 - type Domain
 - type ExecuteType
 - type FeeBreakdown
 - type Filter
 - type GetOrdersInput
 - type HTTPClient
 - type ItemsContract
 - type ItemsContractStatus
 - type Marketplace
 - type MarketplaceClient
 - type MarketplaceKind
 - type MetadataStatus
 - type OfferType
 - type Options
 - type Order
 - type OrderData
 - type OrderFilter
 - type OrderSide
 - type OrderStatus
 - type OrderbookKind
 - type Page
 - type PostRequest
 - type PriceFilter
 - type PrimarySaleContract
 - type PrimarySaleContractStatus
 - type PrimarySaleItem
 - type PrimarySaleItemDetailType
 - type PrimarySaleItemsFilter
 - type PrimarySaleVersion
 - type Project
 - type ProjectStatus
 - type PropertyFilter
 - type PropertyType
 - type Signature
 - type SortBy
 - type SortOrder
 - type SourceKind
 - type Step
 - type StepType
 - type TokenMetadata
 - type TransactionCrypto
 - type TransactionNFTCheckoutProvider
 - type TransactionOnRampProvider
 - type TransactionSwapProvider
 - type WalletKind
 - type WebRPCError
 - type WebrpcGenVersions
 
Constants ¶
const AdminPathPrefix = "/rpc/Admin/"
    const MarketplacePathPrefix = "/rpc/Marketplace/"
    const WebrpcHeader = "Webrpc"
    const WebrpcHeaderValue = "webrpc@v0.25.4;gen-golang@v0.19.0;marketplace-api@v0.0.0-dcacc720f7916d3ba392b7467260ddd610d76bd4"
    Variables ¶
var ( HTTPClientRequestHeadersCtxKey = &contextKey{"HTTPClientRequestHeaders"} HTTPRequestCtxKey = &contextKey{"HTTPRequest"} ServiceNameCtxKey = &contextKey{"ServiceName"} MethodNameCtxKey = &contextKey{"MethodName"} )
var ( ErrWebrpcEndpoint = WebRPCError{Code: 0, Name: "WebrpcEndpoint", Message: "endpoint error", HTTPStatus: 400} ErrWebrpcRequestFailed = WebRPCError{Code: -1, Name: "WebrpcRequestFailed", Message: "request failed", HTTPStatus: 400} ErrWebrpcBadRoute = WebRPCError{Code: -2, Name: "WebrpcBadRoute", Message: "bad route", HTTPStatus: 404} ErrWebrpcBadMethod = WebRPCError{Code: -3, Name: "WebrpcBadMethod", Message: "bad method", HTTPStatus: 405} ErrWebrpcBadRequest = WebRPCError{Code: -4, Name: "WebrpcBadRequest", Message: "bad request", HTTPStatus: 400} ErrWebrpcBadResponse = WebRPCError{Code: -5, Name: "WebrpcBadResponse", Message: "bad response", HTTPStatus: 500} ErrWebrpcServerPanic = WebRPCError{Code: -6, Name: "WebrpcServerPanic", Message: "server panic", HTTPStatus: 500} ErrWebrpcInternalError = WebRPCError{Code: -7, Name: "WebrpcInternalError", Message: "internal error", HTTPStatus: 500} ErrWebrpcClientDisconnected = WebRPCError{Code: -8, Name: "WebrpcClientDisconnected", Message: "client disconnected", HTTPStatus: 400} ErrWebrpcStreamLost = WebRPCError{Code: -9, Name: "WebrpcStreamLost", Message: "stream lost", HTTPStatus: 400} ErrWebrpcStreamFinished = WebRPCError{Code: -10, Name: "WebrpcStreamFinished", Message: "stream finished", HTTPStatus: 200} )
Webrpc errors
var ( ErrPermissionDenied = WebRPCError{Code: 1001, Name: "PermissionDenied", Message: "Permission denied", HTTPStatus: 403} ErrSessionExpired = WebRPCError{Code: 1002, Name: "SessionExpired", Message: "Session expired", HTTPStatus: 403} ErrMethodNotFound = WebRPCError{Code: 1003, Name: "MethodNotFound", Message: "Method not found", HTTPStatus: 404} ErrTimeout = WebRPCError{Code: 2000, Name: "Timeout", Message: "Request timed out", HTTPStatus: 408} ErrInvalidArgument = WebRPCError{Code: 2001, Name: "InvalidArgument", Message: "Invalid argument", HTTPStatus: 400} ErrNotFound = WebRPCError{Code: 3000, Name: "NotFound", Message: "Resource not found", HTTPStatus: 400} ErrUserNotFound = WebRPCError{Code: 3001, Name: "UserNotFound", Message: "User not found", HTTPStatus: 400} ErrProjectNotFound = WebRPCError{Code: 3002, Name: "ProjectNotFound", Message: "Project not found", HTTPStatus: 400} ErrInvalidTier = WebRPCError{Code: 3003, Name: "InvalidTier", Message: "Invalid subscription tier", HTTPStatus: 400} ErrProjectLimitReached = WebRPCError{Code: 3005, Name: "ProjectLimitReached", Message: "Project limit reached", HTTPStatus: 402} ErrNotImplemented = WebRPCError{Code: 9999, Name: "NotImplemented", Message: "Not Implemented", HTTPStatus: 500} )
Schema errors
var ActivityAction_name = map[uint8]string{
	0: "unknown",
	1: "listing",
	2: "offer",
	3: "mint",
	4: "sale",
	5: "listingCancel",
	6: "offerCancel",
	7: "transfer",
}
    var ActivityAction_value = map[string]uint8{
	"unknown":       0,
	"listing":       1,
	"offer":         2,
	"mint":          3,
	"sale":          4,
	"listingCancel": 5,
	"offerCancel":   6,
	"transfer":      7,
}
    var CollectibleSource_name = map[uint8]string{
	0: "unknown",
	1: "indexer",
	2: "manual",
}
    var CollectibleSource_value = map[string]uint8{
	"unknown": 0,
	"indexer": 1,
	"manual":  2,
}
    var CollectibleStatus_name = map[uint8]string{
	0: "unknown",
	1: "active",
	2: "inactive",
}
    var CollectibleStatus_value = map[string]uint8{
	"unknown":  0,
	"active":   1,
	"inactive": 2,
}
    var CollectionPriority_name = map[uint8]string{
	0: "unknown",
	1: "low",
	2: "normal",
	3: "high",
}
    var CollectionPriority_value = map[string]uint8{
	"unknown": 0,
	"low":     1,
	"normal":  2,
	"high":    3,
}
    var CollectionStatus_name = map[uint8]string{
	0:  "unknown",
	1:  "created",
	8:  "syncing_orders",
	9:  "active",
	10: "failed",
	11: "inactive",
	12: "incompatible_type",
}
    var CollectionStatus_value = map[string]uint8{
	"unknown":           0,
	"created":           1,
	"syncing_orders":    8,
	"active":            9,
	"failed":            10,
	"inactive":          11,
	"incompatible_type": 12,
}
    var ContractType_name = map[uint16]string{
	0: "UNKNOWN",
	1: "ERC20",
	2: "ERC721",
	3: "ERC1155",
}
    var ContractType_value = map[string]uint16{
	"UNKNOWN": 0,
	"ERC20":   1,
	"ERC721":  2,
	"ERC1155": 3,
}
    var CurrencyStatus_name = map[uint8]string{
	0: "unknown",
	1: "created",
	2: "syncing_metadata",
	3: "active",
	4: "failed",
}
    var CurrencyStatus_value = map[string]uint8{
	"unknown":          0,
	"created":          1,
	"syncing_metadata": 2,
	"active":           3,
	"failed":           4,
}
    var ExecuteType_name = map[uint32]string{
	0: "unknown",
	1: "order",
	2: "createListing",
	3: "createItemOffer",
	4: "createTraitOffer",
}
    var ExecuteType_value = map[string]uint32{
	"unknown":          0,
	"order":            1,
	"createListing":    2,
	"createItemOffer":  3,
	"createTraitOffer": 4,
}
    var ItemsContractStatus_name = map[uint8]string{
	0:  "unknown",
	1:  "created",
	2:  "syncing_contract_metadata",
	3:  "synced_contract_metadata",
	4:  "syncing_tokens",
	5:  "synced_tokens",
	10: "active",
	20: "inactive",
	21: "incompatible_type",
}
    var ItemsContractStatus_value = map[string]uint8{
	"unknown":                   0,
	"created":                   1,
	"syncing_contract_metadata": 2,
	"synced_contract_metadata":  3,
	"syncing_tokens":            4,
	"synced_tokens":             5,
	"active":                    10,
	"inactive":                  20,
	"incompatible_type":         21,
}
    var MarketplaceKind_name = map[uint8]string{
	0:  "unknown",
	1:  "sequence_marketplace_v1",
	2:  "sequence_marketplace_v2",
	3:  "blur",
	4:  "zerox",
	5:  "opensea",
	6:  "looks_rare",
	7:  "x2y2",
	8:  "alienswap",
	9:  "payment_processor",
	10: "mintify",
	11: "magic_eden",
}
    var MarketplaceKind_value = map[string]uint8{
	"unknown":                 0,
	"sequence_marketplace_v1": 1,
	"sequence_marketplace_v2": 2,
	"blur":                    3,
	"zerox":                   4,
	"opensea":                 5,
	"looks_rare":              6,
	"x2y2":                    7,
	"alienswap":               8,
	"payment_processor":       9,
	"mintify":                 10,
	"magic_eden":              11,
}
    var MetadataStatus_name = map[uint32]string{
	0: "NOT_AVAILABLE",
	1: "REFRESHING",
	2: "AVAILABLE",
}
    var MetadataStatus_value = map[string]uint32{
	"NOT_AVAILABLE": 0,
	"REFRESHING":    1,
	"AVAILABLE":     2,
}
    var OfferType_name = map[uint8]string{
	0: "unknown",
	1: "item",
	2: "collection",
}
    var OfferType_value = map[string]uint8{
	"unknown":    0,
	"item":       1,
	"collection": 2,
}
    var OrderSide_name = map[uint8]string{
	0: "unknown",
	1: "listing",
	2: "offer",
}
    var OrderSide_value = map[string]uint8{
	"unknown": 0,
	"listing": 1,
	"offer":   2,
}
    var OrderStatus_name = map[uint8]string{
	0: "unknown",
	1: "active",
	2: "inactive",
	3: "expired",
	4: "cancelled",
	5: "filled",
	6: "decimals_missing",
}
    var OrderStatus_value = map[string]uint8{
	"unknown":          0,
	"active":           1,
	"inactive":         2,
	"expired":          3,
	"cancelled":        4,
	"filled":           5,
	"decimals_missing": 6,
}
    var OrderbookKind_name = map[uint32]string{
	0: "unknown",
	1: "sequence_marketplace_v1",
	2: "sequence_marketplace_v2",
	3: "blur",
	4: "opensea",
	5: "looks_rare",
	6: "reservoir",
	7: "x2y2",
}
    var OrderbookKind_value = map[string]uint32{
	"unknown":                 0,
	"sequence_marketplace_v1": 1,
	"sequence_marketplace_v2": 2,
	"blur":                    3,
	"opensea":                 4,
	"looks_rare":              5,
	"reservoir":               6,
	"x2y2":                    7,
}
    var PrimarySaleContractStatus_name = map[uint8]string{
	0:  "unknown",
	1:  "created",
	2:  "syncing_items",
	10: "active",
	20: "inactive",
	21: "incompatible_type",
	22: "failed",
}
    var PrimarySaleContractStatus_value = map[string]uint8{
	"unknown":           0,
	"created":           1,
	"syncing_items":     2,
	"active":            10,
	"inactive":          20,
	"incompatible_type": 21,
	"failed":            22,
}
    var PrimarySaleItemDetailType_name = map[uint8]string{
	0: "unknown",
	1: "global",
	2: "individual",
}
    var PrimarySaleItemDetailType_value = map[string]uint8{
	"unknown":    0,
	"global":     1,
	"individual": 2,
}
    var PrimarySaleVersion_name = map[uint8]string{
	0: "v0",
	1: "v1",
}
    var PrimarySaleVersion_value = map[string]uint8{
	"v0": 0,
	"v1": 1,
}
    var ProjectStatus_name = map[uint8]string{
	0: "unknown",
	1: "active",
	2: "inactive",
}
    var ProjectStatus_value = map[string]uint8{
	"unknown":  0,
	"active":   1,
	"inactive": 2,
}
    var PropertyType_name = map[uint32]string{
	0: "INT",
	1: "STRING",
	2: "ARRAY",
	3: "GENERIC",
}
    var PropertyType_value = map[string]uint32{
	"INT":     0,
	"STRING":  1,
	"ARRAY":   2,
	"GENERIC": 3,
}
    var SortOrder_name = map[uint32]string{
	0: "ASC",
	1: "DESC",
}
    var SortOrder_value = map[string]uint32{
	"ASC":  0,
	"DESC": 1,
}
    var SourceKind_name = map[uint32]string{
	0: "unknown",
	1: "external",
	2: "sequence_marketplace_v1",
	3: "sequence_marketplace_v2",
	4: "opensea",
}
    var SourceKind_value = map[string]uint32{
	"unknown":                 0,
	"external":                1,
	"sequence_marketplace_v1": 2,
	"sequence_marketplace_v2": 3,
	"opensea":                 4,
}
    var StepType_name = map[uint8]string{
	0: "unknown",
	1: "tokenApproval",
	2: "buy",
	3: "sell",
	4: "createListing",
	5: "createOffer",
	6: "signEIP712",
	7: "signEIP191",
	8: "cancel",
}
    var StepType_value = map[string]uint8{
	"unknown":       0,
	"tokenApproval": 1,
	"buy":           2,
	"sell":          3,
	"createListing": 4,
	"createOffer":   5,
	"signEIP712":    6,
	"signEIP191":    7,
	"cancel":        8,
}
    var TransactionCrypto_name = map[uint32]string{
	0: "none",
	1: "partially",
	2: "all",
}
    var TransactionCrypto_value = map[string]uint32{
	"none":      0,
	"partially": 1,
	"all":       2,
}
    var TransactionNFTCheckoutProvider_name = map[uint32]string{
	0: "unknown",
	1: "transak",
	2: "sardine",
}
    var TransactionNFTCheckoutProvider_value = map[string]uint32{
	"unknown": 0,
	"transak": 1,
	"sardine": 2,
}
    var TransactionOnRampProvider_name = map[uint32]string{
	0: "unknown",
	1: "transak",
	2: "sardine",
}
    var TransactionOnRampProvider_value = map[string]uint32{
	"unknown": 0,
	"transak": 1,
	"sardine": 2,
}
    var TransactionSwapProvider_name = map[uint32]string{
	0: "unknown",
	1: "lifi",
}
    var TransactionSwapProvider_value = map[string]uint32{
	"unknown": 0,
	"lifi":    1,
}
    var WalletKind_name = map[uint8]string{
	0: "unknown",
	1: "sequence",
}
    var WalletKind_value = map[string]uint8{
	"unknown":  0,
	"sequence": 1,
}
    var WebRPCServices = map[string][]string{
	"Admin": {
		"CreateCollection",
		"GetCollection",
		"UpdateCollection",
		"ListCollections",
		"DeleteCollection",
		"SyncCollection",
		"CreatePrimarySaleContract",
		"DeletePrimarySaleContract",
		"CreateCurrency",
		"CreateCurrencies",
		"UpdateCurrency",
		"ListCurrencies",
		"DeleteCurrency",
		"AddCollectibles",
	},
	"Marketplace": {
		"ListCurrencies",
		"GetCollectionDetail",
		"GetCollectible",
		"GetLowestPriceOfferForCollectible",
		"GetHighestPriceOfferForCollectible",
		"GetLowestPriceListingForCollectible",
		"GetHighestPriceListingForCollectible",
		"ListListingsForCollectible",
		"ListOffersForCollectible",
		"ListListings",
		"ListOffers",
		"GetCountOfListingsForCollectible",
		"GetCountOfOffersForCollectible",
		"GetCollectibleLowestOffer",
		"GetCollectibleHighestOffer",
		"GetCollectibleLowestListing",
		"GetCollectibleHighestListing",
		"ListCollectibleListings",
		"ListCollectibleOffers",
		"GenerateBuyTransaction",
		"GenerateSellTransaction",
		"GenerateListingTransaction",
		"GenerateOfferTransaction",
		"GenerateCancelTransaction",
		"Execute",
		"ListCollectibles",
		"GetCountOfAllCollectibles",
		"GetCountOfFilteredCollectibles",
		"GetFloorOrder",
		"ListCollectionActivities",
		"ListCollectibleActivities",
		"ListCollectiblesWithLowestListing",
		"ListCollectiblesWithHighestOffer",
		"SyncOrder",
		"SyncOrders",
		"GetOrders",
		"CheckoutOptionsMarketplace",
		"CheckoutOptionsSalesContract",
		"SupportedMarketplaces",
		"GetPrimarySaleItem",
		"ListPrimarySaleItems",
		"GetCountOfPrimarySaleItems",
	},
}
    Functions ¶
func MethodNameFromContext ¶
func ServiceNameFromContext ¶
func WebrpcMethods ¶ added in v0.49.0
func WebrpcMethods() map[string]method
Types ¶
type Activity ¶
type Activity struct {
	ID                   uint64          `json:"-" db:"id,omitempty"`
	CollectionID         uint64          `json:"-" db:"market_id,omitempty"`
	CollectibleID        uint64          `json:"-" db:"collectible_id,omitempty"`
	ChainID              uint64          `json:"chainId" db:"chain_id"`
	ContractAddress      prototyp.Hash   `json:"contractAddress" db:"contract_address"`
	TokenID              prototyp.BigInt `json:"tokenId" db:"token_id"`
	Action               ActivityAction  `json:"action" db:"action"`
	TxHash               prototyp.Hash   `json:"txHash" db:"tx_hash"`
	Source               SourceKind      `json:"-" db:"source"`
	From                 prototyp.Hash   `json:"from" db:"from_address"`
	To                   prototyp.Hash   `json:"to" db:"to_address"`
	Quantity             prototyp.BigInt `json:"quantity" db:"qty"`
	QuantityDecimals     uint64          `json:"quantityDecimals" db:"qty_decimals"`
	PriceAmount          prototyp.BigInt `json:"priceAmount" db:"price_amount"`
	PriceAmountFormatted *string         `json:"priceAmountFormatted"`
	PriceCurrencyAddress prototyp.Hash   `json:"priceCurrencyAddress" db:"price_currency_address"`
	PriceDecimals        *uint64         `json:"priceDecimals" db:"price_decimals"`
	ActivityCreatedAt    time.Time       `json:"activityCreatedAt" db:"activity_created_at"`
	LogIndex             uint64          `json:"-" db:"log_index"`
	UniqueHash           prototyp.Hash   `json:"uniqueHash" db:"unique_hash"`
	CreatedAt            time.Time       `json:"createdAt" db:"created_at"`
	UpdatedAt            time.Time       `json:"updatedAt" db:"updated_at"`
	DeletedAt            *time.Time      `json:"deletedAt,omitempty" db:"deleted_at"`
}
    type ActivityAction ¶ added in v0.49.0
type ActivityAction uint8
const ( ActivityAction_unknown ActivityAction = 0 ActivityAction_listing ActivityAction = 1 ActivityAction_offer ActivityAction = 2 ActivityAction_mint ActivityAction = 3 ActivityAction_sale ActivityAction = 4 ActivityAction_listingCancel ActivityAction = 5 ActivityAction_offerCancel ActivityAction = 6 ActivityAction_transfer ActivityAction = 7 )
func (*ActivityAction) Is ¶ added in v0.49.0
func (x *ActivityAction) Is(values ...ActivityAction) bool
func (ActivityAction) MarshalText ¶ added in v0.49.0
func (x ActivityAction) MarshalText() ([]byte, error)
func (ActivityAction) String ¶ added in v0.49.0
func (x ActivityAction) String() string
func (*ActivityAction) UnmarshalText ¶ added in v0.49.0
func (x *ActivityAction) UnmarshalText(b []byte) error
type AdditionalFee ¶ added in v0.49.0
type Admin ¶
type Admin interface {
	CreateCollection(ctx context.Context, chainId string, projectId uint64, contractAddress string) (*Collection, error)
	GetCollection(ctx context.Context, chainId string, projectId uint64, contractAddress string) (*Collection, error)
	UpdateCollection(ctx context.Context, chainId string, collection *Collection) (*Collection, error)
	ListCollections(ctx context.Context, chainId string, projectId uint64, page *Page) ([]*Collection, *Page, error)
	DeleteCollection(ctx context.Context, chainId string, projectId uint64, contractAddress string) (*Collection, error)
	// determine what should happen here
	SyncCollection(ctx context.Context, chainId string, contractAddress string) error
	CreatePrimarySaleContract(ctx context.Context, chainId string, projectId uint64, primarySaleContractAddress string, itemsContractAddress string) (*PrimarySaleContract, error)
	DeletePrimarySaleContract(ctx context.Context, chainId string, projectId uint64, primarySaleContractAddress string) error
	CreateCurrency(ctx context.Context, chainId string, currency *Currency) (*Currency, error)
	CreateCurrencies(ctx context.Context, chainId string, currencies []*Currency) (map[string]*Currency, error)
	UpdateCurrency(ctx context.Context, chainId string, currency *Currency) (*Currency, error)
	ListCurrencies(ctx context.Context, chainId string) ([]*Currency, error)
	DeleteCurrency(ctx context.Context, chainId string, contractAddress string) (*Currency, error)
	// This for manual adding of non minted ERC1155 tokens, it's used for purposes of Shop.
	AddCollectibles(ctx context.Context, chainId string, itemsContractAddress string, tokenIds []string) error
}
    type AdminClient ¶
type AdminClient interface {
	CreateCollection(ctx context.Context, chainId string, projectId uint64, contractAddress string) (*Collection, error)
	GetCollection(ctx context.Context, chainId string, projectId uint64, contractAddress string) (*Collection, error)
	UpdateCollection(ctx context.Context, chainId string, collection *Collection) (*Collection, error)
	ListCollections(ctx context.Context, chainId string, projectId uint64, page *Page) ([]*Collection, *Page, error)
	DeleteCollection(ctx context.Context, chainId string, projectId uint64, contractAddress string) (*Collection, error)
	// determine what should happen here
	SyncCollection(ctx context.Context, chainId string, contractAddress string) error
	CreatePrimarySaleContract(ctx context.Context, chainId string, projectId uint64, primarySaleContractAddress string, itemsContractAddress string) (*PrimarySaleContract, error)
	DeletePrimarySaleContract(ctx context.Context, chainId string, projectId uint64, primarySaleContractAddress string) error
	CreateCurrency(ctx context.Context, chainId string, currency *Currency) (*Currency, error)
	CreateCurrencies(ctx context.Context, chainId string, currencies []*Currency) (map[string]*Currency, error)
	UpdateCurrency(ctx context.Context, chainId string, currency *Currency) (*Currency, error)
	ListCurrencies(ctx context.Context, chainId string) ([]*Currency, error)
	DeleteCurrency(ctx context.Context, chainId string, contractAddress string) (*Currency, error)
	// This for manual adding of non minted ERC1155 tokens, it's used for purposes of Shop.
	AddCollectibles(ctx context.Context, chainId string, itemsContractAddress string, tokenIds []string) error
}
    func NewAdminClient ¶
func NewAdminClient(addr string, client HTTPClient) AdminClient
func NewMarketplaceAdmin ¶
func NewMarketplaceAdmin(projectAccessKey string, options ...Options) AdminClient
type Asset ¶
type Asset struct {
	// asset id
	ID uint64 `json:"id"`
	// collection id associated to this asset
	CollectionID uint64 `json:"collectionId"`
	// token id associated to this collection
	TokenID prototyp.BigInt `json:"tokenId"`
	// url where we can view the asset contents
	// ie. https://metadata.sequence.app/projects/1/collections/1/tokens/1/image
	URL string `json:"url"`
	// metadata field related to TokenMetadata, some field names:
	// ['image', 'video', 'audio', 'animation_url', ...]
	MetadataField string `json:"metadataField,omitempty"`
	// asset details
	Filename  string    `json:"filename,omitempty"`
	Filesize  uint32    `json:"filesize,omitempty"`
	MimeType  string    `json:"mimeType,omitempty"`
	Width     *uint16   `json:"width,omitempty"`
	Height    *uint16   `json:"height,omitempty"`
	UpdatedAt time.Time `json:"updatedAt"`
}
    Asset is a database type used by 'collections' to record static assets for a particular 'token' for the token metadata.
type CheckoutOptions ¶ added in v0.49.0
type CheckoutOptions struct {
	Crypto      TransactionCrypto                `json:"crypto"`
	Swap        []TransactionSwapProvider        `json:"swap"`
	NFTCheckout []TransactionNFTCheckoutProvider `json:"nftCheckout"`
	OnRamp      []TransactionOnRampProvider      `json:"onRamp"`
}
    type CheckoutOptionsItem ¶ added in v0.49.0
type CheckoutOptionsMarketplaceOrder ¶ added in v0.49.0
type CheckoutOptionsMarketplaceOrder struct {
	ContractAddress prototyp.Hash   `json:"contractAddress"`
	OrderID         string          `json:"orderId"`
	Marketplace     MarketplaceKind `json:"marketplace"`
}
    type Collectible ¶
type Collectible struct {
	ID              uint64            `json:"-" db:"id,omitempty"`
	ItemsContractID uint64            `json:"-" db:"items_contract_id"`
	Status          CollectibleStatus `json:"status" db:"status"`
	TokenID         prototyp.BigInt   `json:"tokenId" db:"token_id"`
	Decimals        uint64            `json:"decimals" db:"decimals"`
	Source          CollectibleSource `json:"source" db:"source"`
	CreatedAt       time.Time         `json:"createdAt" db:"created_at"`
	UpdatedAt       time.Time         `json:"updatedAt" db:"updated_at"`
	DeletedAt       *time.Time        `json:"deletedAt,omitempty" db:"deleted_at"`
}
    type CollectibleOrder ¶
type CollectibleOrder struct {
	Metadata *TokenMetadata `json:"metadata"`
	Order    *Order         `json:"order"`
	Listing  *Order         `json:"listing"`
	Offer    *Order         `json:"offer"`
}
    type CollectiblePrimarySaleItem ¶ added in v0.54.0
type CollectiblePrimarySaleItem struct {
	Metadata        *TokenMetadata   `json:"metadata"`
	PrimarySaleItem *PrimarySaleItem `json:"primarySaleItem"`
}
    type CollectibleSource ¶ added in v0.54.0
type CollectibleSource uint8
const ( CollectibleSource_unknown CollectibleSource = 0 CollectibleSource_indexer CollectibleSource = 1 CollectibleSource_manual CollectibleSource = 2 )
func (*CollectibleSource) Is ¶ added in v0.54.0
func (x *CollectibleSource) Is(values ...CollectibleSource) bool
func (CollectibleSource) MarshalText ¶ added in v0.54.0
func (x CollectibleSource) MarshalText() ([]byte, error)
func (CollectibleSource) String ¶ added in v0.54.0
func (x CollectibleSource) String() string
func (*CollectibleSource) UnmarshalText ¶ added in v0.54.0
func (x *CollectibleSource) UnmarshalText(b []byte) error
type CollectibleStatus ¶
type CollectibleStatus uint8
const ( CollectibleStatus_unknown CollectibleStatus = 0 CollectibleStatus_active CollectibleStatus = 1 CollectibleStatus_inactive CollectibleStatus = 2 )
func (*CollectibleStatus) Is ¶
func (x *CollectibleStatus) Is(values ...CollectibleStatus) bool
func (CollectibleStatus) MarshalText ¶
func (x CollectibleStatus) MarshalText() ([]byte, error)
func (CollectibleStatus) String ¶
func (x CollectibleStatus) String() string
func (*CollectibleStatus) UnmarshalText ¶
func (x *CollectibleStatus) UnmarshalText(b []byte) error
type CollectiblesFilter ¶
type CollectiblesFilter struct {
	// include collectibles without any orders at the end of the list
	IncludeEmpty bool `json:"includeEmpty"`
	// search collectibles by text
	// if the filter matches too many tokens (over 65,000), only a subset of results will be returned
	SearchText *string `json:"searchText"`
	// filter by metadata properties
	Properties []*PropertyFilter `json:"properties"`
	// filter only orders in specific marketplace
	Marketplaces []MarketplaceKind `json:"marketplaces"`
	// filter collectibles owned by given account addresses
	// if the filter matches too many tokens (over 65,000), only a subset of results will be returned
	InAccounts []string `json:"inAccounts"`
	// filter out collectibles owned by given account addresses
	// if the filter matches too many tokens (over 65,000), only a subset of results will be returned
	NotInAccounts []string `json:"notInAccounts"`
	// filter orders created by given account addresses
	OrdersCreatedBy []string `json:"ordersCreatedBy"`
	// filter out orders created by given account addresses
	OrdersNotCreatedBy []string `json:"ordersNotCreatedBy"`
	// filter orders in given currency address
	// (use '0x0000000000000000000000000000000000000000' for native currency)
	InCurrencyAddresses []string `json:"inCurrencyAddresses"`
	// filter out orders in given currency address
	// (use '0x0000000000000000000000000000000000000000' for native currency)
	NotInCurrencyAddresses []string `json:"notInCurrencyAddresses"`
	// filter orders by price, filter applies OR for elements in this array
	Prices []*PriceFilter `json:"prices"`
}
    type Collection ¶
type Collection struct {
	ID                    uint64             `json:"-" db:"id,omitempty"`
	Status                CollectionStatus   `json:"status" db:"status"`
	ItemsContractID       uint64             `json:"-" db:"items_contract_id"`
	ChainID               uint64             `json:"chainId" db:"chain_id"`
	ContractAddress       prototyp.Hash      `json:"contractAddress" db:"contract_address"`
	ContractType          ContractType       `json:"contractType" db:"contract_type"`
	Priority              CollectionPriority `json:"priority" db:"priority"`
	TokenQuantityDecimals uint64             `json:"tokenQuantityDecimals" db:"token_qty_decimals"`
	Config                *CollectionConfig  `json:"config" db:"config"`
	CreatedAt             time.Time          `json:"createdAt" db:"created_at"`
	UpdatedAt             time.Time          `json:"updatedAt" db:"updated_at"`
	DeletedAt             *time.Time         `json:"deletedAt,omitempty" db:"deleted_at"`
}
    type CollectionConfig ¶
type CollectionLastSynced ¶
type CollectionPriority ¶ added in v0.49.0
type CollectionPriority uint8
const ( CollectionPriority_unknown CollectionPriority = 0 CollectionPriority_low CollectionPriority = 1 CollectionPriority_normal CollectionPriority = 2 CollectionPriority_high CollectionPriority = 3 )
func (*CollectionPriority) Is ¶ added in v0.49.0
func (x *CollectionPriority) Is(values ...CollectionPriority) bool
func (CollectionPriority) MarshalText ¶ added in v0.49.0
func (x CollectionPriority) MarshalText() ([]byte, error)
func (CollectionPriority) String ¶ added in v0.49.0
func (x CollectionPriority) String() string
func (*CollectionPriority) UnmarshalText ¶ added in v0.49.0
func (x *CollectionPriority) UnmarshalText(b []byte) error
type CollectionStatus ¶
type CollectionStatus uint8
const ( CollectionStatus_unknown CollectionStatus = 0 CollectionStatus_created CollectionStatus = 1 CollectionStatus_syncing_orders CollectionStatus = 8 CollectionStatus_active CollectionStatus = 9 CollectionStatus_failed CollectionStatus = 10 CollectionStatus_inactive CollectionStatus = 11 CollectionStatus_incompatible_type CollectionStatus = 12 )
func (*CollectionStatus) Is ¶
func (x *CollectionStatus) Is(values ...CollectionStatus) bool
func (CollectionStatus) MarshalText ¶
func (x CollectionStatus) MarshalText() ([]byte, error)
func (CollectionStatus) String ¶
func (x CollectionStatus) String() string
func (*CollectionStatus) UnmarshalText ¶
func (x *CollectionStatus) UnmarshalText(b []byte) error
type ContractType ¶ added in v0.49.0
type ContractType uint16
const ( ContractType_UNKNOWN ContractType = 0 ContractType_ERC20 ContractType = 1 ContractType_ERC721 ContractType = 2 ContractType_ERC1155 ContractType = 3 )
func (*ContractType) Is ¶ added in v0.49.0
func (x *ContractType) Is(values ...ContractType) bool
func (ContractType) MarshalText ¶ added in v0.49.0
func (x ContractType) MarshalText() ([]byte, error)
func (ContractType) String ¶ added in v0.49.0
func (x ContractType) String() string
func (*ContractType) UnmarshalText ¶ added in v0.49.0
func (x *ContractType) UnmarshalText(b []byte) error
type Currency ¶
type Currency struct {
	ID                   uint64         `json:"-" db:"id,omitempty"`
	ChainID              uint64         `json:"chainId" db:"chain_id"`
	ContractAddress      prototyp.Hash  `json:"contractAddress,omitempty" db:"contract_address"`
	Status               CurrencyStatus `json:"status" db:"status"`
	Name                 string         `json:"name" db:"name"`
	Symbol               string         `json:"symbol" db:"symbol"`
	Decimals             uint64         `json:"decimals" db:"decimals"`
	ImageURL             string         `json:"imageUrl" db:"image_url"`
	ExchangeRate         float64        `json:"exchangeRate" db:"exchange_rate"`
	DefaultChainCurrency bool           `json:"defaultChainCurrency" db:"default_chain_currency"`
	NativeCurrency       bool           `json:"nativeCurrency" db:"native_currency"`
	CreatedAt            time.Time      `json:"createdAt" db:"created_at"`
	UpdatedAt            time.Time      `json:"updatedAt" db:"updated_at"`
	DeletedAt            *time.Time     `json:"deletedAt,omitempty" db:"deleted_at"`
	RefreshMetadataJob   uint64         `json:"-" db:"refresh_metadata_job"`
}
    type CurrencyStatus ¶ added in v0.49.0
type CurrencyStatus uint8
const ( CurrencyStatus_unknown CurrencyStatus = 0 CurrencyStatus_created CurrencyStatus = 1 CurrencyStatus_syncing_metadata CurrencyStatus = 2 CurrencyStatus_active CurrencyStatus = 3 CurrencyStatus_failed CurrencyStatus = 4 )
func (*CurrencyStatus) Is ¶ added in v0.49.0
func (x *CurrencyStatus) Is(values ...CurrencyStatus) bool
func (CurrencyStatus) MarshalText ¶ added in v0.49.0
func (x CurrencyStatus) MarshalText() ([]byte, error)
func (CurrencyStatus) String ¶ added in v0.49.0
func (x CurrencyStatus) String() string
func (*CurrencyStatus) UnmarshalText ¶ added in v0.49.0
func (x *CurrencyStatus) UnmarshalText(b []byte) error
type ExecuteType ¶ added in v0.49.0
type ExecuteType uint32
const ( ExecuteType_unknown ExecuteType = 0 ExecuteType_order ExecuteType = 1 ExecuteType_createListing ExecuteType = 2 ExecuteType_createItemOffer ExecuteType = 3 ExecuteType_createTraitOffer ExecuteType = 4 )
func (*ExecuteType) Is ¶ added in v0.49.0
func (x *ExecuteType) Is(values ...ExecuteType) bool
func (ExecuteType) MarshalText ¶ added in v0.49.0
func (x ExecuteType) MarshalText() ([]byte, error)
func (ExecuteType) String ¶ added in v0.49.0
func (x ExecuteType) String() string
func (*ExecuteType) UnmarshalText ¶ added in v0.49.0
func (x *ExecuteType) UnmarshalText(b []byte) error
type FeeBreakdown ¶
type Filter ¶
type Filter struct {
	Text       *string           `json:"text"`
	Properties []*PropertyFilter `json:"properties"`
}
    copied from metadata filter PropertyFilter name -> name of the property, eg: hero type -> type of the values of the property, eg: Int, string min?, max? used if type is int, gives range of values for filtering values? -> if string then array of values, eg: ['Ada', 'Ari', 'Axel', 'Banjo' ...] NOTE: When Filter has an array of PropertyFilter, the logic used is an 'and' condition whereas if the user selects multiple values inside the PropertyFilter, they logic used is the 'or' condition this is to achieve the desired effect opensea had on their filters
type GetOrdersInput ¶ added in v0.49.0
type GetOrdersInput struct {
	ContractAddress prototyp.Hash   `json:"contractAddress"`
	OrderID         string          `json:"orderId"`
	Marketplace     MarketplaceKind `json:"marketplace"`
}
    type HTTPClient ¶
HTTPClient is the interface used by generated clients to send HTTP requests. It is fulfilled by *(net/http).Client, which is sufficient for most users. Users can provide their own implementation for special retry policies.
type ItemsContract ¶ added in v0.54.0
type ItemsContract struct {
	ID              uint64              `json:"-" db:"id,omitempty"`
	Status          ItemsContractStatus `json:"status" db:"status"`
	ChainID         uint64              `json:"chainId" db:"chain_id"`
	ContractAddress prototyp.Hash       `json:"contractAddress" db:"contract_address"`
	ContractType    ContractType        `json:"contractType" db:"contract_type"`
	LastSynced      time.Time           `json:"lastSynced" db:"last_synced"`
	CreatedAt       time.Time           `json:"createdAt" db:"created_at"`
	UpdatedAt       time.Time           `json:"updatedAt" db:"updated_at"`
	DeletedAt       *time.Time          `json:"deletedAt,omitempty" db:"deleted_at"`
}
    type ItemsContractStatus ¶ added in v0.54.0
type ItemsContractStatus uint8
const ( ItemsContractStatus_unknown ItemsContractStatus = 0 ItemsContractStatus_created ItemsContractStatus = 1 ItemsContractStatus_syncing_contract_metadata ItemsContractStatus = 2 ItemsContractStatus_synced_contract_metadata ItemsContractStatus = 3 ItemsContractStatus_syncing_tokens ItemsContractStatus = 4 ItemsContractStatus_synced_tokens ItemsContractStatus = 5 ItemsContractStatus_active ItemsContractStatus = 10 ItemsContractStatus_inactive ItemsContractStatus = 20 ItemsContractStatus_incompatible_type ItemsContractStatus = 21 )
func (*ItemsContractStatus) Is ¶ added in v0.54.0
func (x *ItemsContractStatus) Is(values ...ItemsContractStatus) bool
func (ItemsContractStatus) MarshalText ¶ added in v0.54.0
func (x ItemsContractStatus) MarshalText() ([]byte, error)
func (ItemsContractStatus) String ¶ added in v0.54.0
func (x ItemsContractStatus) String() string
func (*ItemsContractStatus) UnmarshalText ¶ added in v0.54.0
func (x *ItemsContractStatus) UnmarshalText(b []byte) error
type Marketplace ¶
type Marketplace interface {
	ListCurrencies(ctx context.Context, chainId string) ([]*Currency, error)
	GetCollectionDetail(ctx context.Context, chainId string, contractAddress string) (*Collection, error)
	GetCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string) (*TokenMetadata, error)
	GetLowestPriceOfferForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	GetHighestPriceOfferForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	GetLowestPriceListingForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	GetHighestPriceListingForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	ListListingsForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error)
	ListOffersForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error)
	ListListings(ctx context.Context, chainId string, contractAddress string, filter *OrderFilter, page *Page) ([]*Order, *Page, error)
	ListOffers(ctx context.Context, chainId string, contractAddress string, filter *OrderFilter, page *Page) ([]*Order, *Page, error)
	GetCountOfListingsForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (uint64, error)
	GetCountOfOffersForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (uint64, error)
	// Deprecated: Please use GetLowestPriceOfferForCollectible instead.
	GetCollectibleLowestOffer(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	// Deprecated: Please use GetHighestPriceOfferForCollectible instead.
	GetCollectibleHighestOffer(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	// Deprecated: Please use GetLowestPriceListingForCollectible instead.
	GetCollectibleLowestListing(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	// Deprecated: Please use GetHighestPriceListingForCollectible instead.
	GetCollectibleHighestListing(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	// Deprecated: Please use ListListingsForCollectible instead.
	ListCollectibleListings(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error)
	// Deprecated: Please use ListOffersForCollectible instead.
	ListCollectibleOffers(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error)
	// checkout process
	GenerateBuyTransaction(ctx context.Context, chainId string, collectionAddress string, buyer string, marketplace MarketplaceKind, ordersData []*OrderData, additionalFees []*AdditionalFee, walletType *WalletKind) ([]*Step, error)
	GenerateSellTransaction(ctx context.Context, chainId string, collectionAddress string, seller string, marketplace MarketplaceKind, ordersData []*OrderData, additionalFees []*AdditionalFee, walletType *WalletKind) ([]*Step, error)
	GenerateListingTransaction(ctx context.Context, chainId string, collectionAddress string, owner string, contractType ContractType, orderbook OrderbookKind, listing *CreateReq, additionalFees []*AdditionalFee, walletType *WalletKind) ([]*Step, error)
	GenerateOfferTransaction(ctx context.Context, chainId string, collectionAddress string, maker string, contractType ContractType, orderbook OrderbookKind, offer *CreateReq, additionalFees []*AdditionalFee, walletType *WalletKind, offerType OfferType) ([]*Step, error)
	GenerateCancelTransaction(ctx context.Context, chainId string, collectionAddress string, maker string, marketplace MarketplaceKind, orderId string) ([]*Step, error)
	// only used in a case of external transactions ( when we create off-chain transactions ) for instance opensea market
	Execute(ctx context.Context, chainId string, signature string, method string, endpoint string, executeType ExecuteType, body interface{}) (string, error)
	// list of collectibles with best order for each collectible, by default this only returns collectibles with an order
	ListCollectibles(ctx context.Context, chainId string, side OrderSide, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error)
	GetCountOfAllCollectibles(ctx context.Context, chainId string, contractAddress string) (uint64, error)
	GetCountOfFilteredCollectibles(ctx context.Context, chainId string, side OrderSide, contractAddress string, filter *CollectiblesFilter) (uint64, error)
	GetFloorOrder(ctx context.Context, chainId string, contractAddress string, filter *CollectiblesFilter) (*CollectibleOrder, error)
	ListCollectionActivities(ctx context.Context, chainId string, contractAddress string, page *Page) ([]*Activity, *Page, error)
	ListCollectibleActivities(ctx context.Context, chainId string, contractAddress string, tokenId string, page *Page) ([]*Activity, *Page, error)
	ListCollectiblesWithLowestListing(ctx context.Context, chainId string, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error)
	ListCollectiblesWithHighestOffer(ctx context.Context, chainId string, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error)
	SyncOrder(ctx context.Context, chainId string, order *Order) error
	SyncOrders(ctx context.Context, chainId string, orders []*Order) error
	GetOrders(ctx context.Context, chainId string, input []*GetOrdersInput, page *Page) ([]*Order, *Page, error)
	CheckoutOptionsMarketplace(ctx context.Context, chainId string, wallet string, orders []*CheckoutOptionsMarketplaceOrder, additionalFee int) (*CheckoutOptions, error)
	CheckoutOptionsSalesContract(ctx context.Context, chainId string, wallet string, contractAddress string, collectionAddress string, items []*CheckoutOptionsItem) (*CheckoutOptions, error)
	SupportedMarketplaces(ctx context.Context, chainId string) ([]MarketplaceKind, error)
	GetPrimarySaleItem(ctx context.Context, chainId string, primarySaleContractAddress string, tokenId string) (*CollectiblePrimarySaleItem, error)
	ListPrimarySaleItems(ctx context.Context, chainId string, primarySaleContractAddress string, filter *PrimarySaleItemsFilter, page *Page) ([]*CollectiblePrimarySaleItem, *Page, error)
	GetCountOfPrimarySaleItems(ctx context.Context, chainId string, primarySaleContractAddress string, filter *PrimarySaleItemsFilter) (uint64, error)
}
    type MarketplaceClient ¶
type MarketplaceClient interface {
	ListCurrencies(ctx context.Context, chainId string) ([]*Currency, error)
	GetCollectionDetail(ctx context.Context, chainId string, contractAddress string) (*Collection, error)
	GetCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string) (*TokenMetadata, error)
	GetLowestPriceOfferForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	GetHighestPriceOfferForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	GetLowestPriceListingForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	GetHighestPriceListingForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	ListListingsForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error)
	ListOffersForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error)
	ListListings(ctx context.Context, chainId string, contractAddress string, filter *OrderFilter, page *Page) ([]*Order, *Page, error)
	ListOffers(ctx context.Context, chainId string, contractAddress string, filter *OrderFilter, page *Page) ([]*Order, *Page, error)
	GetCountOfListingsForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (uint64, error)
	GetCountOfOffersForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (uint64, error)
	// Deprecated: Please use GetLowestPriceOfferForCollectible instead.
	GetCollectibleLowestOffer(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	// Deprecated: Please use GetHighestPriceOfferForCollectible instead.
	GetCollectibleHighestOffer(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	// Deprecated: Please use GetLowestPriceListingForCollectible instead.
	GetCollectibleLowestListing(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	// Deprecated: Please use GetHighestPriceListingForCollectible instead.
	GetCollectibleHighestListing(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error)
	// Deprecated: Please use ListListingsForCollectible instead.
	ListCollectibleListings(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error)
	// Deprecated: Please use ListOffersForCollectible instead.
	ListCollectibleOffers(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error)
	// checkout process
	GenerateBuyTransaction(ctx context.Context, chainId string, collectionAddress string, buyer string, marketplace MarketplaceKind, ordersData []*OrderData, additionalFees []*AdditionalFee, walletType *WalletKind) ([]*Step, error)
	GenerateSellTransaction(ctx context.Context, chainId string, collectionAddress string, seller string, marketplace MarketplaceKind, ordersData []*OrderData, additionalFees []*AdditionalFee, walletType *WalletKind) ([]*Step, error)
	GenerateListingTransaction(ctx context.Context, chainId string, collectionAddress string, owner string, contractType ContractType, orderbook OrderbookKind, listing *CreateReq, additionalFees []*AdditionalFee, walletType *WalletKind) ([]*Step, error)
	GenerateOfferTransaction(ctx context.Context, chainId string, collectionAddress string, maker string, contractType ContractType, orderbook OrderbookKind, offer *CreateReq, additionalFees []*AdditionalFee, walletType *WalletKind, offerType OfferType) ([]*Step, error)
	GenerateCancelTransaction(ctx context.Context, chainId string, collectionAddress string, maker string, marketplace MarketplaceKind, orderId string) ([]*Step, error)
	// only used in a case of external transactions ( when we create off-chain transactions ) for instance opensea market
	Execute(ctx context.Context, chainId string, signature string, method string, endpoint string, executeType ExecuteType, body interface{}) (string, error)
	// list of collectibles with best order for each collectible, by default this only returns collectibles with an order
	ListCollectibles(ctx context.Context, chainId string, side OrderSide, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error)
	GetCountOfAllCollectibles(ctx context.Context, chainId string, contractAddress string) (uint64, error)
	GetCountOfFilteredCollectibles(ctx context.Context, chainId string, side OrderSide, contractAddress string, filter *CollectiblesFilter) (uint64, error)
	GetFloorOrder(ctx context.Context, chainId string, contractAddress string, filter *CollectiblesFilter) (*CollectibleOrder, error)
	ListCollectionActivities(ctx context.Context, chainId string, contractAddress string, page *Page) ([]*Activity, *Page, error)
	ListCollectibleActivities(ctx context.Context, chainId string, contractAddress string, tokenId string, page *Page) ([]*Activity, *Page, error)
	ListCollectiblesWithLowestListing(ctx context.Context, chainId string, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error)
	ListCollectiblesWithHighestOffer(ctx context.Context, chainId string, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error)
	SyncOrder(ctx context.Context, chainId string, order *Order) error
	SyncOrders(ctx context.Context, chainId string, orders []*Order) error
	GetOrders(ctx context.Context, chainId string, input []*GetOrdersInput, page *Page) ([]*Order, *Page, error)
	CheckoutOptionsMarketplace(ctx context.Context, chainId string, wallet string, orders []*CheckoutOptionsMarketplaceOrder, additionalFee int) (*CheckoutOptions, error)
	CheckoutOptionsSalesContract(ctx context.Context, chainId string, wallet string, contractAddress string, collectionAddress string, items []*CheckoutOptionsItem) (*CheckoutOptions, error)
	SupportedMarketplaces(ctx context.Context, chainId string) ([]MarketplaceKind, error)
	GetPrimarySaleItem(ctx context.Context, chainId string, primarySaleContractAddress string, tokenId string) (*CollectiblePrimarySaleItem, error)
	ListPrimarySaleItems(ctx context.Context, chainId string, primarySaleContractAddress string, filter *PrimarySaleItemsFilter, page *Page) ([]*CollectiblePrimarySaleItem, *Page, error)
	GetCountOfPrimarySaleItems(ctx context.Context, chainId string, primarySaleContractAddress string, filter *PrimarySaleItemsFilter) (uint64, error)
}
    func NewMarketplaceClient ¶
func NewMarketplaceClient(addr string, client HTTPClient) MarketplaceClient
func NewMarketplaceMarketplace ¶ added in v0.54.0
func NewMarketplaceMarketplace(projectAccessKey string, options ...Options) MarketplaceClient
type MarketplaceKind ¶
type MarketplaceKind uint8
const ( MarketplaceKind_unknown MarketplaceKind = 0 MarketplaceKind_sequence_marketplace_v1 MarketplaceKind = 1 MarketplaceKind_sequence_marketplace_v2 MarketplaceKind = 2 MarketplaceKind_blur MarketplaceKind = 3 MarketplaceKind_zerox MarketplaceKind = 4 MarketplaceKind_opensea MarketplaceKind = 5 MarketplaceKind_looks_rare MarketplaceKind = 6 MarketplaceKind_x2y2 MarketplaceKind = 7 MarketplaceKind_alienswap MarketplaceKind = 8 MarketplaceKind_payment_processor MarketplaceKind = 9 MarketplaceKind_mintify MarketplaceKind = 10 MarketplaceKind_magic_eden MarketplaceKind = 11 )
func (*MarketplaceKind) Is ¶
func (x *MarketplaceKind) Is(values ...MarketplaceKind) bool
func (MarketplaceKind) MarshalText ¶
func (x MarketplaceKind) MarshalText() ([]byte, error)
func (MarketplaceKind) String ¶
func (x MarketplaceKind) String() string
func (*MarketplaceKind) UnmarshalText ¶
func (x *MarketplaceKind) UnmarshalText(b []byte) error
type MetadataStatus ¶ added in v0.60.0
type MetadataStatus uint32
const ( MetadataStatus_NOT_AVAILABLE MetadataStatus = 0 MetadataStatus_REFRESHING MetadataStatus = 1 MetadataStatus_AVAILABLE MetadataStatus = 2 )
func (*MetadataStatus) Is ¶ added in v0.60.0
func (x *MetadataStatus) Is(values ...MetadataStatus) bool
func (MetadataStatus) MarshalText ¶ added in v0.60.0
func (x MetadataStatus) MarshalText() ([]byte, error)
func (MetadataStatus) String ¶ added in v0.60.0
func (x MetadataStatus) String() string
func (*MetadataStatus) UnmarshalText ¶ added in v0.60.0
func (x *MetadataStatus) UnmarshalText(b []byte) error
type OfferType ¶ added in v0.60.0
type OfferType uint8
func (OfferType) MarshalText ¶ added in v0.60.0
func (*OfferType) UnmarshalText ¶ added in v0.60.0
type Options ¶
type Options struct {
	MarketplaceAPIURL string
	JWTAuthToken      string
	HTTPClient        HTTPClient
}
    type Order ¶
type Order struct {
	ID            uint64          `json:"-" db:"id,omitempty"`
	CollectionID  uint64          `json:"-" db:"market_id"`
	CollectibleID *uint64         `json:"-" db:"collectible_id"`
	OrderID       string          `json:"orderId" db:"order_id"`
	Marketplace   MarketplaceKind `json:"marketplace" db:"marketplace"`
	Source        SourceKind      `json:"-" db:"source"`
	Side          OrderSide       `json:"side" db:"side"`
	Status        OrderStatus     `json:"status" db:"status"`
	ChainID       uint64          `json:"chainId" db:"chain_id"`
	OriginName    string          `json:"originName,omitempty" db:"origin_name"`
	// contract
	CollectionContractAddress  prototyp.Hash    `json:"collectionContractAddress" db:"contract_address"`
	TokenID                    *prototyp.BigInt `json:"tokenId" db:"token_id"`
	CreatedBy                  prototyp.Hash    `json:"createdBy" db:"created_by"`
	PriceAmount                prototyp.BigInt  `json:"priceAmount" db:"price_amount"`
	PriceAmountFormatted       string           `json:"priceAmountFormatted"`
	PriceAmountNet             prototyp.BigInt  `json:"priceAmountNet" db:"price_amount_net"`
	PriceAmountNetFormatted    string           `json:"priceAmountNetFormatted"`
	PriceCurrencyAddress       prototyp.Hash    `json:"priceCurrencyAddress" db:"price_currency_address"`
	PriceDecimals              uint64           `json:"priceDecimals" db:"price_decimals"`
	PriceUSD                   float64          `json:"priceUSD" db:"price_usd"`
	PriceUSDFormatted          string           `json:"priceUSDFormatted"`
	QuantityInitial            prototyp.BigInt  `json:"quantityInitial" db:"qty_initial"`
	QuantityInitialFormatted   string           `json:"quantityInitialFormatted"`
	QuantityRemaining          prototyp.BigInt  `json:"quantityRemaining" db:"qty_remaining"`
	QuantityRemainingFormatted string           `json:"quantityRemainingFormatted"`
	QuantityAvailable          prototyp.BigInt  `json:"quantityAvailable" db:"qty_available"`
	QuantityAvailableFormatted string           `json:"quantityAvailableFormatted"`
	QuantityDecimals           uint64           `json:"quantityDecimals" db:"qty_decimals"`
	FeeBPS                     int64            `json:"feeBps" db:"fee_bps"`
	FeeBreakdown               []*FeeBreakdown  `json:"feeBreakdown" db:"fee_breakdown"`
	ValidFrom                  time.Time        `json:"validFrom" db:"valid_from"`
	// expiration
	ValidUntil     time.Time  `json:"validUntil" db:"valid_until"`
	BlockNumber    uint64     `json:"blockNumber" db:"block_number"`
	OrderCreatedAt *time.Time `json:"orderCreatedAt" db:"order_created_at"`
	OrderUpdatedAt *time.Time `json:"orderUpdatedAt" db:"order_updated_at"`
	CreatedAt      time.Time  `json:"createdAt" db:"created_at"`
	UpdatedAt      time.Time  `json:"updatedAt" db:"updated_at"`
	DeletedAt      *time.Time `json:"deletedAt,omitempty" db:"deleted_at"`
}
    type OrderFilter ¶
type OrderFilter struct {
	CreatedBy   []string          `json:"createdBy"`
	Marketplace []MarketplaceKind `json:"marketplace"`
	Currencies  []string          `json:"currencies"`
}
    type OrderSide ¶
type OrderSide uint8
func (OrderSide) MarshalText ¶
func (*OrderSide) UnmarshalText ¶
type OrderStatus ¶
type OrderStatus uint8
const ( OrderStatus_unknown OrderStatus = 0 // Fillable OrderStatus_active OrderStatus = 1 // Temporarily unfillable, due to balance / approval OrderStatus_inactive OrderStatus = 2 // Permanently unfillable, due to expiry OrderStatus_expired OrderStatus = 3 // Permanently unfillable, due to cancellation (by user or protocol) OrderStatus_cancelled OrderStatus = 4 // Permanently unfillable, because it's been completely filled OrderStatus_filled OrderStatus = 5 // Decimals are missing on collectible needs to be synced and order updated OrderStatus_decimals_missing OrderStatus = 6 )
func (*OrderStatus) Is ¶
func (x *OrderStatus) Is(values ...OrderStatus) bool
func (OrderStatus) MarshalText ¶
func (x OrderStatus) MarshalText() ([]byte, error)
func (OrderStatus) String ¶
func (x OrderStatus) String() string
func (*OrderStatus) UnmarshalText ¶
func (x *OrderStatus) UnmarshalText(b []byte) error
type OrderbookKind ¶ added in v0.49.0
type OrderbookKind uint32
const ( OrderbookKind_unknown OrderbookKind = 0 OrderbookKind_sequence_marketplace_v1 OrderbookKind = 1 OrderbookKind_sequence_marketplace_v2 OrderbookKind = 2 OrderbookKind_blur OrderbookKind = 3 OrderbookKind_opensea OrderbookKind = 4 OrderbookKind_looks_rare OrderbookKind = 5 OrderbookKind_reservoir OrderbookKind = 6 OrderbookKind_x2y2 OrderbookKind = 7 )
func (*OrderbookKind) Is ¶ added in v0.49.0
func (x *OrderbookKind) Is(values ...OrderbookKind) bool
func (OrderbookKind) MarshalText ¶ added in v0.49.0
func (x OrderbookKind) MarshalText() ([]byte, error)
func (OrderbookKind) String ¶ added in v0.49.0
func (x OrderbookKind) String() string
func (*OrderbookKind) UnmarshalText ¶ added in v0.49.0
func (x *OrderbookKind) UnmarshalText(b []byte) error
type Page ¶
type Page struct {
	// Numbered pages: Page number, this is multiplied by the value of the <pageSize> parameter.
	Page uint32 `json:"page,omitempty"`
	// Number of items per page
	PageSize uint32 `json:"pageSize,omitempty"`
	// Indicates if there are more results available
	More *bool `json:"more,omitempty"`
	// Sorting filter
	Sort []*SortBy `json:"sort,omitempty"`
}
    Page represents a results page. This can be used both to request a page and to store the state of a page.
type PostRequest ¶ added in v0.49.0
type PriceFilter ¶ added in v0.60.0
type PrimarySaleContract ¶ added in v0.54.0
type PrimarySaleContract struct {
	ID                uint64                    `json:"-" db:"id,omitempty"`
	ChainID           uint64                    `json:"chainId" db:"chain_id"`
	ContractAddress   prototyp.Hash             `json:"contractAddress" db:"contract_address"`
	CollectionAddress prototyp.Hash             `json:"collectionAddress" db:"collection_address"`
	ContractType      ContractType              `json:"contractType" db:"contract_type"`
	Version           PrimarySaleVersion        `json:"version" db:"version"`
	CurrencyAddress   prototyp.Hash             `json:"currencyAddress" db:"currency_address"`
	PriceDecimals     uint64                    `json:"priceDecimals" db:"price_decimals"`
	ItemsContractID   uint64                    `json:"-" db:"items_contract_id"`
	Status            PrimarySaleContractStatus `json:"status" db:"status"`
	LastSynced        time.Time                 `json:"lastSynced" db:"last_synced"`
	CreatedAt         time.Time                 `json:"createdAt" db:"created_at"`
	UpdatedAt         time.Time                 `json:"updatedAt" db:"updated_at"`
	DeletedAt         *time.Time                `json:"deletedAt,omitempty" db:"deleted_at"`
}
    type PrimarySaleContractStatus ¶ added in v0.54.0
type PrimarySaleContractStatus uint8
const ( PrimarySaleContractStatus_unknown PrimarySaleContractStatus = 0 PrimarySaleContractStatus_created PrimarySaleContractStatus = 1 PrimarySaleContractStatus_syncing_items PrimarySaleContractStatus = 2 PrimarySaleContractStatus_active PrimarySaleContractStatus = 10 PrimarySaleContractStatus_inactive PrimarySaleContractStatus = 20 PrimarySaleContractStatus_incompatible_type PrimarySaleContractStatus = 21 PrimarySaleContractStatus_failed PrimarySaleContractStatus = 22 )
func (*PrimarySaleContractStatus) Is ¶ added in v0.54.0
func (x *PrimarySaleContractStatus) Is(values ...PrimarySaleContractStatus) bool
func (PrimarySaleContractStatus) MarshalText ¶ added in v0.54.0
func (x PrimarySaleContractStatus) MarshalText() ([]byte, error)
func (PrimarySaleContractStatus) String ¶ added in v0.54.0
func (x PrimarySaleContractStatus) String() string
func (*PrimarySaleContractStatus) UnmarshalText ¶ added in v0.54.0
func (x *PrimarySaleContractStatus) UnmarshalText(b []byte) error
type PrimarySaleItem ¶ added in v0.54.0
type PrimarySaleItem struct {
	ID                   uint64                    `json:"-" db:"id,omitempty"`
	ContractID           uint64                    `json:"-" db:"contract_id,omitempty"`
	ItemAddress          prototyp.Hash             `json:"itemAddress"`
	ContractType         ContractType              `json:"contractType"`
	CollectibleID        uint64                    `json:"-" db:"collectible_id"`
	TokenID              prototyp.BigInt           `json:"tokenId"`
	ItemType             PrimarySaleItemDetailType `json:"itemType" db:"detail_type,omitempty"`
	StartDate            time.Time                 `json:"startDate" db:"start_date"`
	EndDate              time.Time                 `json:"endDate" db:"end_date"`
	CurrencyAddress      prototyp.Hash             `json:"currencyAddress"`
	PriceDecimals        uint64                    `json:"priceDecimals"`
	PriceAmount          prototyp.BigInt           `json:"priceAmount" db:"price_amount"`
	PriceAmountFormatted string                    `json:"priceAmountFormatted"`
	Supply               prototyp.BigInt           `json:"supply" db:"supply"`
	SupplyCap            prototyp.BigInt           `json:"supplyCap" db:"supply_cap"`
	UnlimitedSupply      bool                      `json:"unlimitedSupply" db:"unlimited_supply"`
	CreatedAt            time.Time                 `json:"createdAt" db:"created_at"`
	UpdatedAt            time.Time                 `json:"updatedAt" db:"updated_at"`
	DeletedAt            *time.Time                `json:"deletedAt,omitempty" db:"deleted_at"`
}
    type PrimarySaleItemDetailType ¶ added in v0.54.0
type PrimarySaleItemDetailType uint8
const ( PrimarySaleItemDetailType_unknown PrimarySaleItemDetailType = 0 PrimarySaleItemDetailType_global PrimarySaleItemDetailType = 1 PrimarySaleItemDetailType_individual PrimarySaleItemDetailType = 2 )
func (*PrimarySaleItemDetailType) Is ¶ added in v0.54.0
func (x *PrimarySaleItemDetailType) Is(values ...PrimarySaleItemDetailType) bool
func (PrimarySaleItemDetailType) MarshalText ¶ added in v0.54.0
func (x PrimarySaleItemDetailType) MarshalText() ([]byte, error)
func (PrimarySaleItemDetailType) String ¶ added in v0.54.0
func (x PrimarySaleItemDetailType) String() string
func (*PrimarySaleItemDetailType) UnmarshalText ¶ added in v0.54.0
func (x *PrimarySaleItemDetailType) UnmarshalText(b []byte) error
type PrimarySaleItemsFilter ¶ added in v0.54.0
type PrimarySaleItemsFilter struct {
	// include primary sale items with supply cap 0
	IncludeEmpty bool `json:"includeEmpty"`
	// search collectibles by text
	// if the filter matches too many tokens (over 65,000), only a subset of results will be returned
	SearchText *string `json:"searchText"`
	// filter by metadata properties
	Properties []*PropertyFilter `json:"properties"`
	// filter by item detail type
	DetailTypes     []PrimarySaleItemDetailType `json:"detailTypes"`
	StartDateAfter  *time.Time                  `json:"startDateAfter"`
	StartDateBefore *time.Time                  `json:"startDateBefore"`
	EndDateAfter    *time.Time                  `json:"endDateAfter"`
	EndDateBefore   *time.Time                  `json:"endDateBefore"`
}
    type PrimarySaleVersion ¶ added in v0.60.0
type PrimarySaleVersion uint8
const ( PrimarySaleVersion_v0 PrimarySaleVersion = 0 PrimarySaleVersion_v1 PrimarySaleVersion = 1 )
func (*PrimarySaleVersion) Is ¶ added in v0.60.0
func (x *PrimarySaleVersion) Is(values ...PrimarySaleVersion) bool
func (PrimarySaleVersion) MarshalText ¶ added in v0.60.0
func (x PrimarySaleVersion) MarshalText() ([]byte, error)
func (PrimarySaleVersion) String ¶ added in v0.60.0
func (x PrimarySaleVersion) String() string
func (*PrimarySaleVersion) UnmarshalText ¶ added in v0.60.0
func (x *PrimarySaleVersion) UnmarshalText(b []byte) error
type Project ¶
type Project struct {
	ID                    uint64        `json:"-" db:"id,omitempty"`
	ProjectID             uint64        `json:"projectId" db:"project_id"`
	CollectionID          *uint64       `json:"-" db:"market_id,omitempty"`
	PrimarySaleContractID *uint64       `json:"-" db:"primary_sale_contract_id,omitempty"`
	ChainID               uint64        `json:"chainId" db:"chain_id"`
	ContractAddress       prototyp.Hash `json:"contractAddress" db:"contract_address"`
	Status                ProjectStatus `json:"status" db:"status"`
	CreatedAt             time.Time     `json:"createdAt" db:"created_at"`
	UpdatedAt             time.Time     `json:"updatedAt" db:"updated_at"`
	DeletedAt             *time.Time    `json:"deletedAt,omitempty" db:"deleted_at"`
}
    type ProjectStatus ¶
type ProjectStatus uint8
const ( ProjectStatus_unknown ProjectStatus = 0 ProjectStatus_active ProjectStatus = 1 ProjectStatus_inactive ProjectStatus = 2 )
func (*ProjectStatus) Is ¶
func (x *ProjectStatus) Is(values ...ProjectStatus) bool
func (ProjectStatus) MarshalText ¶
func (x ProjectStatus) MarshalText() ([]byte, error)
func (ProjectStatus) String ¶
func (x ProjectStatus) String() string
func (*ProjectStatus) UnmarshalText ¶
func (x *ProjectStatus) UnmarshalText(b []byte) error
type PropertyFilter ¶
type PropertyFilter struct {
	Name   string        `json:"name"`
	Type   PropertyType  `json:"type"`
	Min    *int64        `json:"min"`
	Max    *int64        `json:"max"`
	Values []interface{} `json:"values"`
}
    type PropertyType ¶
type PropertyType uint32
const ( PropertyType_INT PropertyType = 0 PropertyType_STRING PropertyType = 1 PropertyType_ARRAY PropertyType = 2 PropertyType_GENERIC PropertyType = 3 )
func (*PropertyType) Is ¶
func (x *PropertyType) Is(values ...PropertyType) bool
func (PropertyType) MarshalText ¶
func (x PropertyType) MarshalText() ([]byte, error)
func (PropertyType) String ¶
func (x PropertyType) String() string
func (*PropertyType) UnmarshalText ¶
func (x *PropertyType) UnmarshalText(b []byte) error
type SortOrder ¶
type SortOrder uint32
func (SortOrder) MarshalText ¶
func (*SortOrder) UnmarshalText ¶
type SourceKind ¶
type SourceKind uint32
const ( SourceKind_unknown SourceKind = 0 SourceKind_external SourceKind = 1 SourceKind_sequence_marketplace_v1 SourceKind = 2 SourceKind_sequence_marketplace_v2 SourceKind = 3 SourceKind_opensea SourceKind = 4 )
func (*SourceKind) Is ¶
func (x *SourceKind) Is(values ...SourceKind) bool
func (SourceKind) MarshalText ¶
func (x SourceKind) MarshalText() ([]byte, error)
func (SourceKind) String ¶
func (x SourceKind) String() string
func (*SourceKind) UnmarshalText ¶
func (x *SourceKind) UnmarshalText(b []byte) error
type Step ¶ added in v0.49.0
type Step struct {
	ID          StepType     `json:"id"`
	Data        string       `json:"data"`
	To          string       `json:"to"`
	Value       string       `json:"value"`
	Price       string       `json:"price"`
	Signature   *Signature   `json:"signature"`
	Post        *PostRequest `json:"post"`
	ExecuteType *ExecuteType `json:"executeType"`
}
    type StepType ¶ added in v0.49.0
type StepType uint8
func (StepType) MarshalText ¶ added in v0.49.0
func (*StepType) UnmarshalText ¶ added in v0.49.0
type TokenMetadata ¶
type TokenMetadata struct {
	TokenID     string `json:"tokenId"`
	Name        string `json:"name"`
	Description string `json:"description"`
	// url
	Image string `json:"image"`
	// non-standard fields we've added for Sequence. Others should adopt
	// these too and we should prompt, similar to how `image` field works.
	// url
	Video string `json:"video,omitempty"`
	// url
	Audio      string                 `json:"audio,omitempty"`
	Properties map[string]interface{} `json:"properties"`
	// OpenSea fields
	// see https://docs.opensea.io/docs/metadata-standards
	//
	// NOTE: its a bit unfortunate OpenSea didn't use camelCase, and
	// also introduces 'attributes' when 'properties' is actually the correct property name.
	// TODO: we could smooth this out / normalize it, but we can leave it for now.
	Attributes      []map[string]interface{} `json:"attributes"`
	ImageData       string                   `json:"image_data,omitempty"`
	ExternalUrl     string                   `json:"external_url,omitempty"`
	BackgroundColor string                   `json:"background_color,omitempty"`
	AnimationUrl    string                   `json:"animation_url,omitempty"`
	//
	// Misc
	//
	// decimals is deprecated, but still used by some
	Decimals  *uint64   `json:"decimals,omitempty"`
	UpdatedAt time.Time `json:"updatedAt"`
	// Assets associated to this token metadata
	Assets []*Asset       `json:"assets,omitempty"`
	Status MetadataStatus `json:"status"`
}
    TokenMetadata based on 721/1155 standards, as well including some fields which are used by OpenSea.
TokenMetadata is RPC type for responding to clients that represents the token-level metadata.
type TransactionCrypto ¶ added in v0.49.0
type TransactionCrypto uint32
const ( TransactionCrypto_none TransactionCrypto = 0 TransactionCrypto_partially TransactionCrypto = 1 TransactionCrypto_all TransactionCrypto = 2 )
func (*TransactionCrypto) Is ¶ added in v0.49.0
func (x *TransactionCrypto) Is(values ...TransactionCrypto) bool
func (TransactionCrypto) MarshalText ¶ added in v0.49.0
func (x TransactionCrypto) MarshalText() ([]byte, error)
func (TransactionCrypto) String ¶ added in v0.49.0
func (x TransactionCrypto) String() string
func (*TransactionCrypto) UnmarshalText ¶ added in v0.49.0
func (x *TransactionCrypto) UnmarshalText(b []byte) error
type TransactionNFTCheckoutProvider ¶ added in v0.49.0
type TransactionNFTCheckoutProvider uint32
const ( TransactionNFTCheckoutProvider_unknown TransactionNFTCheckoutProvider = 0 TransactionNFTCheckoutProvider_transak TransactionNFTCheckoutProvider = 1 TransactionNFTCheckoutProvider_sardine TransactionNFTCheckoutProvider = 2 )
func (*TransactionNFTCheckoutProvider) Is ¶ added in v0.49.0
func (x *TransactionNFTCheckoutProvider) Is(values ...TransactionNFTCheckoutProvider) bool
func (TransactionNFTCheckoutProvider) MarshalText ¶ added in v0.49.0
func (x TransactionNFTCheckoutProvider) MarshalText() ([]byte, error)
func (TransactionNFTCheckoutProvider) String ¶ added in v0.49.0
func (x TransactionNFTCheckoutProvider) String() string
func (*TransactionNFTCheckoutProvider) UnmarshalText ¶ added in v0.49.0
func (x *TransactionNFTCheckoutProvider) UnmarshalText(b []byte) error
type TransactionOnRampProvider ¶ added in v0.49.0
type TransactionOnRampProvider uint32
const ( TransactionOnRampProvider_unknown TransactionOnRampProvider = 0 TransactionOnRampProvider_transak TransactionOnRampProvider = 1 TransactionOnRampProvider_sardine TransactionOnRampProvider = 2 )
func (*TransactionOnRampProvider) Is ¶ added in v0.49.0
func (x *TransactionOnRampProvider) Is(values ...TransactionOnRampProvider) bool
func (TransactionOnRampProvider) MarshalText ¶ added in v0.49.0
func (x TransactionOnRampProvider) MarshalText() ([]byte, error)
func (TransactionOnRampProvider) String ¶ added in v0.49.0
func (x TransactionOnRampProvider) String() string
func (*TransactionOnRampProvider) UnmarshalText ¶ added in v0.49.0
func (x *TransactionOnRampProvider) UnmarshalText(b []byte) error
type TransactionSwapProvider ¶ added in v0.49.0
type TransactionSwapProvider uint32
const ( TransactionSwapProvider_unknown TransactionSwapProvider = 0 TransactionSwapProvider_lifi TransactionSwapProvider = 1 )
func (*TransactionSwapProvider) Is ¶ added in v0.49.0
func (x *TransactionSwapProvider) Is(values ...TransactionSwapProvider) bool
func (TransactionSwapProvider) MarshalText ¶ added in v0.49.0
func (x TransactionSwapProvider) MarshalText() ([]byte, error)
func (TransactionSwapProvider) String ¶ added in v0.49.0
func (x TransactionSwapProvider) String() string
func (*TransactionSwapProvider) UnmarshalText ¶ added in v0.49.0
func (x *TransactionSwapProvider) UnmarshalText(b []byte) error
type WalletKind ¶ added in v0.49.0
type WalletKind uint8
const ( WalletKind_unknown WalletKind = 0 WalletKind_sequence WalletKind = 1 )
func (*WalletKind) Is ¶ added in v0.49.0
func (x *WalletKind) Is(values ...WalletKind) bool
func (WalletKind) MarshalText ¶ added in v0.49.0
func (x WalletKind) MarshalText() ([]byte, error)
func (WalletKind) String ¶ added in v0.49.0
func (x WalletKind) String() string
func (*WalletKind) UnmarshalText ¶ added in v0.49.0
func (x *WalletKind) UnmarshalText(b []byte) error
type WebRPCError ¶
type WebRPCError struct {
	Name       string `json:"error"`
	Code       int    `json:"code"`
	Message    string `json:"msg"`
	Cause      string `json:"cause,omitempty"`
	HTTPStatus int    `json:"status"`
	// contains filtered or unexported fields
}
    
        
          
            func ErrorWithCause
            deprecated
            
          
  
    
  
      
      func ErrorWithCause(rpcErr WebRPCError, cause error) WebRPCError
Deprecated: Use .WithCause() method on WebRPCError.
func (WebRPCError) Error ¶
func (e WebRPCError) Error() string
func (WebRPCError) Is ¶
func (e WebRPCError) Is(target error) bool
func (WebRPCError) Unwrap ¶
func (e WebRPCError) Unwrap() error
func (WebRPCError) WithCause ¶
func (e WebRPCError) WithCause(cause error) WebRPCError
func (WebRPCError) WithCausef ¶
func (e WebRPCError) WithCausef(format string, args ...interface{}) WebRPCError
type WebrpcGenVersions ¶ added in v0.49.0
type WebrpcGenVersions struct {
	WebrpcGenVersion string
	CodeGenName      string
	CodeGenVersion   string
	SchemaName       string
	SchemaVersion    string
}
    func VersionFromHeader ¶ added in v0.49.0
func VersionFromHeader(h http.Header) (*WebrpcGenVersions, error)