diff --git a/marketplace/marketplace.gen.go b/marketplace/marketplace.gen.go index d0e6851c..fba4b545 100644 --- a/marketplace/marketplace.gen.go +++ b/marketplace/marketplace.gen.go @@ -1,6 +1,6 @@ -// marketplace-api 7ab3354385f317680dd861e82a18aa351d8579d5 +// marketplace-api 562ae69c8e00898eea9e9e9d38f207f12bb4fafe // -- -// Code generated by webrpc-gen@v0.25.1 with golang generator. DO NOT EDIT. +// 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 package marketplace @@ -22,7 +22,7 @@ import ( const WebrpcHeader = "Webrpc" -const WebrpcHeaderValue = "webrpc@v0.25.1;gen-golang@v0.18.3;marketplace-api@v0.0.0-7ab3354385f317680dd861e82a18aa351d8579d5" +const WebrpcHeaderValue = "webrpc@v0.25.4;gen-golang@v0.19.0;marketplace-api@v0.0.0-562ae69c8e00898eea9e9e9d38f207f12bb4fafe" // WebRPC description and code-gen version func WebRPCVersion() string { @@ -36,7 +36,7 @@ func WebRPCSchemaVersion() string { // Schema hash generated from your RIDL schema func WebRPCSchemaHash() string { - return "7ab3354385f317680dd861e82a18aa351d8579d5" + return "562ae69c8e00898eea9e9e9d38f207f12bb4fafe" } type WebrpcGenVersions struct { @@ -249,7 +249,7 @@ func (x *PropertyType) Is(values ...PropertyType) bool { return false } -type MarketplaceKind uint32 +type MarketplaceKind uint8 const ( MarketplaceKind_unknown MarketplaceKind = 0 @@ -263,9 +263,10 @@ const ( MarketplaceKind_alienswap MarketplaceKind = 8 MarketplaceKind_payment_processor MarketplaceKind = 9 MarketplaceKind_mintify MarketplaceKind = 10 + MarketplaceKind_magic_eden MarketplaceKind = 11 ) -var MarketplaceKind_name = map[uint32]string{ +var MarketplaceKind_name = map[uint8]string{ 0: "unknown", 1: "sequence_marketplace_v1", 2: "sequence_marketplace_v2", @@ -277,9 +278,10 @@ var MarketplaceKind_name = map[uint32]string{ 8: "alienswap", 9: "payment_processor", 10: "mintify", + 11: "magic_eden", } -var MarketplaceKind_value = map[string]uint32{ +var MarketplaceKind_value = map[string]uint8{ "unknown": 0, "sequence_marketplace_v1": 1, "sequence_marketplace_v2": 2, @@ -291,14 +293,15 @@ var MarketplaceKind_value = map[string]uint32{ "alienswap": 8, "payment_processor": 9, "mintify": 10, + "magic_eden": 11, } func (x MarketplaceKind) String() string { - return MarketplaceKind_name[uint32(x)] + return MarketplaceKind_name[uint8(x)] } func (x MarketplaceKind) MarshalText() ([]byte, error) { - return []byte(MarketplaceKind_name[uint32(x)]), nil + return []byte(MarketplaceKind_name[uint8(x)]), nil } func (x *MarketplaceKind) UnmarshalText(b []byte) error { @@ -639,8 +642,6 @@ const ( CollectionStatus_created CollectionStatus = 1 CollectionStatus_syncing_contract_metadata CollectionStatus = 2 CollectionStatus_synced_contract_metadata CollectionStatus = 3 - CollectionStatus_syncing_metadata CollectionStatus = 4 - CollectionStatus_synced_metadata CollectionStatus = 5 CollectionStatus_syncing_tokens CollectionStatus = 6 CollectionStatus_synced_tokens CollectionStatus = 7 CollectionStatus_syncing_orders CollectionStatus = 8 @@ -655,8 +656,6 @@ var CollectionStatus_name = map[uint8]string{ 1: "created", 2: "syncing_contract_metadata", 3: "synced_contract_metadata", - 4: "syncing_metadata", - 5: "synced_metadata", 6: "syncing_tokens", 7: "synced_tokens", 8: "syncing_orders", @@ -671,8 +670,6 @@ var CollectionStatus_value = map[string]uint8{ "created": 1, "syncing_contract_metadata": 2, "synced_contract_metadata": 3, - "syncing_metadata": 4, - "synced_metadata": 5, "syncing_tokens": 6, "synced_tokens": 7, "syncing_orders": 8, @@ -1002,20 +999,20 @@ type TransactionNFTCheckoutProvider uint32 const ( TransactionNFTCheckoutProvider_unknown TransactionNFTCheckoutProvider = 0 - TransactionNFTCheckoutProvider_sardine TransactionNFTCheckoutProvider = 1 - TransactionNFTCheckoutProvider_transak TransactionNFTCheckoutProvider = 2 + TransactionNFTCheckoutProvider_transak TransactionNFTCheckoutProvider = 1 + TransactionNFTCheckoutProvider_sardine TransactionNFTCheckoutProvider = 2 ) var TransactionNFTCheckoutProvider_name = map[uint32]string{ 0: "unknown", - 1: "sardine", - 2: "transak", + 1: "transak", + 2: "sardine", } var TransactionNFTCheckoutProvider_value = map[string]uint32{ "unknown": 0, - "sardine": 1, - "transak": 2, + "transak": 1, + "sardine": 2, } func (x TransactionNFTCheckoutProvider) String() string { @@ -1047,20 +1044,20 @@ type TransactionOnRampProvider uint32 const ( TransactionOnRampProvider_unknown TransactionOnRampProvider = 0 - TransactionOnRampProvider_sardine TransactionOnRampProvider = 1 - TransactionOnRampProvider_transak TransactionOnRampProvider = 2 + TransactionOnRampProvider_transak TransactionOnRampProvider = 1 + TransactionOnRampProvider_sardine TransactionOnRampProvider = 2 ) var TransactionOnRampProvider_name = map[uint32]string{ 0: "unknown", - 1: "sardine", - 2: "transak", + 1: "transak", + 2: "sardine", } var TransactionOnRampProvider_value = map[string]uint32{ "unknown": 0, - "sardine": 1, - "transak": 2, + "transak": 1, + "sardine": 2, } func (x TransactionOnRampProvider) String() string { @@ -1092,17 +1089,17 @@ type TransactionSwapProvider uint32 const ( TransactionSwapProvider_unknown TransactionSwapProvider = 0 - TransactionSwapProvider_zerox TransactionSwapProvider = 1 + TransactionSwapProvider_lifi TransactionSwapProvider = 1 ) var TransactionSwapProvider_name = map[uint32]string{ 0: "unknown", - 1: "zerox", + 1: "lifi", } var TransactionSwapProvider_value = map[string]uint32{ "unknown": 0, - "zerox": 1, + "lifi": 1, } func (x TransactionSwapProvider) String() string { @@ -1276,14 +1273,17 @@ 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"` @@ -1360,20 +1360,17 @@ type OrderFilter struct { } 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"` - 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"` - SyncContractMetadataJob uint64 `json:"-" db:"sync_contract_metadata_job"` - RefreshMetadataJob uint64 `json:"-" db:"refresh_metadata_job"` - RefreshMetadataTimestamp time.Time `json:"-" db:"refresh_metadata_timestamp"` - 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"` + 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"` + 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 struct { @@ -1533,239 +1530,244 @@ type Activity struct { var methods = map[string]method{ "/rpc/Admin/CreateCollection": { - Name: "CreateCollection", - Service: "Admin", - Annotations: map[string]string{"auth": "AccessKey"}, + name: "CreateCollection", + service: "Admin", + annotations: map[string]string{"auth": "AccessKey+"}, }, "/rpc/Admin/GetCollection": { - Name: "GetCollection", - Service: "Admin", - Annotations: map[string]string{"auth": "AccessKey"}, + name: "GetCollection", + service: "Admin", + annotations: map[string]string{"auth": "AccessKey+"}, }, "/rpc/Admin/UpdateCollection": { - Name: "UpdateCollection", - Service: "Admin", - Annotations: map[string]string{"auth": "Admin"}, + name: "UpdateCollection", + service: "Admin", + annotations: map[string]string{"auth": "Admin+"}, }, "/rpc/Admin/ListCollections": { - Name: "ListCollections", - Service: "Admin", - Annotations: map[string]string{"auth": "AccessKey"}, + name: "ListCollections", + service: "Admin", + annotations: map[string]string{"auth": "AccessKey+"}, }, "/rpc/Admin/DeleteCollection": { - Name: "DeleteCollection", - Service: "Admin", - Annotations: map[string]string{"auth": "AccessKey"}, + name: "DeleteCollection", + service: "Admin", + annotations: map[string]string{"auth": "AccessKey+"}, }, "/rpc/Admin/SyncCollection": { - Name: "SyncCollection", - Service: "Admin", - Annotations: map[string]string{"auth": "AccessKey"}, + name: "SyncCollection", + service: "Admin", + annotations: map[string]string{"auth": "AccessKey+"}, }, "/rpc/Admin/CreateCurrency": { - Name: "CreateCurrency", - Service: "Admin", - Annotations: map[string]string{"auth": "AccessKey"}, + name: "CreateCurrency", + service: "Admin", + annotations: map[string]string{"auth": "AccessKey+"}, }, "/rpc/Admin/CreateCurrencies": { - Name: "CreateCurrencies", - Service: "Admin", - Annotations: map[string]string{"auth": "AccessKey"}, + name: "CreateCurrencies", + service: "Admin", + annotations: map[string]string{"auth": "AccessKey+"}, }, "/rpc/Admin/UpdateCurrency": { - Name: "UpdateCurrency", - Service: "Admin", - Annotations: map[string]string{"auth": "AccessKey"}, + name: "UpdateCurrency", + service: "Admin", + annotations: map[string]string{"auth": "AccessKey+"}, }, "/rpc/Admin/ListCurrencies": { - Name: "ListCurrencies", - Service: "Admin", - Annotations: map[string]string{"auth": "AccessKey"}, + name: "ListCurrencies", + service: "Admin", + annotations: map[string]string{"auth": "AccessKey+"}, }, "/rpc/Admin/DeleteCurrency": { - Name: "DeleteCurrency", - Service: "Admin", - Annotations: map[string]string{"auth": "AccessKey"}, + name: "DeleteCurrency", + service: "Admin", + annotations: map[string]string{"auth": "AccessKey+"}, }, "/rpc/Marketplace/ListCurrencies": { - Name: "ListCurrencies", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "ListCurrencies", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GetCollectionDetail": { - Name: "GetCollectionDetail", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GetCollectionDetail", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GetCollectible": { - Name: "GetCollectible", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GetCollectible", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GetLowestPriceOfferForCollectible": { - Name: "GetLowestPriceOfferForCollectible", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GetLowestPriceOfferForCollectible", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GetHighestPriceOfferForCollectible": { - Name: "GetHighestPriceOfferForCollectible", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GetHighestPriceOfferForCollectible", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GetLowestPriceListingForCollectible": { - Name: "GetLowestPriceListingForCollectible", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GetLowestPriceListingForCollectible", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GetHighestPriceListingForCollectible": { - Name: "GetHighestPriceListingForCollectible", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GetHighestPriceListingForCollectible", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/ListListingsForCollectible": { - Name: "ListListingsForCollectible", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "ListListingsForCollectible", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/ListOffersForCollectible": { - Name: "ListOffersForCollectible", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "ListOffersForCollectible", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GetCountOfListingsForCollectible": { - Name: "GetCountOfListingsForCollectible", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GetCountOfListingsForCollectible", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GetCountOfOffersForCollectible": { - Name: "GetCountOfOffersForCollectible", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GetCountOfOffersForCollectible", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GetCollectibleLowestOffer": { - Name: "GetCollectibleLowestOffer", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public", "deprecated": "Please use GetLowestPriceOfferForCollectible instead."}, + name: "GetCollectibleLowestOffer", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+", "deprecated": "Please use GetLowestPriceOfferForCollectible instead."}, }, "/rpc/Marketplace/GetCollectibleHighestOffer": { - Name: "GetCollectibleHighestOffer", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public", "deprecated": "Please use GetHighestPriceOfferForCollectible instead."}, + name: "GetCollectibleHighestOffer", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+", "deprecated": "Please use GetHighestPriceOfferForCollectible instead."}, }, "/rpc/Marketplace/GetCollectibleLowestListing": { - Name: "GetCollectibleLowestListing", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public", "deprecated": "Please use GetLowestPriceListingForCollectible instead."}, + name: "GetCollectibleLowestListing", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+", "deprecated": "Please use GetLowestPriceListingForCollectible instead."}, }, "/rpc/Marketplace/GetCollectibleHighestListing": { - Name: "GetCollectibleHighestListing", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public", "deprecated": "Please use GetHighestPriceListingForCollectible instead."}, + name: "GetCollectibleHighestListing", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+", "deprecated": "Please use GetHighestPriceListingForCollectible instead."}, }, "/rpc/Marketplace/ListCollectibleListings": { - Name: "ListCollectibleListings", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public", "deprecated": "Please use ListListingsForCollectible instead."}, + name: "ListCollectibleListings", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+", "deprecated": "Please use ListListingsForCollectible instead."}, }, "/rpc/Marketplace/ListCollectibleOffers": { - Name: "ListCollectibleOffers", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public", "deprecated": "Please use ListOffersForCollectible instead."}, + name: "ListCollectibleOffers", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+", "deprecated": "Please use ListOffersForCollectible instead."}, }, "/rpc/Marketplace/GenerateBuyTransaction": { - Name: "GenerateBuyTransaction", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GenerateBuyTransaction", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GenerateSellTransaction": { - Name: "GenerateSellTransaction", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GenerateSellTransaction", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GenerateListingTransaction": { - Name: "GenerateListingTransaction", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GenerateListingTransaction", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GenerateOfferTransaction": { - Name: "GenerateOfferTransaction", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GenerateOfferTransaction", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GenerateCancelTransaction": { - Name: "GenerateCancelTransaction", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GenerateCancelTransaction", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/Execute": { - Name: "Execute", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "Execute", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/ListCollectibles": { - Name: "ListCollectibles", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "ListCollectibles", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GetCountOfAllCollectibles": { - Name: "GetCountOfAllCollectibles", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GetCountOfAllCollectibles", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GetCountOfFilteredCollectibles": { - Name: "GetCountOfFilteredCollectibles", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GetCountOfFilteredCollectibles", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/GetFloorOrder": { - Name: "GetFloorOrder", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GetFloorOrder", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/ListCollectionActivities": { - Name: "ListCollectionActivities", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "ListCollectionActivities", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/ListCollectibleActivities": { - Name: "ListCollectibleActivities", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "ListCollectibleActivities", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/ListCollectiblesWithLowestListing": { - Name: "ListCollectiblesWithLowestListing", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "ListCollectiblesWithLowestListing", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/ListCollectiblesWithHighestOffer": { - Name: "ListCollectiblesWithHighestOffer", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "ListCollectiblesWithHighestOffer", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/SyncOrder": { - Name: "SyncOrder", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public", "internal": ""}, + name: "SyncOrder", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+", "internal": ""}, }, "/rpc/Marketplace/SyncOrders": { - Name: "SyncOrders", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public", "internal": ""}, + name: "SyncOrders", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+", "internal": ""}, }, "/rpc/Marketplace/GetOrders": { - Name: "GetOrders", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "GetOrders", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/CheckoutOptionsMarketplace": { - Name: "CheckoutOptionsMarketplace", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "CheckoutOptionsMarketplace", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, "/rpc/Marketplace/CheckoutOptionsSalesContract": { - Name: "CheckoutOptionsSalesContract", - Service: "Marketplace", - Annotations: map[string]string{"auth": "Public"}, + name: "CheckoutOptionsSalesContract", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, + }, + "/rpc/Marketplace/SupportedMarketplaces": { + name: "SupportedMarketplaces", + service: "Marketplace", + annotations: map[string]string{"auth": "Public+"}, }, } @@ -1829,6 +1831,7 @@ var WebRPCServices = map[string][]string{ "GetOrders", "CheckoutOptionsMarketplace", "CheckoutOptionsSalesContract", + "SupportedMarketplaces", }, } @@ -1837,66 +1840,67 @@ var WebRPCServices = map[string][]string{ // type Admin interface { - CreateCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) - GetCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) - UpdateCollection(ctx context.Context, collection *Collection) (*Collection, error) - ListCollections(ctx context.Context, projectId uint64, page *Page) ([]*Collection, *Page, error) - DeleteCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) + 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, projectId uint64, contractAddress string) (*Collection, 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) + SyncCollection(ctx context.Context, chainId string, projectId uint64, contractAddress string) (*Collection, 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) } type Marketplace interface { - ListCurrencies(ctx context.Context) ([]*Currency, error) - GetCollectionDetail(ctx context.Context, contractAddress string) (*Collection, error) - GetCollectible(ctx context.Context, contractAddress string, tokenId string) (*TokenMetadata, error) - GetLowestPriceOfferForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) - GetHighestPriceOfferForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) - GetLowestPriceListingForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) - GetHighestPriceListingForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) - ListListingsForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) - ListOffersForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) - GetCountOfListingsForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (uint64, error) - GetCountOfOffersForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (uint64, error) + 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) + 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, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) + GetCollectibleLowestOffer(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) // Deprecated: Please use GetHighestPriceOfferForCollectible instead. - GetCollectibleHighestOffer(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) + GetCollectibleHighestOffer(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) // Deprecated: Please use GetLowestPriceListingForCollectible instead. - GetCollectibleLowestListing(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) + GetCollectibleLowestListing(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) // Deprecated: Please use GetHighestPriceListingForCollectible instead. - GetCollectibleHighestListing(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) + GetCollectibleHighestListing(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) // Deprecated: Please use ListListingsForCollectible instead. - ListCollectibleListings(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) + 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, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) + ListCollectibleOffers(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) // checkout process - GenerateBuyTransaction(ctx context.Context, collectionAddress string, buyer string, marketplace MarketplaceKind, ordersData []*OrderData, additionalFees []*AdditionalFee, walletType *WalletKind) ([]*Step, error) - GenerateSellTransaction(ctx context.Context, collectionAddress string, seller string, marketplace MarketplaceKind, ordersData []*OrderData, additionalFees []*AdditionalFee, walletType *WalletKind) ([]*Step, error) - GenerateListingTransaction(ctx context.Context, collectionAddress string, owner string, contractType ContractType, orderbook OrderbookKind, listing *CreateReq, walletType *WalletKind) ([]*Step, error) - GenerateOfferTransaction(ctx context.Context, collectionAddress string, maker string, contractType ContractType, orderbook OrderbookKind, offer *CreateReq, walletType *WalletKind) ([]*Step, error) - GenerateCancelTransaction(ctx context.Context, collectionAddress string, maker string, marketplace MarketplaceKind, orderId string) ([]*Step, error) + 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, walletType *WalletKind) ([]*Step, error) + GenerateOfferTransaction(ctx context.Context, chainId string, collectionAddress string, maker string, contractType ContractType, orderbook OrderbookKind, offer *CreateReq, walletType *WalletKind) ([]*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, signature string, method string, endpoint string, executeType ExecuteType, body interface{}) (string, error) + 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, side OrderSide, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error) - GetCountOfAllCollectibles(ctx context.Context, contractAddress string) (uint64, error) - GetCountOfFilteredCollectibles(ctx context.Context, side OrderSide, contractAddress string, filter *CollectiblesFilter) (uint64, error) - GetFloorOrder(ctx context.Context, contractAddress string, filter *CollectiblesFilter) (*CollectibleOrder, error) - ListCollectionActivities(ctx context.Context, contractAddress string, page *Page) ([]*Activity, *Page, error) - ListCollectibleActivities(ctx context.Context, contractAddress string, tokenId string, page *Page) ([]*Activity, *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 - GetOrders(ctx context.Context, input []*GetOrdersInput, page *Page) ([]*Order, *Page, error) - CheckoutOptionsMarketplace(ctx context.Context, wallet string, orders []*CheckoutOptionsMarketplaceOrder, additionalFee int) (*CheckoutOptions, error) - CheckoutOptionsSalesContract(ctx context.Context, wallet string, contractAddress string, collectionAddress string, items []*CheckoutOptionsItem) (*CheckoutOptions, error) + 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) } // @@ -1904,66 +1908,67 @@ type Marketplace interface { // type AdminClient interface { - CreateCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) - GetCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) - UpdateCollection(ctx context.Context, collection *Collection) (*Collection, error) - ListCollections(ctx context.Context, projectId uint64, page *Page) ([]*Collection, *Page, error) - DeleteCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) + 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, projectId uint64, contractAddress string) (*Collection, 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) + SyncCollection(ctx context.Context, chainId string, projectId uint64, contractAddress string) (*Collection, 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) } type MarketplaceClient interface { - ListCurrencies(ctx context.Context) ([]*Currency, error) - GetCollectionDetail(ctx context.Context, contractAddress string) (*Collection, error) - GetCollectible(ctx context.Context, contractAddress string, tokenId string) (*TokenMetadata, error) - GetLowestPriceOfferForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) - GetHighestPriceOfferForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) - GetLowestPriceListingForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) - GetHighestPriceListingForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) - ListListingsForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) - ListOffersForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) - GetCountOfListingsForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (uint64, error) - GetCountOfOffersForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (uint64, error) + 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) + 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, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) + GetCollectibleLowestOffer(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) // Deprecated: Please use GetHighestPriceOfferForCollectible instead. - GetCollectibleHighestOffer(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) + GetCollectibleHighestOffer(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) // Deprecated: Please use GetLowestPriceListingForCollectible instead. - GetCollectibleLowestListing(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) + GetCollectibleLowestListing(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) // Deprecated: Please use GetHighestPriceListingForCollectible instead. - GetCollectibleHighestListing(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) + GetCollectibleHighestListing(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) // Deprecated: Please use ListListingsForCollectible instead. - ListCollectibleListings(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) + 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, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) + ListCollectibleOffers(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) // checkout process - GenerateBuyTransaction(ctx context.Context, collectionAddress string, buyer string, marketplace MarketplaceKind, ordersData []*OrderData, additionalFees []*AdditionalFee, walletType *WalletKind) ([]*Step, error) - GenerateSellTransaction(ctx context.Context, collectionAddress string, seller string, marketplace MarketplaceKind, ordersData []*OrderData, additionalFees []*AdditionalFee, walletType *WalletKind) ([]*Step, error) - GenerateListingTransaction(ctx context.Context, collectionAddress string, owner string, contractType ContractType, orderbook OrderbookKind, listing *CreateReq, walletType *WalletKind) ([]*Step, error) - GenerateOfferTransaction(ctx context.Context, collectionAddress string, maker string, contractType ContractType, orderbook OrderbookKind, offer *CreateReq, walletType *WalletKind) ([]*Step, error) - GenerateCancelTransaction(ctx context.Context, collectionAddress string, maker string, marketplace MarketplaceKind, orderId string) ([]*Step, error) + 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, walletType *WalletKind) ([]*Step, error) + GenerateOfferTransaction(ctx context.Context, chainId string, collectionAddress string, maker string, contractType ContractType, orderbook OrderbookKind, offer *CreateReq, walletType *WalletKind) ([]*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, signature string, method string, endpoint string, executeType ExecuteType, body interface{}) (string, error) + 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, side OrderSide, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error) - GetCountOfAllCollectibles(ctx context.Context, contractAddress string) (uint64, error) - GetCountOfFilteredCollectibles(ctx context.Context, side OrderSide, contractAddress string, filter *CollectiblesFilter) (uint64, error) - GetFloorOrder(ctx context.Context, contractAddress string, filter *CollectiblesFilter) (*CollectibleOrder, error) - ListCollectionActivities(ctx context.Context, contractAddress string, page *Page) ([]*Activity, *Page, error) - ListCollectibleActivities(ctx context.Context, contractAddress string, tokenId string, page *Page) ([]*Activity, *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 - GetOrders(ctx context.Context, input []*GetOrdersInput, page *Page) ([]*Order, *Page, error) - CheckoutOptionsMarketplace(ctx context.Context, wallet string, orders []*CheckoutOptionsMarketplaceOrder, additionalFee int) (*CheckoutOptions, error) - CheckoutOptionsSalesContract(ctx context.Context, wallet string, contractAddress string, collectionAddress string, items []*CheckoutOptionsItem) (*CheckoutOptions, error) + 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) } // @@ -1999,11 +2004,13 @@ func NewAdminClient(addr string, client HTTPClient) AdminClient { } } -func (c *adminClient) CreateCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) { +func (c *adminClient) CreateCollection(ctx context.Context, chainId string, projectId uint64, contractAddress string) (*Collection, error) { in := struct { - Arg0 uint64 `json:"projectId"` - Arg1 string `json:"contractAddress"` - }{projectId, contractAddress} + Arg0 string `json:"chainId"` + Arg1 uint64 `json:"projectId"` + Arg2 string `json:"contractAddress"` + }{chainId, projectId, contractAddress} + out := struct { Ret0 *Collection `json:"collection"` }{} @@ -2019,11 +2026,13 @@ func (c *adminClient) CreateCollection(ctx context.Context, projectId uint64, co return out.Ret0, err } -func (c *adminClient) GetCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) { +func (c *adminClient) GetCollection(ctx context.Context, chainId string, projectId uint64, contractAddress string) (*Collection, error) { in := struct { - Arg0 uint64 `json:"projectId"` - Arg1 string `json:"contractAddress"` - }{projectId, contractAddress} + Arg0 string `json:"chainId"` + Arg1 uint64 `json:"projectId"` + Arg2 string `json:"contractAddress"` + }{chainId, projectId, contractAddress} + out := struct { Ret0 *Collection `json:"collection"` }{} @@ -2039,10 +2048,12 @@ func (c *adminClient) GetCollection(ctx context.Context, projectId uint64, contr return out.Ret0, err } -func (c *adminClient) UpdateCollection(ctx context.Context, collection *Collection) (*Collection, error) { +func (c *adminClient) UpdateCollection(ctx context.Context, chainId string, collection *Collection) (*Collection, error) { in := struct { - Arg0 *Collection `json:"collection"` - }{collection} + Arg0 string `json:"chainId"` + Arg1 *Collection `json:"collection"` + }{chainId, collection} + out := struct { Ret0 *Collection `json:"collection"` }{} @@ -2058,11 +2069,13 @@ func (c *adminClient) UpdateCollection(ctx context.Context, collection *Collecti return out.Ret0, err } -func (c *adminClient) ListCollections(ctx context.Context, projectId uint64, page *Page) ([]*Collection, *Page, error) { +func (c *adminClient) ListCollections(ctx context.Context, chainId string, projectId uint64, page *Page) ([]*Collection, *Page, error) { in := struct { - Arg0 uint64 `json:"projectId"` - Arg1 *Page `json:"page"` - }{projectId, page} + Arg0 string `json:"chainId"` + Arg1 uint64 `json:"projectId"` + Arg2 *Page `json:"page"` + }{chainId, projectId, page} + out := struct { Ret0 []*Collection `json:"collections"` Ret1 *Page `json:"page"` @@ -2079,11 +2092,13 @@ func (c *adminClient) ListCollections(ctx context.Context, projectId uint64, pag return out.Ret0, out.Ret1, err } -func (c *adminClient) DeleteCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) { +func (c *adminClient) DeleteCollection(ctx context.Context, chainId string, projectId uint64, contractAddress string) (*Collection, error) { in := struct { - Arg0 uint64 `json:"projectId"` - Arg1 string `json:"contractAddress"` - }{projectId, contractAddress} + Arg0 string `json:"chainId"` + Arg1 uint64 `json:"projectId"` + Arg2 string `json:"contractAddress"` + }{chainId, projectId, contractAddress} + out := struct { Ret0 *Collection `json:"collection"` }{} @@ -2099,11 +2114,13 @@ func (c *adminClient) DeleteCollection(ctx context.Context, projectId uint64, co return out.Ret0, err } -func (c *adminClient) SyncCollection(ctx context.Context, projectId uint64, contractAddress string) (*Collection, error) { +func (c *adminClient) SyncCollection(ctx context.Context, chainId string, projectId uint64, contractAddress string) (*Collection, error) { in := struct { - Arg0 uint64 `json:"projectId"` - Arg1 string `json:"contractAddress"` - }{projectId, contractAddress} + Arg0 string `json:"chainId"` + Arg1 uint64 `json:"projectId"` + Arg2 string `json:"contractAddress"` + }{chainId, projectId, contractAddress} + out := struct { Ret0 *Collection `json:"collection"` }{} @@ -2119,10 +2136,12 @@ func (c *adminClient) SyncCollection(ctx context.Context, projectId uint64, cont return out.Ret0, err } -func (c *adminClient) CreateCurrency(ctx context.Context, currency *Currency) (*Currency, error) { +func (c *adminClient) CreateCurrency(ctx context.Context, chainId string, currency *Currency) (*Currency, error) { in := struct { - Arg0 *Currency `json:"currency"` - }{currency} + Arg0 string `json:"chainId"` + Arg1 *Currency `json:"currency"` + }{chainId, currency} + out := struct { Ret0 *Currency `json:"currency"` }{} @@ -2138,10 +2157,12 @@ func (c *adminClient) CreateCurrency(ctx context.Context, currency *Currency) (* return out.Ret0, err } -func (c *adminClient) CreateCurrencies(ctx context.Context, currencies []*Currency) (map[string]*Currency, error) { +func (c *adminClient) CreateCurrencies(ctx context.Context, chainId string, currencies []*Currency) (map[string]*Currency, error) { in := struct { - Arg0 []*Currency `json:"currencies"` - }{currencies} + Arg0 string `json:"chainId"` + Arg1 []*Currency `json:"currencies"` + }{chainId, currencies} + out := struct { Ret0 map[string]*Currency `json:"currency"` }{} @@ -2157,10 +2178,12 @@ func (c *adminClient) CreateCurrencies(ctx context.Context, currencies []*Curren return out.Ret0, err } -func (c *adminClient) UpdateCurrency(ctx context.Context, currency *Currency) (*Currency, error) { +func (c *adminClient) UpdateCurrency(ctx context.Context, chainId string, currency *Currency) (*Currency, error) { in := struct { - Arg0 *Currency `json:"currency"` - }{currency} + Arg0 string `json:"chainId"` + Arg1 *Currency `json:"currency"` + }{chainId, currency} + out := struct { Ret0 *Currency `json:"currency"` }{} @@ -2176,12 +2199,16 @@ func (c *adminClient) UpdateCurrency(ctx context.Context, currency *Currency) (* return out.Ret0, err } -func (c *adminClient) ListCurrencies(ctx context.Context) ([]*Currency, error) { +func (c *adminClient) ListCurrencies(ctx context.Context, chainId string) ([]*Currency, error) { + in := struct { + Arg0 string `json:"chainId"` + }{chainId} + out := struct { Ret0 []*Currency `json:"currencies"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[9], nil, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[9], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -2192,11 +2219,12 @@ func (c *adminClient) ListCurrencies(ctx context.Context) ([]*Currency, error) { return out.Ret0, err } -func (c *adminClient) DeleteCurrency(ctx context.Context, chainId uint64, contractAddress string) (*Currency, error) { +func (c *adminClient) DeleteCurrency(ctx context.Context, chainId string, contractAddress string) (*Currency, error) { in := struct { - Arg0 uint64 `json:"chainId"` + Arg0 string `json:"chainId"` Arg1 string `json:"contractAddress"` }{chainId, contractAddress} + out := struct { Ret0 *Currency `json:"currency"` }{} @@ -2214,12 +2242,12 @@ func (c *adminClient) DeleteCurrency(ctx context.Context, chainId uint64, contra type marketplaceClient struct { client HTTPClient - urls [36]string + urls [37]string } func NewMarketplaceClient(addr string, client HTTPClient) MarketplaceClient { prefix := urlBase(addr) + MarketplacePathPrefix - urls := [36]string{ + urls := [37]string{ prefix + "ListCurrencies", prefix + "GetCollectionDetail", prefix + "GetCollectible", @@ -2256,6 +2284,7 @@ func NewMarketplaceClient(addr string, client HTTPClient) MarketplaceClient { prefix + "GetOrders", prefix + "CheckoutOptionsMarketplace", prefix + "CheckoutOptionsSalesContract", + prefix + "SupportedMarketplaces", } return &marketplaceClient{ client: client, @@ -2263,12 +2292,16 @@ func NewMarketplaceClient(addr string, client HTTPClient) MarketplaceClient { } } -func (c *marketplaceClient) ListCurrencies(ctx context.Context) ([]*Currency, error) { +func (c *marketplaceClient) ListCurrencies(ctx context.Context, chainId string) ([]*Currency, error) { + in := struct { + Arg0 string `json:"chainId"` + }{chainId} + out := struct { Ret0 []*Currency `json:"currencies"` }{} - resp, err := doHTTPRequest(ctx, c.client, c.urls[0], nil, &out) + resp, err := doHTTPRequest(ctx, c.client, c.urls[0], in, &out) if resp != nil { cerr := resp.Body.Close() if err == nil && cerr != nil { @@ -2279,10 +2312,12 @@ func (c *marketplaceClient) ListCurrencies(ctx context.Context) ([]*Currency, er return out.Ret0, err } -func (c *marketplaceClient) GetCollectionDetail(ctx context.Context, contractAddress string) (*Collection, error) { +func (c *marketplaceClient) GetCollectionDetail(ctx context.Context, chainId string, contractAddress string) (*Collection, error) { in := struct { - Arg0 string `json:"contractAddress"` - }{contractAddress} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + }{chainId, contractAddress} + out := struct { Ret0 *Collection `json:"collection"` }{} @@ -2298,11 +2333,13 @@ func (c *marketplaceClient) GetCollectionDetail(ctx context.Context, contractAdd return out.Ret0, err } -func (c *marketplaceClient) GetCollectible(ctx context.Context, contractAddress string, tokenId string) (*TokenMetadata, error) { +func (c *marketplaceClient) GetCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string) (*TokenMetadata, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - }{contractAddress, tokenId} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + }{chainId, contractAddress, tokenId} + out := struct { Ret0 *TokenMetadata `json:"metadata"` }{} @@ -2318,12 +2355,14 @@ func (c *marketplaceClient) GetCollectible(ctx context.Context, contractAddress return out.Ret0, err } -func (c *marketplaceClient) GetLowestPriceOfferForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { +func (c *marketplaceClient) GetLowestPriceOfferForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - Arg2 *OrderFilter `json:"filter"` - }{contractAddress, tokenId, filter} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + Arg3 *OrderFilter `json:"filter"` + }{chainId, contractAddress, tokenId, filter} + out := struct { Ret0 *Order `json:"order"` }{} @@ -2339,12 +2378,14 @@ func (c *marketplaceClient) GetLowestPriceOfferForCollectible(ctx context.Contex return out.Ret0, err } -func (c *marketplaceClient) GetHighestPriceOfferForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { +func (c *marketplaceClient) GetHighestPriceOfferForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - Arg2 *OrderFilter `json:"filter"` - }{contractAddress, tokenId, filter} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + Arg3 *OrderFilter `json:"filter"` + }{chainId, contractAddress, tokenId, filter} + out := struct { Ret0 *Order `json:"order"` }{} @@ -2360,12 +2401,14 @@ func (c *marketplaceClient) GetHighestPriceOfferForCollectible(ctx context.Conte return out.Ret0, err } -func (c *marketplaceClient) GetLowestPriceListingForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { +func (c *marketplaceClient) GetLowestPriceListingForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - Arg2 *OrderFilter `json:"filter"` - }{contractAddress, tokenId, filter} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + Arg3 *OrderFilter `json:"filter"` + }{chainId, contractAddress, tokenId, filter} + out := struct { Ret0 *Order `json:"order"` }{} @@ -2381,12 +2424,14 @@ func (c *marketplaceClient) GetLowestPriceListingForCollectible(ctx context.Cont return out.Ret0, err } -func (c *marketplaceClient) GetHighestPriceListingForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { +func (c *marketplaceClient) GetHighestPriceListingForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - Arg2 *OrderFilter `json:"filter"` - }{contractAddress, tokenId, filter} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + Arg3 *OrderFilter `json:"filter"` + }{chainId, contractAddress, tokenId, filter} + out := struct { Ret0 *Order `json:"order"` }{} @@ -2402,13 +2447,15 @@ func (c *marketplaceClient) GetHighestPriceListingForCollectible(ctx context.Con return out.Ret0, err } -func (c *marketplaceClient) ListListingsForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) { +func (c *marketplaceClient) ListListingsForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - Arg2 *OrderFilter `json:"filter"` - Arg3 *Page `json:"page"` - }{contractAddress, tokenId, filter, page} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + Arg3 *OrderFilter `json:"filter"` + Arg4 *Page `json:"page"` + }{chainId, contractAddress, tokenId, filter, page} + out := struct { Ret0 []*Order `json:"listings"` Ret1 *Page `json:"page"` @@ -2425,13 +2472,15 @@ func (c *marketplaceClient) ListListingsForCollectible(ctx context.Context, cont return out.Ret0, out.Ret1, err } -func (c *marketplaceClient) ListOffersForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) { +func (c *marketplaceClient) ListOffersForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - Arg2 *OrderFilter `json:"filter"` - Arg3 *Page `json:"page"` - }{contractAddress, tokenId, filter, page} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + Arg3 *OrderFilter `json:"filter"` + Arg4 *Page `json:"page"` + }{chainId, contractAddress, tokenId, filter, page} + out := struct { Ret0 []*Order `json:"offers"` Ret1 *Page `json:"page"` @@ -2448,12 +2497,14 @@ func (c *marketplaceClient) ListOffersForCollectible(ctx context.Context, contra return out.Ret0, out.Ret1, err } -func (c *marketplaceClient) GetCountOfListingsForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (uint64, error) { +func (c *marketplaceClient) GetCountOfListingsForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (uint64, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - Arg2 *OrderFilter `json:"filter"` - }{contractAddress, tokenId, filter} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + Arg3 *OrderFilter `json:"filter"` + }{chainId, contractAddress, tokenId, filter} + out := struct { Ret0 uint64 `json:"count"` }{} @@ -2469,12 +2520,14 @@ func (c *marketplaceClient) GetCountOfListingsForCollectible(ctx context.Context return out.Ret0, err } -func (c *marketplaceClient) GetCountOfOffersForCollectible(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (uint64, error) { +func (c *marketplaceClient) GetCountOfOffersForCollectible(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (uint64, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - Arg2 *OrderFilter `json:"filter"` - }{contractAddress, tokenId, filter} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + Arg3 *OrderFilter `json:"filter"` + }{chainId, contractAddress, tokenId, filter} + out := struct { Ret0 uint64 `json:"count"` }{} @@ -2490,12 +2543,14 @@ func (c *marketplaceClient) GetCountOfOffersForCollectible(ctx context.Context, return out.Ret0, err } -func (c *marketplaceClient) GetCollectibleLowestOffer(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { +func (c *marketplaceClient) GetCollectibleLowestOffer(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - Arg2 *OrderFilter `json:"filter"` - }{contractAddress, tokenId, filter} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + Arg3 *OrderFilter `json:"filter"` + }{chainId, contractAddress, tokenId, filter} + out := struct { Ret0 *Order `json:"order"` }{} @@ -2511,12 +2566,14 @@ func (c *marketplaceClient) GetCollectibleLowestOffer(ctx context.Context, contr return out.Ret0, err } -func (c *marketplaceClient) GetCollectibleHighestOffer(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { +func (c *marketplaceClient) GetCollectibleHighestOffer(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - Arg2 *OrderFilter `json:"filter"` - }{contractAddress, tokenId, filter} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + Arg3 *OrderFilter `json:"filter"` + }{chainId, contractAddress, tokenId, filter} + out := struct { Ret0 *Order `json:"order"` }{} @@ -2532,12 +2589,14 @@ func (c *marketplaceClient) GetCollectibleHighestOffer(ctx context.Context, cont return out.Ret0, err } -func (c *marketplaceClient) GetCollectibleLowestListing(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { +func (c *marketplaceClient) GetCollectibleLowestListing(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - Arg2 *OrderFilter `json:"filter"` - }{contractAddress, tokenId, filter} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + Arg3 *OrderFilter `json:"filter"` + }{chainId, contractAddress, tokenId, filter} + out := struct { Ret0 *Order `json:"order"` }{} @@ -2553,12 +2612,14 @@ func (c *marketplaceClient) GetCollectibleLowestListing(ctx context.Context, con return out.Ret0, err } -func (c *marketplaceClient) GetCollectibleHighestListing(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { +func (c *marketplaceClient) GetCollectibleHighestListing(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter) (*Order, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - Arg2 *OrderFilter `json:"filter"` - }{contractAddress, tokenId, filter} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + Arg3 *OrderFilter `json:"filter"` + }{chainId, contractAddress, tokenId, filter} + out := struct { Ret0 *Order `json:"order"` }{} @@ -2574,13 +2635,15 @@ func (c *marketplaceClient) GetCollectibleHighestListing(ctx context.Context, co return out.Ret0, err } -func (c *marketplaceClient) ListCollectibleListings(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) { +func (c *marketplaceClient) ListCollectibleListings(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - Arg2 *OrderFilter `json:"filter"` - Arg3 *Page `json:"page"` - }{contractAddress, tokenId, filter, page} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + Arg3 *OrderFilter `json:"filter"` + Arg4 *Page `json:"page"` + }{chainId, contractAddress, tokenId, filter, page} + out := struct { Ret0 []*Order `json:"listings"` Ret1 *Page `json:"page"` @@ -2597,13 +2660,15 @@ func (c *marketplaceClient) ListCollectibleListings(ctx context.Context, contrac return out.Ret0, out.Ret1, err } -func (c *marketplaceClient) ListCollectibleOffers(ctx context.Context, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) { +func (c *marketplaceClient) ListCollectibleOffers(ctx context.Context, chainId string, contractAddress string, tokenId string, filter *OrderFilter, page *Page) ([]*Order, *Page, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - Arg2 *OrderFilter `json:"filter"` - Arg3 *Page `json:"page"` - }{contractAddress, tokenId, filter, page} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + Arg3 *OrderFilter `json:"filter"` + Arg4 *Page `json:"page"` + }{chainId, contractAddress, tokenId, filter, page} + out := struct { Ret0 []*Order `json:"offers"` Ret1 *Page `json:"page"` @@ -2620,15 +2685,17 @@ func (c *marketplaceClient) ListCollectibleOffers(ctx context.Context, contractA return out.Ret0, out.Ret1, err } -func (c *marketplaceClient) GenerateBuyTransaction(ctx context.Context, collectionAddress string, buyer string, marketplace MarketplaceKind, ordersData []*OrderData, additionalFees []*AdditionalFee, walletType *WalletKind) ([]*Step, error) { +func (c *marketplaceClient) GenerateBuyTransaction(ctx context.Context, chainId string, collectionAddress string, buyer string, marketplace MarketplaceKind, ordersData []*OrderData, additionalFees []*AdditionalFee, walletType *WalletKind) ([]*Step, error) { in := struct { - Arg0 string `json:"collectionAddress"` - Arg1 string `json:"buyer"` - Arg2 MarketplaceKind `json:"marketplace"` - Arg3 []*OrderData `json:"ordersData"` - Arg4 []*AdditionalFee `json:"additionalFees"` - Arg5 *WalletKind `json:"walletType"` - }{collectionAddress, buyer, marketplace, ordersData, additionalFees, walletType} + Arg0 string `json:"chainId"` + Arg1 string `json:"collectionAddress"` + Arg2 string `json:"buyer"` + Arg3 MarketplaceKind `json:"marketplace"` + Arg4 []*OrderData `json:"ordersData"` + Arg5 []*AdditionalFee `json:"additionalFees"` + Arg6 *WalletKind `json:"walletType"` + }{chainId, collectionAddress, buyer, marketplace, ordersData, additionalFees, walletType} + out := struct { Ret0 []*Step `json:"steps"` }{} @@ -2644,15 +2711,17 @@ func (c *marketplaceClient) GenerateBuyTransaction(ctx context.Context, collecti return out.Ret0, err } -func (c *marketplaceClient) GenerateSellTransaction(ctx context.Context, collectionAddress string, seller string, marketplace MarketplaceKind, ordersData []*OrderData, additionalFees []*AdditionalFee, walletType *WalletKind) ([]*Step, error) { +func (c *marketplaceClient) GenerateSellTransaction(ctx context.Context, chainId string, collectionAddress string, seller string, marketplace MarketplaceKind, ordersData []*OrderData, additionalFees []*AdditionalFee, walletType *WalletKind) ([]*Step, error) { in := struct { - Arg0 string `json:"collectionAddress"` - Arg1 string `json:"seller"` - Arg2 MarketplaceKind `json:"marketplace"` - Arg3 []*OrderData `json:"ordersData"` - Arg4 []*AdditionalFee `json:"additionalFees"` - Arg5 *WalletKind `json:"walletType"` - }{collectionAddress, seller, marketplace, ordersData, additionalFees, walletType} + Arg0 string `json:"chainId"` + Arg1 string `json:"collectionAddress"` + Arg2 string `json:"seller"` + Arg3 MarketplaceKind `json:"marketplace"` + Arg4 []*OrderData `json:"ordersData"` + Arg5 []*AdditionalFee `json:"additionalFees"` + Arg6 *WalletKind `json:"walletType"` + }{chainId, collectionAddress, seller, marketplace, ordersData, additionalFees, walletType} + out := struct { Ret0 []*Step `json:"steps"` }{} @@ -2668,15 +2737,17 @@ func (c *marketplaceClient) GenerateSellTransaction(ctx context.Context, collect return out.Ret0, err } -func (c *marketplaceClient) GenerateListingTransaction(ctx context.Context, collectionAddress string, owner string, contractType ContractType, orderbook OrderbookKind, listing *CreateReq, walletType *WalletKind) ([]*Step, error) { +func (c *marketplaceClient) GenerateListingTransaction(ctx context.Context, chainId string, collectionAddress string, owner string, contractType ContractType, orderbook OrderbookKind, listing *CreateReq, walletType *WalletKind) ([]*Step, error) { in := struct { - Arg0 string `json:"collectionAddress"` - Arg1 string `json:"owner"` - Arg2 ContractType `json:"contractType"` - Arg3 OrderbookKind `json:"orderbook"` - Arg4 *CreateReq `json:"listing"` - Arg5 *WalletKind `json:"walletType"` - }{collectionAddress, owner, contractType, orderbook, listing, walletType} + Arg0 string `json:"chainId"` + Arg1 string `json:"collectionAddress"` + Arg2 string `json:"owner"` + Arg3 ContractType `json:"contractType"` + Arg4 OrderbookKind `json:"orderbook"` + Arg5 *CreateReq `json:"listing"` + Arg6 *WalletKind `json:"walletType"` + }{chainId, collectionAddress, owner, contractType, orderbook, listing, walletType} + out := struct { Ret0 []*Step `json:"steps"` }{} @@ -2692,15 +2763,17 @@ func (c *marketplaceClient) GenerateListingTransaction(ctx context.Context, coll return out.Ret0, err } -func (c *marketplaceClient) GenerateOfferTransaction(ctx context.Context, collectionAddress string, maker string, contractType ContractType, orderbook OrderbookKind, offer *CreateReq, walletType *WalletKind) ([]*Step, error) { +func (c *marketplaceClient) GenerateOfferTransaction(ctx context.Context, chainId string, collectionAddress string, maker string, contractType ContractType, orderbook OrderbookKind, offer *CreateReq, walletType *WalletKind) ([]*Step, error) { in := struct { - Arg0 string `json:"collectionAddress"` - Arg1 string `json:"maker"` - Arg2 ContractType `json:"contractType"` - Arg3 OrderbookKind `json:"orderbook"` - Arg4 *CreateReq `json:"offer"` - Arg5 *WalletKind `json:"walletType"` - }{collectionAddress, maker, contractType, orderbook, offer, walletType} + Arg0 string `json:"chainId"` + Arg1 string `json:"collectionAddress"` + Arg2 string `json:"maker"` + Arg3 ContractType `json:"contractType"` + Arg4 OrderbookKind `json:"orderbook"` + Arg5 *CreateReq `json:"offer"` + Arg6 *WalletKind `json:"walletType"` + }{chainId, collectionAddress, maker, contractType, orderbook, offer, walletType} + out := struct { Ret0 []*Step `json:"steps"` }{} @@ -2716,13 +2789,15 @@ func (c *marketplaceClient) GenerateOfferTransaction(ctx context.Context, collec return out.Ret0, err } -func (c *marketplaceClient) GenerateCancelTransaction(ctx context.Context, collectionAddress string, maker string, marketplace MarketplaceKind, orderId string) ([]*Step, error) { +func (c *marketplaceClient) GenerateCancelTransaction(ctx context.Context, chainId string, collectionAddress string, maker string, marketplace MarketplaceKind, orderId string) ([]*Step, error) { in := struct { - Arg0 string `json:"collectionAddress"` - Arg1 string `json:"maker"` - Arg2 MarketplaceKind `json:"marketplace"` - Arg3 string `json:"orderId"` - }{collectionAddress, maker, marketplace, orderId} + Arg0 string `json:"chainId"` + Arg1 string `json:"collectionAddress"` + Arg2 string `json:"maker"` + Arg3 MarketplaceKind `json:"marketplace"` + Arg4 string `json:"orderId"` + }{chainId, collectionAddress, maker, marketplace, orderId} + out := struct { Ret0 []*Step `json:"steps"` }{} @@ -2738,14 +2813,16 @@ func (c *marketplaceClient) GenerateCancelTransaction(ctx context.Context, colle return out.Ret0, err } -func (c *marketplaceClient) Execute(ctx context.Context, signature string, method string, endpoint string, executeType ExecuteType, body interface{}) (string, error) { +func (c *marketplaceClient) Execute(ctx context.Context, chainId string, signature string, method string, endpoint string, executeType ExecuteType, body interface{}) (string, error) { in := struct { - Arg0 string `json:"signature"` - Arg1 string `json:"method"` - Arg2 string `json:"endpoint"` - Arg3 ExecuteType `json:"executeType"` - Arg4 interface{} `json:"body"` - }{signature, method, endpoint, executeType, body} + Arg0 string `json:"chainId"` + Arg1 string `json:"signature"` + Arg2 string `json:"method"` + Arg3 string `json:"endpoint"` + Arg4 ExecuteType `json:"executeType"` + Arg5 interface{} `json:"body"` + }{chainId, signature, method, endpoint, executeType, body} + out := struct { Ret0 string `json:"orderId"` }{} @@ -2761,13 +2838,15 @@ func (c *marketplaceClient) Execute(ctx context.Context, signature string, metho return out.Ret0, err } -func (c *marketplaceClient) ListCollectibles(ctx context.Context, side OrderSide, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error) { +func (c *marketplaceClient) ListCollectibles(ctx context.Context, chainId string, side OrderSide, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error) { in := struct { - Arg0 OrderSide `json:"side"` - Arg1 string `json:"contractAddress"` - Arg2 *CollectiblesFilter `json:"filter"` - Arg3 *Page `json:"page"` - }{side, contractAddress, filter, page} + Arg0 string `json:"chainId"` + Arg1 OrderSide `json:"side"` + Arg2 string `json:"contractAddress"` + Arg3 *CollectiblesFilter `json:"filter"` + Arg4 *Page `json:"page"` + }{chainId, side, contractAddress, filter, page} + out := struct { Ret0 []*CollectibleOrder `json:"collectibles"` Ret1 *Page `json:"page"` @@ -2784,10 +2863,12 @@ func (c *marketplaceClient) ListCollectibles(ctx context.Context, side OrderSide return out.Ret0, out.Ret1, err } -func (c *marketplaceClient) GetCountOfAllCollectibles(ctx context.Context, contractAddress string) (uint64, error) { +func (c *marketplaceClient) GetCountOfAllCollectibles(ctx context.Context, chainId string, contractAddress string) (uint64, error) { in := struct { - Arg0 string `json:"contractAddress"` - }{contractAddress} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + }{chainId, contractAddress} + out := struct { Ret0 uint64 `json:"count"` }{} @@ -2803,12 +2884,14 @@ func (c *marketplaceClient) GetCountOfAllCollectibles(ctx context.Context, contr return out.Ret0, err } -func (c *marketplaceClient) GetCountOfFilteredCollectibles(ctx context.Context, side OrderSide, contractAddress string, filter *CollectiblesFilter) (uint64, error) { +func (c *marketplaceClient) GetCountOfFilteredCollectibles(ctx context.Context, chainId string, side OrderSide, contractAddress string, filter *CollectiblesFilter) (uint64, error) { in := struct { - Arg0 OrderSide `json:"side"` - Arg1 string `json:"contractAddress"` - Arg2 *CollectiblesFilter `json:"filter"` - }{side, contractAddress, filter} + Arg0 string `json:"chainId"` + Arg1 OrderSide `json:"side"` + Arg2 string `json:"contractAddress"` + Arg3 *CollectiblesFilter `json:"filter"` + }{chainId, side, contractAddress, filter} + out := struct { Ret0 uint64 `json:"count"` }{} @@ -2824,11 +2907,13 @@ func (c *marketplaceClient) GetCountOfFilteredCollectibles(ctx context.Context, return out.Ret0, err } -func (c *marketplaceClient) GetFloorOrder(ctx context.Context, contractAddress string, filter *CollectiblesFilter) (*CollectibleOrder, error) { +func (c *marketplaceClient) GetFloorOrder(ctx context.Context, chainId string, contractAddress string, filter *CollectiblesFilter) (*CollectibleOrder, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 *CollectiblesFilter `json:"filter"` - }{contractAddress, filter} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 *CollectiblesFilter `json:"filter"` + }{chainId, contractAddress, filter} + out := struct { Ret0 *CollectibleOrder `json:"collectible"` }{} @@ -2844,11 +2929,13 @@ func (c *marketplaceClient) GetFloorOrder(ctx context.Context, contractAddress s return out.Ret0, err } -func (c *marketplaceClient) ListCollectionActivities(ctx context.Context, contractAddress string, page *Page) ([]*Activity, *Page, error) { +func (c *marketplaceClient) ListCollectionActivities(ctx context.Context, chainId string, contractAddress string, page *Page) ([]*Activity, *Page, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 *Page `json:"page"` - }{contractAddress, page} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 *Page `json:"page"` + }{chainId, contractAddress, page} + out := struct { Ret0 []*Activity `json:"activities"` Ret1 *Page `json:"page"` @@ -2865,12 +2952,14 @@ func (c *marketplaceClient) ListCollectionActivities(ctx context.Context, contra return out.Ret0, out.Ret1, err } -func (c *marketplaceClient) ListCollectibleActivities(ctx context.Context, contractAddress string, tokenId string, page *Page) ([]*Activity, *Page, error) { +func (c *marketplaceClient) ListCollectibleActivities(ctx context.Context, chainId string, contractAddress string, tokenId string, page *Page) ([]*Activity, *Page, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 string `json:"tokenId"` - Arg2 *Page `json:"page"` - }{contractAddress, tokenId, page} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 string `json:"tokenId"` + Arg3 *Page `json:"page"` + }{chainId, contractAddress, tokenId, page} + out := struct { Ret0 []*Activity `json:"activities"` Ret1 *Page `json:"page"` @@ -2887,12 +2976,14 @@ func (c *marketplaceClient) ListCollectibleActivities(ctx context.Context, contr return out.Ret0, out.Ret1, err } -func (c *marketplaceClient) ListCollectiblesWithLowestListing(ctx context.Context, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error) { +func (c *marketplaceClient) ListCollectiblesWithLowestListing(ctx context.Context, chainId string, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 *CollectiblesFilter `json:"filter"` - Arg2 *Page `json:"page"` - }{contractAddress, filter, page} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 *CollectiblesFilter `json:"filter"` + Arg3 *Page `json:"page"` + }{chainId, contractAddress, filter, page} + out := struct { Ret0 []*CollectibleOrder `json:"collectibles"` Ret1 *Page `json:"page"` @@ -2909,12 +3000,14 @@ func (c *marketplaceClient) ListCollectiblesWithLowestListing(ctx context.Contex return out.Ret0, out.Ret1, err } -func (c *marketplaceClient) ListCollectiblesWithHighestOffer(ctx context.Context, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error) { +func (c *marketplaceClient) ListCollectiblesWithHighestOffer(ctx context.Context, chainId string, contractAddress string, filter *CollectiblesFilter, page *Page) ([]*CollectibleOrder, *Page, error) { in := struct { - Arg0 string `json:"contractAddress"` - Arg1 *CollectiblesFilter `json:"filter"` - Arg2 *Page `json:"page"` - }{contractAddress, filter, page} + Arg0 string `json:"chainId"` + Arg1 string `json:"contractAddress"` + Arg2 *CollectiblesFilter `json:"filter"` + Arg3 *Page `json:"page"` + }{chainId, contractAddress, filter, page} + out := struct { Ret0 []*CollectibleOrder `json:"collectibles"` Ret1 *Page `json:"page"` @@ -2931,10 +3024,11 @@ func (c *marketplaceClient) ListCollectiblesWithHighestOffer(ctx context.Context return out.Ret0, out.Ret1, err } -func (c *marketplaceClient) SyncOrder(ctx context.Context, order *Order) error { +func (c *marketplaceClient) SyncOrder(ctx context.Context, chainId string, order *Order) error { in := struct { - Arg0 *Order `json:"order"` - }{order} + Arg0 string `json:"chainId"` + Arg1 *Order `json:"order"` + }{chainId, order} resp, err := doHTTPRequest(ctx, c.client, c.urls[31], in, nil) if resp != nil { @@ -2947,10 +3041,11 @@ func (c *marketplaceClient) SyncOrder(ctx context.Context, order *Order) error { return err } -func (c *marketplaceClient) SyncOrders(ctx context.Context, orders []*Order) error { +func (c *marketplaceClient) SyncOrders(ctx context.Context, chainId string, orders []*Order) error { in := struct { - Arg0 []*Order `json:"orders"` - }{orders} + Arg0 string `json:"chainId"` + Arg1 []*Order `json:"orders"` + }{chainId, orders} resp, err := doHTTPRequest(ctx, c.client, c.urls[32], in, nil) if resp != nil { @@ -2963,11 +3058,13 @@ func (c *marketplaceClient) SyncOrders(ctx context.Context, orders []*Order) err return err } -func (c *marketplaceClient) GetOrders(ctx context.Context, input []*GetOrdersInput, page *Page) ([]*Order, *Page, error) { +func (c *marketplaceClient) GetOrders(ctx context.Context, chainId string, input []*GetOrdersInput, page *Page) ([]*Order, *Page, error) { in := struct { - Arg0 []*GetOrdersInput `json:"input"` - Arg1 *Page `json:"page"` - }{input, page} + Arg0 string `json:"chainId"` + Arg1 []*GetOrdersInput `json:"input"` + Arg2 *Page `json:"page"` + }{chainId, input, page} + out := struct { Ret0 []*Order `json:"orders"` Ret1 *Page `json:"page"` @@ -2984,12 +3081,14 @@ func (c *marketplaceClient) GetOrders(ctx context.Context, input []*GetOrdersInp return out.Ret0, out.Ret1, err } -func (c *marketplaceClient) CheckoutOptionsMarketplace(ctx context.Context, wallet string, orders []*CheckoutOptionsMarketplaceOrder, additionalFee int) (*CheckoutOptions, error) { +func (c *marketplaceClient) CheckoutOptionsMarketplace(ctx context.Context, chainId string, wallet string, orders []*CheckoutOptionsMarketplaceOrder, additionalFee int) (*CheckoutOptions, error) { in := struct { - Arg0 string `json:"wallet"` - Arg1 []*CheckoutOptionsMarketplaceOrder `json:"orders"` - Arg2 int `json:"additionalFee"` - }{wallet, orders, additionalFee} + Arg0 string `json:"chainId"` + Arg1 string `json:"wallet"` + Arg2 []*CheckoutOptionsMarketplaceOrder `json:"orders"` + Arg3 int `json:"additionalFee"` + }{chainId, wallet, orders, additionalFee} + out := struct { Ret0 *CheckoutOptions `json:"options"` }{} @@ -3005,13 +3104,15 @@ func (c *marketplaceClient) CheckoutOptionsMarketplace(ctx context.Context, wall return out.Ret0, err } -func (c *marketplaceClient) CheckoutOptionsSalesContract(ctx context.Context, wallet string, contractAddress string, collectionAddress string, items []*CheckoutOptionsItem) (*CheckoutOptions, error) { +func (c *marketplaceClient) CheckoutOptionsSalesContract(ctx context.Context, chainId string, wallet string, contractAddress string, collectionAddress string, items []*CheckoutOptionsItem) (*CheckoutOptions, error) { in := struct { - Arg0 string `json:"wallet"` - Arg1 string `json:"contractAddress"` - Arg2 string `json:"collectionAddress"` - Arg3 []*CheckoutOptionsItem `json:"items"` - }{wallet, contractAddress, collectionAddress, items} + Arg0 string `json:"chainId"` + Arg1 string `json:"wallet"` + Arg2 string `json:"contractAddress"` + Arg3 string `json:"collectionAddress"` + Arg4 []*CheckoutOptionsItem `json:"items"` + }{chainId, wallet, contractAddress, collectionAddress, items} + out := struct { Ret0 *CheckoutOptions `json:"options"` }{} @@ -3027,6 +3128,26 @@ func (c *marketplaceClient) CheckoutOptionsSalesContract(ctx context.Context, wa return out.Ret0, err } +func (c *marketplaceClient) SupportedMarketplaces(ctx context.Context, chainId string) ([]MarketplaceKind, error) { + in := struct { + Arg0 string `json:"chainId"` + }{chainId} + + out := struct { + Ret0 []MarketplaceKind `json:"marketplaces"` + }{} + + resp, err := doHTTPRequest(ctx, c.client, c.urls[36], in, &out) + if resp != nil { + cerr := resp.Body.Close() + if err == nil && cerr != nil { + err = ErrWebrpcRequestFailed.WithCausef("failed to close response body: %w", cerr) + } + } + + return out.Ret0, err +} + // 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. @@ -3150,9 +3271,26 @@ func HTTPRequestHeaders(ctx context.Context) (http.Header, bool) { // type method struct { - Name string - Service string - Annotations map[string]string + name string + service string + annotations map[string]string +} + +func (m method) Name() string { + return m.name +} + +func (m method) Service() string { + return m.service +} + +func (m method) Annotations() map[string]string { + res := make(map[string]string, len(m.annotations)) + for k, v := range m.annotations { + res[k] = v + } + + return res } type contextKey struct {