From 6a9831c0ae6966e93ca6078030a6eec991a19b4d Mon Sep 17 00:00:00 2001 From: david-littlefarmer <17728576+david-littlefarmer@users.noreply.github.com> Date: Mon, 18 Aug 2025 12:12:29 +0000 Subject: [PATCH] [AUTOMATED] Update: proto/clients/marketplace.gen.go --- marketplace/marketplace.gen.go | 151 ++++++++++++++++++++++++++------- 1 file changed, 120 insertions(+), 31 deletions(-) diff --git a/marketplace/marketplace.gen.go b/marketplace/marketplace.gen.go index 39f1b7bb..7499bd9b 100644 --- a/marketplace/marketplace.gen.go +++ b/marketplace/marketplace.gen.go @@ -1,4 +1,4 @@ -// marketplace-api 6b46374337129883386b9668e652237c3b31eda1 +// marketplace-api c61a788fa5ec759cb8fa989e113468e18e47f632 // -- // Code generated by webrpc-gen@v0.25.4 with golang generator. DO NOT EDIT. // @@ -22,7 +22,7 @@ import ( const WebrpcHeader = "Webrpc" -const WebrpcHeaderValue = "webrpc@v0.25.4;gen-golang@v0.19.0;marketplace-api@v0.0.0-6b46374337129883386b9668e652237c3b31eda1" +const WebrpcHeaderValue = "webrpc@v0.25.4;gen-golang@v0.19.0;marketplace-api@v0.0.0-c61a788fa5ec759cb8fa989e113468e18e47f632" // 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 "6b46374337129883386b9668e652237c3b31eda1" + return "c61a788fa5ec759cb8fa989e113468e18e47f632" } type WebrpcGenVersions struct { @@ -94,69 +94,113 @@ func parseWebrpcGenVersions(header string) (*WebrpcGenVersions, error) { // Common types // +type MetadataStatus uint32 + +const ( + MetadataStatus_NOT_AVAILABLE MetadataStatus = 0 + MetadataStatus_REFRESHING MetadataStatus = 1 + MetadataStatus_AVAILABLE MetadataStatus = 2 +) + +var MetadataStatus_name = map[uint32]string{ + 0: "NOT_AVAILABLE", + 1: "REFRESHING", + 2: "AVAILABLE", +} + +var MetadataStatus_value = map[string]uint32{ + "NOT_AVAILABLE": 0, + "REFRESHING": 1, + "AVAILABLE": 2, +} + +func (x MetadataStatus) String() string { + return MetadataStatus_name[uint32(x)] +} + +func (x MetadataStatus) MarshalText() ([]byte, error) { + return []byte(MetadataStatus_name[uint32(x)]), nil +} + +func (x *MetadataStatus) UnmarshalText(b []byte) error { + *x = MetadataStatus(MetadataStatus_value[string(b)]) + return nil +} + +func (x *MetadataStatus) Is(values ...MetadataStatus) bool { + if x == nil { + return false + } + for _, v := range values { + if *x == v { + return true + } + } + return false +} + // 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 TokenMetadata struct { - TokenID string `json:"tokenId" cbor:"-"` - Name string `json:"name" cbor:"-"` - Description string `json:"description" cbor:"-"` + TokenID string `json:"tokenId"` + Name string `json:"name"` + Description string `json:"description"` // url - Image string `json:"image" cbor:"-"` + Image string `json:"image"` // non-standard fields we've added for Sequence. Others should adopt // these too and we should prompt, similar to how `image` field works. // url - Video string `json:"video,omitempty" cbor:"-"` + Video string `json:"video,omitempty"` // url - Audio string `json:"audio,omitempty" cbor:"-"` - Properties map[string]interface{} `json:"properties" cbor:"-"` + Audio string `json:"audio,omitempty"` + Properties map[string]interface{} `json:"properties"` // OpenSea fields // see https://docs.opensea.io/docs/metadata-standards // // NOTE: its a bit unfortunate OpenSea didn't use camelCase, and // also introduces 'attributes' when 'properties' is actually the correct property name. // TODO: we could smooth this out / normalize it, but we can leave it for now. - Attributes []map[string]interface{} `json:"attributes" 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:"-"` + Attributes []map[string]interface{} `json:"attributes"` + ImageData string `json:"image_data,omitempty"` + ExternalUrl string `json:"external_url,omitempty"` + BackgroundColor string `json:"background_color,omitempty"` + AnimationUrl string `json:"animation_url,omitempty"` // // Misc // // decimals is deprecated, but still used by some - Decimals *uint64 `json:"decimals,omitempty" cbor:"-"` - UpdatedAt time.Time `json:"updatedAt" cbor:"-"` + Decimals *uint64 `json:"decimals,omitempty"` + UpdatedAt time.Time `json:"updatedAt"` // Assets associated to this token metadata - Assets []*Asset `json:"assets,omitempty" cbor:"-"` + Assets []*Asset `json:"assets,omitempty"` + Status MetadataStatus `json:"status"` } // Asset is a database type used by 'collections' to record static assets for // a particular 'token' for the token metadata. -// -// db table: assets type Asset struct { // asset id - ID uint64 `json:"id" db:"id,omitempty"` + ID uint64 `json:"id"` // collection id associated to this asset - CollectionID uint64 `json:"collectionId" db:"collection_id"` + CollectionID uint64 `json:"collectionId"` // token id associated to this collection - TokenID prototyp.BigInt `json:"tokenId" db:"token_id"` + TokenID prototyp.BigInt `json:"tokenId"` // url where we can view the asset contents // ie. https://metadata.sequence.app/projects/1/collections/1/tokens/1/image - URL string `json:"url" db:"-"` + URL string `json:"url"` // metadata field related to TokenMetadata, some field names: // ['image', 'video', 'audio', 'animation_url', ...] - MetadataField string `json:"metadataField,omitempty" db:"metadata_field"` + MetadataField string `json:"metadataField,omitempty"` // 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"` + Filename string `json:"filename,omitempty"` + Filesize uint32 `json:"filesize,omitempty"` + MimeType string `json:"mimeType,omitempty"` + Width *uint16 `json:"width,omitempty"` + Height *uint16 `json:"height,omitempty"` + UpdatedAt time.Time `json:"updatedAt"` } type SortOrder uint32 @@ -1382,6 +1426,48 @@ func (x *PrimarySaleContractStatus) Is(values ...PrimarySaleContractStatus) bool return false } +type PrimarySaleVersion uint8 + +const ( + PrimarySaleVersion_v0 PrimarySaleVersion = 0 + PrimarySaleVersion_v1 PrimarySaleVersion = 1 +) + +var PrimarySaleVersion_name = map[uint8]string{ + 0: "v0", + 1: "v1", +} + +var PrimarySaleVersion_value = map[string]uint8{ + "v0": 0, + "v1": 1, +} + +func (x PrimarySaleVersion) String() string { + return PrimarySaleVersion_name[uint8(x)] +} + +func (x PrimarySaleVersion) MarshalText() ([]byte, error) { + return []byte(PrimarySaleVersion_name[uint8(x)]), nil +} + +func (x *PrimarySaleVersion) UnmarshalText(b []byte) error { + *x = PrimarySaleVersion(PrimarySaleVersion_value[string(b)]) + return nil +} + +func (x *PrimarySaleVersion) Is(values ...PrimarySaleVersion) bool { + if x == nil { + return false + } + for _, v := range values { + if *x == v { + return true + } + } + return false +} + type PrimarySaleItemDetailType uint8 const ( @@ -1745,6 +1831,7 @@ type PrimarySaleContract struct { ContractAddress prototyp.Hash `json:"contractAddress" db:"contract_address"` CollectionAddress prototyp.Hash `json:"collectionAddress" db:"collection_address"` ContractType ContractType `json:"contractType" db:"contract_type"` + Version PrimarySaleVersion `json:"version" db:"version"` CurrencyAddress prototyp.Hash `json:"currencyAddress" db:"currency_address"` PriceDecimals uint64 `json:"priceDecimals" db:"price_decimals"` ItemsContractID uint64 `json:"-" db:"items_contract_id"` @@ -1770,6 +1857,8 @@ type PrimarySaleItem struct { PriceAmount prototyp.BigInt `json:"priceAmount" db:"price_amount"` PriceAmountFormatted string `json:"priceAmountFormatted"` Supply prototyp.BigInt `json:"supply" db:"supply"` + SupplyCap prototyp.BigInt `json:"supplyCap" db:"supply_cap"` + UnlimitedSupply bool `json:"unlimitedSupply" db:"unlimited_supply"` CreatedAt time.Time `json:"createdAt" db:"created_at"` UpdatedAt time.Time `json:"updatedAt" db:"updated_at"` DeletedAt *time.Time `json:"deletedAt,omitempty" db:"deleted_at"`