Documentation
¶
Overview ¶
marketplace-api 8569918d27ddb43b484dbd057b83e8855acfdb05 -- Code generated by webrpc-gen@v0.18.3 with golang generator. DO NOT EDIT.
webrpc-gen -schema=marketplace.ridl -target=golang -pkg=marketplaceclient -client -out=./clients/marketplace.gen.go
Index ¶
- Constants
- Variables
- func HTTPRequestHeaders(ctx context.Context) (http.Header, 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 WithHTTPRequestHeaders(ctx context.Context, h http.Header) (context.Context, error)
- type Activity
- type Admin
- type AdminClient
- type Asset
- type Collectible
- type CollectibleOrder
- type CollectibleStatus
- type CollectiblesFilter
- type Collection
- type CollectionConfig
- type CollectionLastSynced
- type CollectionStatus
- type Currency
- type FeeBreakdown
- type Filter
- type HTTPClient
- type Marketplace
- type MarketplaceClient
- type MarketplaceKind
- type Options
- type Order
- type OrderFilter
- type OrderSide
- type OrderStatus
- type Page
- type Project
- type ProjectStatus
- type PropertyFilter
- type PropertyType
- type SortBy
- type SortOrder
- type SourceKind
- type TokenMetadata
- type WebRPCError
Constants ¶
const ( AdminPathPrefix = "/rpc/Admin/" MarketplacePathPrefix = "/rpc/Marketplace/" )
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 CollectibleStatus_name = map[uint8]string{
0: "unknown",
1: "active",
2: "inactive",
}
var CollectibleStatus_value = map[string]uint8{
"unknown": 0,
"active": 1,
"inactive": 2,
}
var CollectionStatus_name = map[uint8]string{
0: "unknown",
1: "created",
2: "syncing_tokens",
3: "synced_tokens",
4: "syncing_orders",
5: "active",
6: "failed",
7: "inactive",
}
var CollectionStatus_value = map[string]uint8{
"unknown": 0,
"created": 1,
"syncing_tokens": 2,
"synced_tokens": 3,
"syncing_orders": 4,
"active": 5,
"failed": 6,
"inactive": 7,
}
var MarketplaceKind_name = map[uint32]string{
0: "unknown",
1: "sequence_marketplace_v1",
2: "sequence_marketplace_v2",
3: "opensea",
4: "magic_eden",
5: "mintify",
6: "looks_rare",
7: "x2y2",
8: "sudo_swap",
9: "coinbase",
10: "rarible",
11: "nftx",
12: "foundation",
13: "manifold",
14: "zora",
15: "blur",
16: "super_rare",
17: "okx",
18: "element",
19: "aqua_xyz",
20: "auranft_co",
}
var MarketplaceKind_value = map[string]uint32{
"unknown": 0,
"sequence_marketplace_v1": 1,
"sequence_marketplace_v2": 2,
"opensea": 3,
"magic_eden": 4,
"mintify": 5,
"looks_rare": 6,
"x2y2": 7,
"sudo_swap": 8,
"coinbase": 9,
"rarible": 10,
"nftx": 11,
"foundation": 12,
"manifold": 13,
"zora": 14,
"blur": 15,
"super_rare": 16,
"okx": 17,
"element": 18,
"aqua_xyz": 19,
"auranft_co": 20,
}
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",
}
var OrderStatus_value = map[string]uint8{
"unknown": 0,
"active": 1,
"inactive": 2,
"expired": 3,
"cancelled": 4,
"filled": 5,
}
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: "DESC",
1: "ASC",
}
var SortOrder_value = map[string]uint32{
"DESC": 0,
"ASC": 1,
}
var SourceKind_name = map[uint32]string{
0: "unknown",
1: "external",
2: "sequence_marketplace_v1",
3: "sequence_marketplace_v2",
}
var SourceKind_value = map[string]uint32{
"unknown": 0,
"external": 1,
"sequence_marketplace_v1": 2,
"sequence_marketplace_v2": 3,
}
var WebRPCServices = map[string][]string{
"Admin": {
"CreateCollection",
"GetCollection",
"ListCollections",
"DeleteCollection",
"SyncCollection",
"CreateCurrency",
"CreateCurrencies",
"UpdateCurrency",
"ListCurrencies",
"DeleteCurrency",
},
"Marketplace": {
"ListCurrencies",
"GetCollectible",
"GetCollectibleLowestOffer",
"GetCollectibleHighestOffer",
"GetCollectibleLowestListing",
"GetCollectibleHighestListing",
"ListCollectibleListings",
"ListCollectibleOffers",
"ListCollectiblesWithLowestListing",
"ListCollectiblesWithHighestOffer",
"SyncOrder",
"SyncOrders",
},
}
Functions ¶
func MethodNameFromContext ¶
func ServiceNameFromContext ¶
Types ¶
type Activity ¶
type Activity struct { Type string `json:"type"` FromAddress string `json:"fromAddress"` ToAddress string `json:"toAddress"` TxHash string `json:"txHash"` Timestamp int64 `json:"timestamp"` TokenId string `json:"tokenId"` TokenImage string `json:"tokenImage"` TokenName string `json:"tokenName"` Currency *Currency `json:"currency"` }
type Admin ¶
type Admin interface { CreateCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) GetCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) ListCollections(ctx context.Context, projectId uint64, page *Page) ([]*Collection, *Page, error) DeleteCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) SyncCollection(ctx context.Context, projectId uint64, contractAddress string) error CreateCurrency(ctx context.Context, currency *Currency) (*Currency, error) CreateCurrencies(ctx context.Context, currencies []*Currency) (map[string]*Currency, error) UpdateCurrency(ctx context.Context, currency *Currency) (*Currency, error) ListCurrencies(ctx context.Context) ([]*Currency, error) DeleteCurrency(ctx context.Context, chainId uint64, contractAddress string) (*Currency, error) }
type AdminClient ¶
type AdminClient interface { CreateCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) GetCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) ListCollections(ctx context.Context, projectId uint64, page *Page) ([]*Collection, *Page, error) DeleteCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) SyncCollection(ctx context.Context, projectId uint64, contractAddress string) error CreateCurrency(ctx context.Context, currency *Currency) (*Currency, error) CreateCurrencies(ctx context.Context, currencies []*Currency) (map[string]*Currency, error) UpdateCurrency(ctx context.Context, currency *Currency) (*Currency, error) ListCurrencies(ctx context.Context) ([]*Currency, error) DeleteCurrency(ctx context.Context, chainId uint64, contractAddress string) (*Currency, error) }
func NewAdminClient ¶
func NewAdminClient(addr string, client HTTPClient) AdminClient
func NewMarketplaceAdmin ¶
func NewMarketplaceAdmin(projectAccessKey string, chainHandle string, options ...Options) AdminClient
type Asset ¶
type Asset struct { // asset id ID uint64 `json:"id" db:"id,omitempty"` // collection id associated to this asset CollectionID uint64 `json:"collectionId" db:"collection_id"` // token id associated to this collection TokenID prototyp.BigInt `json:"tokenId" db:"token_id"` // url where we can view the asset contents // ie. https://metadata.sequence.app/projects/1/collections/1/tokens/1/image URL string `json:"url" db:"-"` // metadata field related to TokenMetadata, some field names: // ['image', 'video', 'audio', 'animation_url', ...] MetadataField string `json:"metadataField,omitempty" db:"metadata_field"` // asset details Filename string `json:"filename,omitempty" db:"filename"` Filesize uint32 `json:"filesize,omitempty" db:"filesize"` MimeType string `json:"mimeType,omitempty" db:"mime_type"` Width *uint16 `json:"width,omitempty" db:"width"` Height *uint16 `json:"height,omitempty" db:"height"` UpdatedAt time.Time `json:"updatedAt" db:"updated_at"` }
Asset is a database type used by 'collections' to record static assets for a particular 'token' for the token metadata.
db table: assets
type Collectible ¶
type Collectible struct { ID uint64 `json:"-" db:"id,omitempty"` CollectionID uint64 `json:"-" db:"collection_id,omitempty"` ChainID uint64 `json:"chainId" db:"chain_id"` ContractAddress prototyp.Hash `json:"contractAddress" db:"contract_address"` Status CollectibleStatus `json:"status" db:"status"` TokenID prototyp.BigInt `json:"tokenId" db:"token_id"` 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"` }
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 { IncludeEmpty bool `json:"includeEmpty"` SearchText *string `json:"searchText"` Properties []*PropertyFilter `json:"properties"` Marketplaces []*MarketplaceKind `json:"marketplaces"` // filter collectibles owned by given account addresses InAccounts []string `json:"inAccounts"` // filter out collectibles owned by given account addresses 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"` }
type Collection ¶
type Collection struct { ID uint64 `json:"-" db:"id,omitempty"` Status CollectionStatus `json:"status" db:"status"` ChainID uint64 `json:"chainId" db:"chain_id"` ContractAddress prototyp.Hash `json:"contractAddress" db:"contract_address"` 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 CollectionConfig struct {
LastSynced map[string]*CollectionLastSynced `json:"lastSynced"`
}
type CollectionLastSynced ¶
type CollectionStatus ¶
type CollectionStatus uint8
const ( CollectionStatus_unknown CollectionStatus = 0 CollectionStatus_created CollectionStatus = 1 CollectionStatus_syncing_tokens CollectionStatus = 2 CollectionStatus_synced_tokens CollectionStatus = 3 CollectionStatus_syncing_orders CollectionStatus = 4 CollectionStatus_active CollectionStatus = 5 CollectionStatus_failed CollectionStatus = 6 CollectionStatus_inactive CollectionStatus = 7 )
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 Currency ¶
type Currency struct { ID uint64 `json:"-" db:"id,omitempty"` ChainID uint64 `json:"chainId" db:"chain_id"` ContractAddress prototyp.Hash `json:"contractAddress" db:"contract_address"` 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"` SardineSupported bool `json:"sardineSupported" db:"sardine_supported"` TransakSupported bool `json:"transakSupported" db:"transak_supported"` 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 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 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 Marketplace ¶
type Marketplace interface { ListCurrencies(ctx context.Context) ([]*Currency, error) GetCollectible(ctx context.Context, contractAddress string, tokenId string) (*TokenMetadata, error) GetCollectibleLowestOffer(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) GetCollectibleHighestOffer(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) GetCollectibleLowestListing(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) GetCollectibleHighestListing(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) ListCollectibleListings(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) ListCollectibleOffers(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) ListCollectiblesWithLowestListing(ctx context.Context, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error) ListCollectiblesWithHighestOffer(ctx context.Context, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error) SyncOrder(ctx context.Context, order *Order) error SyncOrders(ctx context.Context, orders []*Order) error }
type MarketplaceClient ¶
type MarketplaceClient interface { ListCurrencies(ctx context.Context) ([]*Currency, error) GetCollectible(ctx context.Context, contractAddress string, tokenId string) (*TokenMetadata, error) GetCollectibleLowestOffer(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) GetCollectibleHighestOffer(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) GetCollectibleLowestListing(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) GetCollectibleHighestListing(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) ListCollectibleListings(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) ListCollectibleOffers(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) ListCollectiblesWithLowestListing(ctx context.Context, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error) ListCollectiblesWithHighestOffer(ctx context.Context, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error) SyncOrder(ctx context.Context, order *Order) error SyncOrders(ctx context.Context, orders []*Order) error }
func NewMarketplaceClient ¶
func NewMarketplaceClient(addr string, client HTTPClient) MarketplaceClient
type MarketplaceKind ¶
type MarketplaceKind uint32
const ( MarketplaceKind_unknown MarketplaceKind = 0 MarketplaceKind_sequence_marketplace_v1 MarketplaceKind = 1 MarketplaceKind_sequence_marketplace_v2 MarketplaceKind = 2 MarketplaceKind_opensea MarketplaceKind = 3 MarketplaceKind_magic_eden MarketplaceKind = 4 MarketplaceKind_mintify MarketplaceKind = 5 MarketplaceKind_looks_rare MarketplaceKind = 6 MarketplaceKind_x2y2 MarketplaceKind = 7 MarketplaceKind_sudo_swap MarketplaceKind = 8 MarketplaceKind_coinbase MarketplaceKind = 9 MarketplaceKind_rarible MarketplaceKind = 10 MarketplaceKind_nftx MarketplaceKind = 11 MarketplaceKind_foundation MarketplaceKind = 12 MarketplaceKind_manifold MarketplaceKind = 13 MarketplaceKind_zora MarketplaceKind = 14 MarketplaceKind_blur MarketplaceKind = 15 MarketplaceKind_super_rare MarketplaceKind = 16 MarketplaceKind_okx MarketplaceKind = 17 MarketplaceKind_element MarketplaceKind = 18 MarketplaceKind_aqua_xyz MarketplaceKind = 19 MarketplaceKind_auranft_co MarketplaceKind = 20 )
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 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:"collection_id,omitempty"` CollectibleID uint64 `json:"-" db:"collectible_id,omitempty"` 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"` // 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"` 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"` 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"` }
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 )
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 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 Project ¶
type Project struct { ID uint64 `json:"-" db:"id,omitempty"` ProjectID uint64 `json:"projectId" db:"project_id"` CollectionID uint64 `json:"-" db:"collection_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 )
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 TokenMetadata ¶
type TokenMetadata struct { TokenID string `json:"tokenId" cbor:"-"` Name string `json:"name" cbor:"-"` Description string `json:"description" cbor:"-"` // url Image string `json:"image" cbor:"-"` // 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" cbor:"-"` // url Audio string `json:"audio,omitempty" cbor:"-"` Properties map[string]interface{} `json:"properties" cbor:"-"` // 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" cbor:"-"` ImageData string `json:"image_data,omitempty" cbor:"-"` ExternalUrl string `json:"external_url,omitempty" cbor:"-"` BackgroundColor string `json:"background_color,omitempty" cbor:"-"` AnimationUrl string `json:"animation_url,omitempty" cbor:"-"` // // Misc // // decimals is deprecated, but still used by some Decimals *uint64 `json:"decimals,omitempty" cbor:"-"` UpdatedAt time.Time `json:"updatedAt" cbor:"-"` // Assets associated to this token metadata Assets []*Asset `json:"assets,omitempty" cbor:"-"` }
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 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