From 4e0975796ced50c9017527779a065f023ca4bb23 Mon Sep 17 00:00:00 2001 From: Etay Matzliah Date: Sun, 5 Jul 2026 09:09:17 +0300 Subject: [PATCH 1/4] Document how to hide a token or collection Add a "Hiding a Token or Collection" section explaining the on-chain "hidden" attribute, with GraphQL examples for both setTokenAttribute and setCollectionAttribute, a note that clients are responsible for honouring it, and that it only functions when set on-chain (not via off-chain metadata). Co-Authored-By: Claude Opus 4.8 (1M context) --- .../02-metadata-example.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) 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. ::: From 91e79753563215719efffccfb3fda8c1ad72213b Mon Sep 17 00:00:00 2001 From: Etay Matzliah Date: Mon, 6 Jul 2026 11:42:19 +0300 Subject: [PATCH 2/4] Update docs/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/02-metadata-example.md Co-authored-by: Brad Bayliss --- .../02-metadata-standard/02-metadata-example.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ac39757..5064745 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 @@ -112,12 +112,12 @@ To do this, set the `hidden` attribute to `"true"` on-chain. ```graphql -mutation HideToken { +mutation HideToken($collectionId: BigInt!, $tokenId: BigInt!) { CreateTransaction( transaction: { setTokenAttribute: { - collectionId: 36105 - tokenId: 115 + collectionId: $collectionId + tokenId: $tokenId key: "hidden" value: "true" } From 78b340e3122578991f45a2a0e3d2d45bcca4a355 Mon Sep 17 00:00:00 2001 From: Etay Matzliah Date: Mon, 6 Jul 2026 11:43:33 +0300 Subject: [PATCH 3/4] Update docs/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/02-metadata-example.md Co-authored-by: Brad Bayliss --- .../02-metadata-standard/02-metadata-example.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 5064745..a8692ee 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 @@ -132,11 +132,11 @@ mutation HideToken($collectionId: BigInt!, $tokenId: BigInt!) { ```graphql -mutation HideCollection { +mutation HideCollection($id: BigInt!) { CreateTransaction( transaction: { setCollectionAttribute: { - collectionId: 36105 + collectionId: $id key: "hidden" value: "true" } From f63a142b4a4f27e082e56affc2d29be781ff15c5 Mon Sep 17 00:00:00 2001 From: Etay Matzliah Date: Mon, 6 Jul 2026 11:48:57 +0300 Subject: [PATCH 4/4] Add "Unhiding a Token or Collection" section Document how to revert hiding by removing the on-chain "hidden" attribute, with removeTokenAttribute / removeCollectionAttribute examples matching the variable style used in the hiding section. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../02-metadata-example.md | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) 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 a8692ee..1961300 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 @@ -157,6 +157,50 @@ Each client that consumes the token or collection is responsible for respecting This attribute must be set on-chain. It will not function if set as part of off-chain metadata. ::: +## Unhiding a Token or Collection + +To make a hidden token or collection public again, simply remove the `hidden` attribute. (You could instead set its value back to `"false"`, but deleting the attribute is the cleanest approach.) + + + +```graphql +mutation UnhideToken($collectionId: BigInt!, $tokenId: BigInt!) { + CreateTransaction( + transaction: { + removeTokenAttribute: { + collectionId: $collectionId + tokenId: $tokenId + key: "hidden" + } + } + ) { + uuid + action + state + } +} +``` + + +```graphql +mutation UnhideCollection($id: BigInt!) { + CreateTransaction( + transaction: { + removeCollectionAttribute: { + id: $id + key: "hidden" + } + } + ) { + uuid + action + state + } +} +``` + + + :::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. :::