diff --git a/docs/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/02-metadata-example.md b/docs/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/02-metadata-example.md index 7f334f0..ac39757 100644 --- a/docs/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/02-metadata-example.md +++ b/docs/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/02-metadata-example.md @@ -3,6 +3,10 @@ title: "Metadata Example" slug: "metadata-example" description: "View detailed examples of how to implement metadata within your blockchain tokens, following Enjin’s guidelines for token structure and data representation." --- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + In this page we will create JSON formatted metadata for a collection and a token, following the [Metadata Standard](/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/02-metadata-standard.md). You may set the collection/token `uri` on-chain attribute to a resource containing the collection's/token's metadata in JSON format, or set each individual metadata with an on-chain attribute, using the metadata type as the attribute key. @@ -99,6 +103,60 @@ Ensure you use the correct casing when defining attributes to avoid errors. - `keywords`: A list of keywords relevant to this token. Used to help find this token in search queries. - In the NFT.io Marketplace, keywords also act as tags. +## Hiding a Token or Collection + +Sometimes it becomes necessary to hide a token or collection from public view — for example, when preparing a token that should only go live at a later date. A hidden token or collection is left out of public lists, search results, and profile pages. + +To do this, set the `hidden` attribute to `"true"` on-chain. + + + +```graphql +mutation HideToken { + CreateTransaction( + transaction: { + setTokenAttribute: { + collectionId: 36105 + tokenId: 115 + key: "hidden" + value: "true" + } + } + ) { + uuid + action + state + } +} +``` + + +```graphql +mutation HideCollection { + CreateTransaction( + transaction: { + setCollectionAttribute: { + collectionId: 36105 + key: "hidden" + value: "true" + } + } + ) { + uuid + action + state + } +} +``` + + + +Each client that consumes the token or collection is responsible for respecting this attribute. Some clients may not honour the request to hide the token or collection. + +:::note +This attribute must be set on-chain. It will not function if set as part of off-chain metadata. +::: + :::info Need more information? For a comprehensive document on the metadata structure, please head over to the [Universal Off-Chain Token Metadata Standard](https://github.com/enjin/universal-metadata-standard/blob/uotm-standard-wip/README.md) page. :::