Documentation ¶
Index ¶
- Variables
- type CollectionMetadata
- type MetadataAttributeTraitType
- type MetadataCreatorProperty
- type MetadataDefaultProperty
- type MetadataFileProperty
- type NFTCollectionResponse
- type NFTContractBaseMetadata
- type NFTOwnershipResponse
- type TokenMetadata
- type TokenMetadataAttribute
- type TokenMetadataCollectionRef
- type TokenMetadataProperties
- type TokenMetadataProperty
Constants ¶
This section is empty.
Variables ¶
View Source
var (
TransferTopicId = common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef")
)
Functions ¶
This section is empty.
Types ¶
type CollectionMetadata ¶
type CollectionMetadata struct { Name string `json:"name"` Symbol string `json:"symbol"` SellerFeeBasisPoints int64 `json:"seller_fee_basis_points"` Description string `json:"description"` ExternalLink string `json:"external_link"` Url string `json:"url"` Image string `json:"image"` Background string `json:"background"` Creators []MetadataCreatorProperty `json:"creators"` IsMutable bool `json:"is_mutable"` PrimarySaleHappened bool `json:"primary_sale_happened"` }
CollectionMetadata represents ERC1155 token standard collection metadata
type MetadataAttributeTraitType ¶
type MetadataAttributeTraitType string
const ( NumberTrait MetadataAttributeTraitType = "number" // is default StringTrait MetadataAttributeTraitType = "string" BoostPercentageTrait MetadataAttributeTraitType = "boost_percentage" )
func (MetadataAttributeTraitType) String ¶
func (matt MetadataAttributeTraitType) String() string
type MetadataCreatorProperty ¶
type MetadataCreatorProperty struct { Address string `json:"address"` }
type MetadataDefaultProperty ¶
type MetadataFileProperty ¶
type NFTCollectionResponse ¶
type NFTCollectionResponse struct { NFTContractBaseMetadata *CollectionMetadata InterfaceID string `json:"interface_id"` }
func (NFTCollectionResponse) String ¶
func (c NFTCollectionResponse) String() string
type NFTContractBaseMetadata ¶
type NFTOwnershipResponse ¶
type TokenMetadata ¶
type TokenMetadata struct { Symbol string `json:"symbol"` Name string `json:"name"` Description string `json:"description"` Image string `json:"image"` ImageData string `json:"image_data"` Background string `json:"background_color"` ExternalUrl string `json:"external_url"` AnimationUrl string `json:"animation_url"` AudioUrl string `json:"audio_url"` VideoUrl string `json:"video_url"` YoutubeUrl string `json:"youtube_url"` Attributes []TokenMetadataAttribute `json:"attributes"` Properties []any `json:"properties"` Collection TokenMetadataCollectionRef `json:"collection"` }
TokenMetadata represents ERC1155/Metaplex token metadata standard with a bit of enhancements
func (TokenMetadata) Validate ¶
func (t TokenMetadata) Validate() error
type TokenMetadataAttribute ¶
type TokenMetadataAttribute struct { Value string `json:"value"` MaxValue string `json:"max_value"` DisplayValue string `json:"display_value"` TraitType MetadataAttributeTraitType `json:"trait_type"` DisplayType string `json:"display_type"` }
TokenMetadataAttribute represents NFT Metadata rich attribute
type TokenMetadataCollectionRef ¶
TokenMetadataCollectionRef represents collection metadata reference
type TokenMetadataProperties ¶
type TokenMetadataProperties[T TokenMetadataProperty] []any
type TokenMetadataProperty ¶
type TokenMetadataProperty interface { MetadataDefaultProperty | MetadataCreatorProperty | MetadataFileProperty }
TokenMetadataProperty defines generic type for metadata properties
Click to show internal directories.
Click to hide internal directories.