From bcac5b5334427d046a6fba2633306be44fe54b70 Mon Sep 17 00:00:00 2001 From: Brad Bayliss Date: Fri, 15 Aug 2025 08:48:06 +0100 Subject: [PATCH] [ENJ-234] Update Relaychain and Indexer Docs Also, fixes code style. --- docs/01-getting-started/01-introduction.md | 16 +- .../02-quick-start-guide.md | 12 +- .../04-using-the-enjin-platform.md | 36 +-- .../01-how-to-use-graphql.md | 52 ++--- .../05-using-enjin-api/05-using-enjin-api.md | 6 +- .../06-using-wallet-daemon.md | 44 ++-- .../01-creating-collections.md | 10 +- .../010-transfer-accept-collection.md | 2 +- .../02-creating-a-currency-token.md | 18 +- .../02-creating-tokens/02-creating-tokens.md | 8 +- .../01-managing-tokens/03-adding-metadata.md | 22 +- .../01-managing-tokens/04-minting-a-token.md | 12 +- .../05-transferring-tokens.md | 18 +- .../01-managing-tokens/06-create-qr-drops.md | 28 +-- .../01-managing-tokens/07-freezing-thawing.md | 38 +-- .../08-burning-destroying-tokens.md | 16 +- .../09-fetching-token-holders.md | 8 +- .../01-using-wallet-connect.md | 44 ++-- .../02-verifying-wallets.md | 2 +- .../02-reading-user-wallets.md | 6 +- .../03-using-managed-wallets.md | 6 +- .../02-managing-users/04-using-fuel-tanks.md | 26 +-- .../01-tokenid-structure.md | 46 ++-- .../02-metadata-example.md | 6 +- .../02-metadata-standard.md | 18 +- .../03-enforced-rarity.md | 4 +- .../04-brand-collab-nfts.md | 12 +- .../03-advanced-mechanics/05-enj-infusion.md | 10 +- .../06-the-multiverse.md | 6 +- .../01-getting-started.md | 4 +- .../03-platform-events.md | 2 +- .../01-platform/06-enjin-discord-bot.md | 12 +- .../03-creating-nomination-pools.md | 2 +- .../01-enjin-blockchain-nodes.md | 8 +- .../02-run-relaychain-node.md | 26 +-- .../03-run-matrixchain-node.md | 46 ++-- .../01-running-a-validator.md | 47 ++-- .../02-blockchain/03-running-enjin-indexer.md | 220 ++++++++++++++++++ .../03-running-enjin-matrixchain-indexer.md | 172 -------------- .../01-queries/01-transactions-queries.md | 10 +- .../01-queries/03-tokens-queries.md | 2 +- .../01-queries/04-wallets-queries.md | 2 +- .../01-queries/07-beam-queries.md | 8 +- .../02-mutations/01-transaction-mutations.md | 2 +- .../02-mutations/02-collections-mutations.md | 6 +- .../02-mutations/03-tokens-mutations.md | 8 +- .../02-mutations/04-wallets-mutations.md | 2 +- .../02-mutations/06-marketplace-mutations.md | 6 +- .../02-mutations/07-beam-mutations.md | 4 +- docs/03-api-reference/03-websocket-events.md | 4 +- .../04-important-arguments.md | 72 +++--- .../01-validator-staking.md | 2 +- .../02-enjin-relaychain.md | 2 +- .../02-stake-exchange-pallet.md | 14 +- .../01-multitoken-pallet.md | 50 ++-- .../02-fuel-tank-pallet.md | 34 +-- .../03-enjin-matrixchain.md | 2 +- .../03-marketplace-pallet.md | 6 +- .../04-enjin-blockchain.md | 2 +- docs/05-enjin-platform/02-chain-state.md | 14 +- .../03-working-with-events.md | 6 +- .../02-local-installation.md | 22 +- .../04-enterprise-on-prem.md | 18 +- .../05-extending-the-platform.md | 2 +- .../_Telemetry_02-local-installation.md | 22 +- docs/05-enjin-platform/05-enjin-platform.md | 4 +- docs/06-enjin-products/01-enjin-tech-stack.md | 2 +- docs/06-enjin-products/03-enjin-wallet.md | 2 +- .../06-enjin-products/04-nftio-marketplace.md | 2 +- docs/06-enjin-products/05-beam.md | 4 +- docusaurus.config.js | 2 +- src/css/custom.css | 4 +- src/glossary.js | 4 +- .../building-from-source.md | 4 +- 74 files changed, 734 insertions(+), 687 deletions(-) create mode 100644 docs/02-guides/02-blockchain/03-running-enjin-indexer.md delete mode 100644 docs/02-guides/02-blockchain/03-running-enjin-matrixchain-indexer.md diff --git a/docs/01-getting-started/01-introduction.md b/docs/01-getting-started/01-introduction.md index 993d426..0c21548 100644 --- a/docs/01-getting-started/01-introduction.md +++ b/docs/01-getting-started/01-introduction.md @@ -21,18 +21,18 @@ Enjin is more than just a ; it's a suite of inte -- **Enjin Blockchain:** The core of the ecosystem, is a **, dual-layer chain** built for **scalability, security, and ease of use** in game and app development. As a purpose-built for these applications, its protocol-level functionalities optimize creation, management, and transactions, ensuring efficiency and reliability. +- **Enjin Blockchain:** The core of the ecosystem, is a **, dual-layer chain** built for **scalability, security, and ease of use** in game and app development. As a purpose-built for these applications, its protocol-level functionalities optimize creation, management, and transactions, ensuring efficiency and reliability. *[Learn more about Enjin Blockchain Architecture](/04-enjin-blockchain/04-enjin-blockchain.md)* -- **The :** This platform is your primary gateway to the . Its robust API allows you to manage digital assets, interact with users, and implement features without requiring deep expertise. +- **The :** This platform is your primary gateway to the . Its robust API allows you to manage digital assets, interact with users, and implement features without requiring deep expertise. *[Explore the API Reference](/03-api-reference/03-api-reference.md)* -- **Software Development Kits (SDKs) & Code Snippets:** To accelerate your development, Enjin offers official **[s](/02-guides/01-platform/04-software-development-kit/04-software-development-kit.md) (primarily in C# and C++)**. You'll also find **code snippets for common actions in , cURL, JavaScript, Node.js, and Python**. These resources include comprehensive documentation and examples to streamline integration. +- **Software Development Kits (SDKs) & Code Snippets:** To accelerate your development, Enjin offers official **[s](/02-guides/01-platform/04-software-development-kit/04-software-development-kit.md) (primarily in C# and C++)**. You'll also find **code snippets for common actions in , cURL, JavaScript, Node.js, and Python**. These resources include comprehensive documentation and examples to streamline integration. *[Check out the SDKs page](/02-guides/01-platform/04-software-development-kit/04-software-development-kit.md)* - **Key Enjin Products:** - - **:** A secure, user-friendly mobile wallet for storing, managing, and trading s and other digital assets from the Enjin ecosystem and beyond. + - **:** A secure, user-friendly mobile wallet for storing, managing, and trading s and other digital assets from the Enjin ecosystem and beyond. *[Learn more about the Enjin Wallet](/06-enjin-products/03-enjin-wallet.md)* - - **:** The official marketplace for the Enjin ecosystem, where users can discover, buy, sell, and trade s, fostering a vibrant economy for your digital assets. + - **:** The official marketplace for the Enjin ecosystem, where users can discover, buy, sell, and trade s, fostering a vibrant economy for your digital assets. *[Visit NFT.io](https://nft.io)* - - **:** A powerful marketing tool for distributing s in bulk via QR codes, links, or other methods—ideal for airdrops, rewards, and promotional campaigns. + - **:** A powerful marketing tool for distributing s in bulk via QR codes, links, or other methods—ideal for airdrops, rewards, and promotional campaigns. *[Discover Enjin Beam](/06-enjin-products/05-beam.md)* ## What You Can Achieve with Enjin @@ -44,13 +44,13 @@ Enjin empowers you to build innovative experiences by leveraging its unique feat 2. **Seamlessly Integrate NFTs into Games and Apps:** Use the API and s to effortlessly embed rich functionalities. tokens on-demand, program asset transfers, implement freezing mechanics, retrieve holder information, and execute a wide array of interactions with ease. 3. **Simplify User Onboarding with Managed Wallets:** - Lower the entry barrier for users new to cryptocurrency by managing their wallets via the . Users can enjoy seamless interactions and later choose to export their assets to their self-custody , significantly streamlining the Web2-to-Web3 transition. + Lower the entry barrier for users new to cryptocurrency by managing their wallets via the . Users can enjoy seamless interactions and later choose to export their assets to their self-custody , significantly streamlining the Web2-to-Web3 transition. *[Read about Managed Wallets](/02-guides/01-platform/02-managing-users/03-using-managed-wallets.md)*
4. **Enhance User Experience with Fuel Tanks:** - Improve the experience for users, especially those new to Web3, by subsidizing using s. Create and fund on-chain pools with dynamic eligibility rules to abstract away fee complexities, making interactions smoother. + Improve the experience for users, especially those new to Web3, by subsidizing using s. Create and fund on-chain pools with dynamic eligibility rules to abstract away fee complexities, making interactions smoother. *[Read about Fuel Tanks](/04-enjin-blockchain/03-enjin-matrixchain/02-fuel-tank-pallet.md)* ## Enjin Ecosystem Slack diff --git a/docs/01-getting-started/02-quick-start-guide.md b/docs/01-getting-started/02-quick-start-guide.md index 0af49cd..e011546 100644 --- a/docs/01-getting-started/02-quick-start-guide.md +++ b/docs/01-getting-started/02-quick-start-guide.md @@ -58,7 +58,7 @@ For applications requiring automated actions (like minting rewards in real-time Let's define the core building blocks for your digital items on the : - **Collection:** Think of a as a container or category for your digital items. It helps organize items related to your specific game, application, or a particular series. All items within a collection share certain base properties defined when you create the collection. -- **Token (`multiToken`):** A **Token** represents the actual digital item that users can own within a Collection. On the Enjin Blockchain, all tokens fundamentally exist as **s**. This is a core feature built directly into the blockchain protocol itself. +- **Token (`multiToken`):** A **Token** represents the actual digital item that users can own within a Collection. On the Enjin Blockchain, all tokens fundamentally exist as **s**. This is a core feature built directly into the blockchain protocol itself. :::tip Structuring Your Project A common approach is to create: @@ -83,7 +83,7 @@ You can interact with the Enjin Platform and initiate blockchain requests in sev 1. **Create Collection:** - In the Platform menu, navigate to the **[Collections page](https://platform.canary.enjin.io/collections)**. Then, click on the "**[Create Collection](https://platform.canary.enjin.io/create/collection)**" button. ![Creating a collection](/img/guides/managing-tokens/create-collection.gif) - - Customize your collection - you can specify the collection's name, description, media, attributes, Mint and Market policies, and more. + - Customize your collection - you can specify the collection's name, description, media, attributes, Mint and Market policies, and more. To learn more about collection configuration, please check the [Create Collections guide](/02-guides/01-platform/01-managing-tokens/01-creating-collections.md). - Submit the creation request by clicking on the **Create** button. This will create a signature request which you can view in the [Transactions page](https://platform.canary.enjin.io/transactions), and will require a transaction to be signed. ![](/img/guides/managing-tokens/pending-create-collection-txn.png) @@ -91,7 +91,7 @@ You can interact with the Enjin Platform and initiate blockchain requests in sev - Once the transaction is confirmed on-chain, the new collection will appear in your [Collections page](https://platform.canary.enjin.io/collections), where you can also find its ID, keep note of it for the next step. 2. **Create Token:** - In the Platform menu, navigate to the **[Tokens page](https://platform.canary.enjin.io/tokens)**. Then, click on the "**[Create Token](https://platform.canary.enjin.io/create/token)**" button. - - Customize your token - you can specify the token's name, description, media, attributes, and more. + - Customize your token - you can specify the token's name, description, media, attributes, and more. To learn more about token configuration, please check the [Create Tokens guide](/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md). - In the **"Collection ID"** input field, insert the collection id of the collection you just created. You may also click the input field and select the id from the dropdown menu. - In the **"Recipient"** input field, insert the of the wallet that you wish to receive the token's initial supply. You can find the address of your connected wallet in the [settings page](https://platform.canary.enjin.io/settings) by clicking on the Settings icon in the top right corner, followed by the "Settings" button. @@ -127,11 +127,11 @@ Once this association (or "link") is established, you can: ### Implementation (GraphQL Example): -To request a wallet verification code, we need to interact with the **** -The Enjin Platform API is a API. If you are unfamiliar with GraphQL, we recommend checking out the [How to Use GraphQL](/01-getting-started/05-using-enjin-api/01-how-to-use-graphql.md) guide. +To request a wallet verification code, we need to interact with the **** +The Enjin Platform API is a API. If you are unfamiliar with GraphQL, we recommend checking out the [How to Use GraphQL](/01-getting-started/05-using-enjin-api/01-how-to-use-graphql.md) guide. :::info Quick Start: Sending API Requests with the -In this example, we will be using the to easily send an API request from within the browser. +In this example, we will be using the to easily send an API request from within the browser. In a production-ready integration, your app will typically send API calls using HTTP requests or one of the [official Enjin SDKs](/02-guides/01-platform/04-software-development-kit/04-software-development-kit.md). You can learn more about this in the [Using the Enjin API](/01-getting-started/05-using-enjin-api/05-using-enjin-api.md) page. ::: diff --git a/docs/01-getting-started/04-using-the-enjin-platform.md b/docs/01-getting-started/04-using-the-enjin-platform.md index 87f7e62..a4fae39 100644 --- a/docs/01-getting-started/04-using-the-enjin-platform.md +++ b/docs/01-getting-started/04-using-the-enjin-platform.md @@ -9,7 +9,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::info What you'll need: -Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) to pay for and for s. +Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) to pay for and for s. You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://faucet.canary.enjin.io/). ::: @@ -48,13 +48,13 @@ Transactions can be approved in 2 different ways: - **Automatically:** Using the [Enjin Wallet Daemon](/01-getting-started/06-using-wallet-daemon.md). :::tip Start by manually approving transactions -If you're using the Enjin Platform for the first time, we recommend [Using Enjin Wallet / Polkadot.js](#a-using-enjin-wallet--polkadotjs) +If you're using the Enjin Platform for the first time, we recommend [Using Enjin Wallet / Polkadot.js](#a-using-enjin-wallet--polkadotjs) Enjin wallet app is available on both [iOS](https://enj.in/ios-wallet) and [Android](https://enj.in/android-wallet). ::: ### A. Using Enjin Wallet / Polkadot.js -Connect your wallet by clicking the "**Connect Wallet**" button in the top right corner and follow the on-screen instructions. +Connect your wallet by clicking the "**Connect Wallet**" button in the top right corner and follow the on-screen instructions. The also offers gamers a user-friendly, secure, and rewarding experience, ensuring their continuous engagement with your game. ![Connecting a wallet app on the Enjin Platform](/img/getting-started/connect-wallet-app.gif) @@ -63,15 +63,15 @@ The also offers gamers a user-friendly, s The Enjin Wallet Daemon can automatically sign requests for you. -To download and set up wallet daemon, head over to the [Wallet Daemon Setup](/01-getting-started/06-using-wallet-daemon.md) page. -To ensure that only authorized requests are approved, the Wallet daemon needs to be configured with an Enjin Platform API Token. +To download and set up wallet daemon, head over to the [Wallet Daemon Setup](/01-getting-started/06-using-wallet-daemon.md) page. +To ensure that only authorized requests are approved, the Wallet daemon needs to be configured with an Enjin Platform API Token. Create an API Token on the [Account Settings](https://platform.canary.enjin.io/settings) page and set the Platform API Token in your Wallet Daemon configuration. Once your wallet daemon is connected, your Platform account is set up and ready to use! ## 4. Create Platform Requests -Now that the Platform account is set up, we can start creating platform requests. +Now that the Platform account is set up, we can start creating platform requests. In this example we will be creating a . **There are two ways to create Platform requests:** @@ -80,8 +80,8 @@ In this example we will be creating a . - [Using the GraphQL API](#option-b-using-the-enjin-api--sdks) :::info Which approach should I use? -Everything that can be done via the Platform's User Interface, can be done programmatically via the API or any of the Platform s. -If you are just starting out, we recommend using the Platform User Interface as it's more user friendly. +Everything that can be done via the Platform's User Interface, can be done programmatically via the API or any of the Platform s. +If you are just starting out, we recommend using the Platform User Interface as it's more user friendly. However, if you need to make a Platform request programmatically, you can do that via the / s. ::: @@ -99,8 +99,8 @@ Once you're satisfied with the options, click on the "**Create**" button at the ### Option B. Using the Enjin API & SDKs -To create a Platform request programmatically, use the API, or one of the s. -This mutation will set up a new transaction that once finalized on-chain will contain the new collection id in the transaction . +To create a Platform request programmatically, use the API, or one of the s. +This mutation will set up a new transaction that once finalized on-chain will contain the new collection id in the transaction . :::tip Test your requests in the GraphiQL Playground: - [Testnet](https://platform.canary.enjin.io/graphiql) @@ -218,7 +218,7 @@ int main() { std::cout << to_string(transaction->GetId().value()) << std::endl; std::cout << ToString(transaction->GetMethod().value()) << std::endl; } - + // Write any error messages to the console if (gqlResult.has_value() && gqlResult->HasErrors()) { @@ -328,7 +328,7 @@ Transaction requests are displayed in the "**[Transactions](https://platform.can Since this transaction is a , you will need to sign the transaction using your Wallet. - If a **Wallet Daemon is running and configured**, the transaction request will be **signed automatically**. -- If **a wallet is connected** such as the Enjin Wallet or Polkadot.js, the transaction must be **signed manually** by clicking the "**Sign**" button and **approving the signature request** in your wallet. +- If **a wallet is connected** such as the Enjin Wallet or Polkadot.js, the transaction must be **signed manually** by clicking the "**Sign**" button and **approving the signature request** in your wallet. ![Approving the create collection txn on Enjin Platform](/img/getting-started/approving-create-collection-txn.gif) @@ -344,15 +344,15 @@ There are 3 ways to receive the transaction status and information: ### Receive Transaction Information Using the Platform User Interface -To check the transaction status, head over to the [Transactions](https://platform.canary.enjin.io/transactions) page locate the transaction and click on the button to it's right to show more details. -Once the transactions approves on-chain, the transaction will get updated with the `FINALIZED` state and the transaction events will be displayed. +To check the transaction status, head over to the [Transactions](https://platform.canary.enjin.io/transactions) page locate the transaction and click on the button to it's right to show more details. +Once the transactions approves on-chain, the transaction will get updated with the `FINALIZED` state and the transaction events will be displayed. In the events, we can find useful information, such as the newly created collection ID. ![How to find your newly created collection ID](/img/getting-started/find-newly-created-collection-id.gif) ### Receive Transaction Information Using the Enjin API & SDKs -To receive the transaction information programmatically, You can use the `GetTransaction` query and set the `id` to the ID received in the `CreateCollection` mutation. +To receive the transaction information programmatically, You can use the `GetTransaction` query and set the `id` to the ID received in the `CreateCollection` mutation. But for this example, we're going to use the `GetPendingEvents` query, which returns all of the events emitted to your platform account. :::info This query might return items in multiple pages using Connections @@ -567,9 +567,9 @@ print(response.json()) } ``` -The first event with `PENDING` state was emitted when the `CreateCollection` platform request was created. -The second event with `BROADCAST` state was emitted when the transaction was signed and broadcasted to the Enjin Blockchain. -The third event was emitted when the collection was created on-chain, and has the `collectionId` in it's data. +The first event with `PENDING` state was emitted when the `CreateCollection` platform request was created. +The second event with `BROADCAST` state was emitted when the transaction was signed and broadcasted to the Enjin Blockchain. +The third event was emitted when the collection was created on-chain, and has the `collectionId` in it's data. The forth and final event with `FINALIZED` state was emitted when the platform request was finalized. :::info Note diff --git a/docs/01-getting-started/05-using-enjin-api/01-how-to-use-graphql.md b/docs/01-getting-started/05-using-enjin-api/01-how-to-use-graphql.md index 0db731f..39619d2 100644 --- a/docs/01-getting-started/05-using-enjin-api/01-how-to-use-graphql.md +++ b/docs/01-getting-started/05-using-enjin-api/01-how-to-use-graphql.md @@ -69,11 +69,11 @@ Here's how the same RESTful request would like like in GraphQL, sent as an HTTP ```graphql mutation CreateToken { CreateToken( - recipient: "cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f", - collectionId: 2406, + recipient: "cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f", + collectionId: 2406, params: { - tokenId: { integer: 0 }, - initialSupply: 1, + tokenId: { integer: 0 }, + initialSupply: 1, cap: { type: INFINITE } } ) { @@ -105,8 +105,8 @@ Choose between [Testnet](https://platform.canary.enjin.io/graphiql) or [Mainnet] Explore "[Core Operations](https://platform.canary.enjin.io/graphiql)" for core operations like managing tokens, wallets, users, and transactions. :::info GraphiQL Playground: -Please be aware that the provided links below are specifically for the GraphiQL Playground, which is a graphical user interface designed for exploring and interacting with the Enjin Platform GraphQL APIs directly from a web browser. -If you wish to execute GraphQL requests programmatically from your local environment or a cloud-based application, you will need to utilize the actual GraphQL endpoint URLs. These can be found [here](/01-getting-started/05-using-enjin-api/05-using-enjin-api.md#overview-of-graphql-endpoints) +Please be aware that the provided links below are specifically for the GraphiQL Playground, which is a graphical user interface designed for exploring and interacting with the Enjin Platform GraphQL APIs directly from a web browser. +If you wish to execute GraphQL requests programmatically from your local environment or a cloud-based application, you will need to utilize the actual GraphQL endpoint URLs. These can be found [here](/01-getting-started/05-using-enjin-api/05-using-enjin-api.md#overview-of-graphql-endpoints) #### Testnet: - [Core Operations](https://platform.canary.enjin.io/graphiql) - [Marketplace](https://platform.canary.enjin.io/graphiql/marketplace) @@ -139,7 +139,7 @@ Add a `query` or `mutation` into the "write" panel, and you'll see the list of a ### Step 4: Select which operations and datapoints you require -Click the required data points to automatically add them to the write column. +Click the required data points to automatically add them to the write column. This feature eliminates any guesswork when structuring your operations and helps you make the most of the Enjin Platform Schema. @@ -149,7 +149,7 @@ This feature eliminates any guesswork when structuring your operations and helps ### Step 5: Click the play button to execute your operation -To execute your operation and view the response, simply click the `Execute Query` button. +To execute your operation and view the response, simply click the `Execute Query` button. You can execute any on-chain operation here. You can even mint tokens and view wallet data on [Mainnet](https://platform.enjin.io/graphiql). @@ -165,7 +165,7 @@ To interface with it directly, you will need to understand how GraphQL operation ### Operation Name -The Operation Name such as `GetTokenInfo` is a user-defined identifier for a specific operation. +The Operation Name such as `GetTokenInfo` is a user-defined identifier for a specific operation. It allows you to organize and distinguish different operations within a single request, making it easier to handle responses and manage complex queries or mutations efficiently. @@ -197,11 +197,11 @@ query GetTokenInfo { #'GetTokenInfo' is the Operation Name that distinguishes th ### Fields -Fields serve as a means to precisely specify the data you want to retrieve in the response of an operation. +Fields serve as a means to precisely specify the data you want to retrieve in the response of an operation. Fields enable you to fine-tune the granularity of data retrieval, ensuring you receive precisely what you need. -When crafting Queries and Mutations, the Enjin Platform defines what fields are available for you to request. +When crafting Queries and Mutations, the Enjin Platform defines what fields are available for you to request. For instance, when using the `GetToken` query, you can request the `supply` field, which corresponds to a specific piece of information stored on the blockchain. @@ -233,9 +233,9 @@ query { ### Arguments -You can pass data into an operation by using arguments. +You can pass data into an operation by using arguments. -Most Queries and Mutations define a set of input data you can use, for example in the `GetToken` query you can pass in a `collectionId` and a `tokenId` argument. +Most Queries and Mutations define a set of input data you can use, for example in the `GetToken` query you can pass in a `collectionId` and a `tokenId` argument. @@ -263,19 +263,19 @@ query { -Sometimes arguments will be required, sometimes they will be optional, and some operations may not take any arguments at all. +Sometimes arguments will be required, sometimes they will be optional, and some operations may not take any arguments at all. The API will tell you if you try to run an operation without a required argument. ### Aliases -The alias, such as `TokenInfo` and `CurrentSupply` in the queries provided below, serve as a custom labels for specific fields within the operation. +The alias, such as `TokenInfo` and `CurrentSupply` in the queries provided below, serve as a custom labels for specific fields within the operation. Aliases allow you to rename the field in the response, making the data more intuitive and organized, especially when dealing with multiple fields or nested queries within a GraphQL request. #### Operation Alias: -Usually used in batch operations, it allows you to provide a clear and descriptive name for each operations. +Usually used in batch operations, it allows you to provide a clear and descriptive name for each operations. You might use it to distinguish between multiple similar queries or to provide context for the purpose of the query. @@ -307,7 +307,7 @@ query GetTokenInfo { #### Field Alias: -This option is useful when you want to label a specific field within the response. +This option is useful when you want to label a specific field within the response. It allows you to rename individual fields in the response for clarity or to avoid naming conflicts. @@ -403,13 +403,13 @@ query GetTokenInfo($collection_id: BigInt! $token_id: BigInt) { ### Types -Types in GraphQL serve as blueprints for defining the shape and composition of the data available through the API, encompassing a collection of fields representing specific pieces of information. +Types in GraphQL serve as blueprints for defining the shape and composition of the data available through the API, encompassing a collection of fields representing specific pieces of information. These structures lay the foundation for shaping queries and mutations, ensuring precise data retrieval and manipulation. #### Query: -A `query` is used to retrieve data from the Enjin Platform. +A `query` is used to retrieve data from the Enjin Platform. In this example, we're querying for information about a specific token. @@ -490,7 +490,7 @@ The field `id` indicate the data we want to receive in the response. A batch `query` allows you to send multiple mutation operations in a single request to reduce network overhead. -Each query have its own set of parameters and return data. +Each query have its own set of parameters and return data. @@ -527,7 +527,7 @@ query BatchGetTokenInfo { -In this batch query, we retrieve information for two different tokens with distinct `collectionId` and `tokenId`. +In this batch query, we retrieve information for two different tokens with distinct `collectionId` and `tokenId`. Each token's data is aliased using `TokenInfo1` and `TokenInfo2`. @@ -535,7 +535,7 @@ Each token's data is aliased using `TokenInfo1` and `TokenInfo2`. A batch `mutation` allows you to send multiple mutation operations in a single request to reduce network overhead. -Each mutation can have its own set of parameters and return data. +Each mutation can have its own set of parameters and return data. @@ -590,7 +590,7 @@ Some GraphQL queries returns results in multiple pages. In GraphQL, these are ca For example, the [GetWallet query](https://studio.apollographql.com/public/EnjinPlatform/variant/core/schema/reference/objects/Query?query=GetWallet) returns an object of type [Wallet](https://studio.apollographql.com/public/EnjinPlatform/variant/core/schema/reference/objects/Wallet). Wallet objects contains tokenAccount which is of type [TokenAccountConnection](https://studio.apollographql.com/public/EnjinPlatform/variant/core/schema/reference/objects/TokenAccountConnection). Since this object is of type 'connection', it uses pagination. -By default, if you don't specify which page to query, the first page will be returned. +By default, if you don't specify which page to query, the first page will be returned. To check if the response contains another page for a certain object, use the pageInfo.hasNextPage property from the connection. @@ -650,7 +650,7 @@ By default, this connection returns 15 edges (tokens) per page. The amount of edges per page can be adjusted by using slicing. ::: -To navigate to the next page, use pagination combined with the edge cursor. +To navigate to the next page, use pagination combined with the edge cursor. First, add the cursor field to the query response. (Alternatively, you can add the pageInfo.endCursor field to fetch the cursor of the last edge in the connection) @@ -717,7 +717,7 @@ query FetchingWalletTokens{ -Now we have the cursor of the last edge of the current page. +Now we have the cursor of the last edge of the current page. To navigate to the next page, add the `after` parameter to the `tokenAccounts` connection, and insert the cursor of the last edge of the current page. @@ -784,7 +784,7 @@ query FetchingWalletTokens{ -To get all edges in the connection, continue navigating to the next page with a loop. +To get all edges in the connection, continue navigating to the next page with a loop. You'll know that you reached the last page when the `hasNextPage` returns `false`. *** diff --git a/docs/01-getting-started/05-using-enjin-api/05-using-enjin-api.md b/docs/01-getting-started/05-using-enjin-api/05-using-enjin-api.md index 1ccb0af..471e156 100644 --- a/docs/01-getting-started/05-using-enjin-api/05-using-enjin-api.md +++ b/docs/01-getting-started/05-using-enjin-api/05-using-enjin-api.md @@ -11,7 +11,7 @@ import GlossaryTerm from '@site/src/components/GlossaryTerm'; The Enjin API is a set of programmatic interfaces that allow developers to interact with the Enjin Platform from their own applications. Built using , it enables clients to request exactly the data they need in a flexible and efficient way. Unlike traditional RESTful APIs, which require multiple endpoints for different data requirements, GraphQL enables more efficient data retrieval through a single endpoint. This flexibility reduces the number of network requests and optimizes performance, making it particularly advantageous for applications that require efficient data handling, such as blockchain and NFT platforms. :::info What you'll need: -- Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) to pay for . +- Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) to pay for . - You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://faucet.canary.enjin.io/). - An [Enjin Platform Account](/01-getting-started/04-using-the-enjin-platform.md). ::: @@ -22,7 +22,7 @@ We recommend reviewing our [How to Use GraphQL guide](/01-getting-started/05-usi ::: ## Authentication -Access tokens assume a pivotal role in facilitating your application's interaction with the Enjin Platform API. +Access tokens assume a pivotal role in facilitating your application's interaction with the Enjin Platform API. These tokens serve a dual purpose: - They grant your application access to the platform. @@ -38,7 +38,7 @@ To make authenticated calls to the Enjin Platform: "Authorization": "" ``` -4. _(Optional)_ To automate requests made from the Enjin Platform using a wallet daemon, you need to configure your daemon with the API token. +4. _(Optional)_ To automate requests made from the Enjin Platform using a wallet daemon, you need to configure your daemon with the API token. For more details head over to [Using the Wallet Daemon](/01-getting-started/06-using-wallet-daemon.md) ## Endpoints & Queries diff --git a/docs/01-getting-started/06-using-wallet-daemon.md b/docs/01-getting-started/06-using-wallet-daemon.md index 4e76db2..d8aac53 100644 --- a/docs/01-getting-started/06-using-wallet-daemon.md +++ b/docs/01-getting-started/06-using-wallet-daemon.md @@ -41,7 +41,7 @@ The diagram above depicts the various stages involved in creating a new collecti :::tip Choosing the Right Approach for Running the Wallet Daemon There are two ways to run the Wallet Daemon, each suitable for different user profiles and use cases: -1. **Executable Approach:** This method involves running a simple executable, configuring it via a user interface, and clicking 'Run' to start it. It is the most straightforward approach and is recommended for beginners or those who are not developers and for development environments / personal use. Learn how to set it up in our [Setting up Wallet Daemon using Executable](#wallet-daemon-executable) guide. +1. **Executable Approach:** This method involves running a simple executable, configuring it via a user interface, and clicking 'Run' to start it. It is the most straightforward approach and is recommended for beginners or those who are not developers and for development environments / personal use. Learn how to set it up in our [Setting up Wallet Daemon using Executable](#wallet-daemon-executable) guide. 2. **Docker Approach:** This method involves cloning a GitHub repository and modifying the configuration files. It offers more flexibility and control, making it suitable for developers and for production use. Learn how to set it up in our [Setting up Wallet Daemon using Docker](#setting-up-wallet-daemon-via-docker) guide. Choose the approach that best fits your technical proficiency and the needs of your project. @@ -51,8 +51,8 @@ Choose the approach that best fits your technical proficiency and the needs of y ![The wallet daemon executable app](/img/getting-started/wallet-daemon-executable-welcome.png) -Setting up the Wallet Daemon Executable is a straight forward process. -Download the latest version of the Wallet Daemon from [GitHub](https://github.com/enjin/wallet-daemon-ui/releases), extract it, and run the `enjin_wallet_daemon.exe` executable file. +Setting up the Wallet Daemon Executable is a straight forward process. +Download the latest version of the Wallet Daemon from [GitHub](https://github.com/enjin/wallet-daemon-ui/releases), extract it, and run the `enjin_wallet_daemon.exe` executable file. Follow the on-screen instructions to set it up and make sure to insert your Enjin Platform API Token from your [account settings page](https://platform.canary.enjin.io/settings). ![Configuring the Wallet Daemon Executable with Enjin Platform](/img/getting-started/daemon-exec-overview.gif) @@ -88,21 +88,21 @@ The final configuration is to update the `configs/daemon/config.json` file to co ``` -{ - "node": "wss://rpc.matrix.blockchain.enjin.io:443", - "relay_node": "wss://rpc.relay.blockchain.enjin.io:443", - "api": "https://platform.enjin.io/graphql", - "master_key": "/opt/app/storage" +{ + "node": "wss://rpc.matrix.blockchain.enjin.io:443", + "relay_node": "wss://rpc.relay.blockchain.enjin.io:443", + "api": "https://platform.enjin.io/graphql", + "master_key": "/opt/app/storage" } ``` ``` -{ - "node": "wss://rpc.matrix.canary.enjin.io:443", - "relay_node": "wss://rpc.relay.canary.enjin.io:443", - "api": "https://platform.canary.enjin.io/graphql", - "master_key": "/opt/app/storage" +{ + "node": "wss://rpc.matrix.canary.enjin.io:443", + "relay_node": "wss://rpc.relay.canary.enjin.io:443", + "api": "https://platform.canary.enjin.io/graphql", + "master_key": "/opt/app/storage" } ``` @@ -117,22 +117,22 @@ Finally, you can spin up the daemon using the following command from the platfor ### Importing Daemon Wallet From Existing Seed :::info Daemon Wallets Encryption -Daemon wallets may be encrypted with a password specified in the `KEY_PASS` env var located in `configs/daemon/.env`. -If your existing wallet is encrypted with a password, make sure to update your `KEY_PASS` var accordingly. -If your existing wallet is not encrypted, leave the `KEY_PASS` var empty. +Daemon wallets may be encrypted with a password specified in the `KEY_PASS` env var located in `configs/daemon/.env`. +If your existing wallet is encrypted with a password, make sure to update your `KEY_PASS` var accordingly. +If your existing wallet is not encrypted, leave the `KEY_PASS` var empty. ::: Follow the steps below to set up your wallet daemon from an existing seed: -1. Find your wallet's public key. You can convert your wallet's account address to it's public key with the [Account Format Transform](https://matrix.subscan.io/tools/format_transform) tool. +1. Find your wallet's public key. You can convert your wallet's account address to it's public key with the [Account Format Transform](https://matrix.subscan.io/tools/format_transform) tool. We'll use wallet address `efRP7f5aFWWobNiNxcWGNxhY1RdRXZ4kScvwuFdD4bsBHEUZW` as an example. It's public key is `0x62c75d8f81e05794cd0b703cf07b7ea3196840eaac4e300cb968fdd266882e02`. -2. Remove the 0x from the public key from step #1. +2. Remove the 0x from the public key from step #1. For our example, it's `62c75d8f81e05794cd0b703cf07b7ea3196840eaac4e300cb968fdd266882e02` -3. Inside your platform's `configs/daemon/store` folder, create a file with the name `73723235`. +3. Inside your platform's `configs/daemon/store` folder, create a file with the name `73723235`. For our example, we've created the file `configs/daemon/store/7372323562c75d8f81e05794cd0b703cf07b7ea3196840eaac4e300cb968fdd266882e02` -4. Inside the new file created on step #3, insert your wallet's mnemonic seed wrapped with double quotes. +4. Inside the new file created on step #3, insert your wallet's mnemonic seed wrapped with double quotes. Example: `"earn meat maid rotate ..."` -5. Rebuild your platform for the changes to take effect: +5. Rebuild your platform for the changes to take effect: `docker compose build` -6. Run the daemon again: +6. Run the daemon again: `docker compose up daemon` diff --git a/docs/02-guides/01-platform/01-managing-tokens/01-creating-collections.md b/docs/02-guides/01-platform/01-managing-tokens/01-creating-collections.md index 66ffc8f..cf41c60 100644 --- a/docs/02-guides/01-platform/01-managing-tokens/01-creating-collections.md +++ b/docs/02-guides/01-platform/01-managing-tokens/01-creating-collections.md @@ -9,12 +9,12 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::info What you'll need: -- Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for and 6.25 ENJ for s. +- Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for and 6.25 ENJ for s. You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://faucet.canary.enjin.io/). - An [Enjin Platform Account](/01-getting-started/04-using-the-enjin-platform.md). ::: -On Enjin Blockchain, every token must be placed inside a . +On Enjin Blockchain, every token must be placed inside a . **There are two ways to use the functionalities:** @@ -57,7 +57,7 @@ Once you've created a collection you're ready to start [creating tokens](/02-gui ## Option B. Using the Enjin API & SDKs -The `CreateCollection` mutation is used to create a new on-chain collection. +The `CreateCollection` mutation is used to create a new on-chain collection. @@ -163,7 +163,7 @@ int main() { std::cout << to_string(transaction->GetId().value()) << std::endl; std::cout << ToString(transaction->GetMethod().value()) << std::endl; } - + // Write any error messages to the console if (gqlResult.has_value() && gqlResult->HasErrors()) { @@ -260,7 +260,7 @@ print(response.json()) :::info Explore More Arguments -For a comprehensive view of all available arguments for queries and mutations, please refer to our [API Reference](/03-api-reference/03-api-reference.md). This resource will guide you on how to use the GraphiQL Playground to explore the full structure and functionality of our API. +For a comprehensive view of all available arguments for queries and mutations, please refer to our [API Reference](/03-api-reference/03-api-reference.md). This resource will guide you on how to use the GraphiQL Playground to explore the full structure and functionality of our API. For instance, you'll find settings such as different supply types with the `MintPolicy` argument, enforcing royalties with the `MarketPolicy` argument, or adding metadata with the `AttributeInput` argument. ::: diff --git a/docs/02-guides/01-platform/01-managing-tokens/010-transfer-accept-collection.md b/docs/02-guides/01-platform/01-managing-tokens/010-transfer-accept-collection.md index 4a49ec6..71e9273 100644 --- a/docs/02-guides/01-platform/01-managing-tokens/010-transfer-accept-collection.md +++ b/docs/02-guides/01-platform/01-managing-tokens/010-transfer-accept-collection.md @@ -12,7 +12,7 @@ import TabItem from '@theme/TabItem'; - If you are transferring collection ownership, you also need to own a [Collection](/02-guides/01-platform/01-managing-tokens/01-creating-collections.md). ::: -Collection ownership on the Enjin Blockchain grants specific permissions and control over a collection and its tokens. +Collection ownership on the Enjin Blockchain grants specific permissions and control over a collection and its tokens. The collection owner is the only account authorized to make changes to the collection or any tokens within it. This includes the exclusive ability to mint new tokens or mint additional supply of existing tokens in the collection. Transferring collection ownership is done in two steps: diff --git a/docs/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-a-currency-token.md b/docs/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-a-currency-token.md index b2b1529..c0c1bac 100644 --- a/docs/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-a-currency-token.md +++ b/docs/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-a-currency-token.md @@ -10,7 +10,7 @@ import TabItem from '@theme/TabItem'; Similarly to [Tokens](/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md), "Currency Tokens" are also digital assets that can be traded, sold, or used on the Enjin Blockchain. However, unlike standard tokens, currency tokens support fractional values, allowing them to be divided into smaller units, just like traditional currencies. :::info What you'll need: -- Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to process transactions and at least 0.01 ENJ for the . +- Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to process transactions and at least 0.01 ENJ for the . You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://faucet.canary.enjin.io/). - An [Enjin Platform Account](/01-getting-started/04-using-the-enjin-platform.md). - A [Collection](/02-guides/01-platform/01-managing-tokens/01-creating-collections.md) to place the tokens in. @@ -25,9 +25,9 @@ For the currency token options, configure the metadata parameter, which consists - **Decimals:** Max amount of decimals supported for this token (e.g. 2 would mean the token can support up to 2 decimals, like 5.75 Gold Coins). :::warning Important Note on Decimals Support -The `decimalCount` property specifies how token balances should be displayed in applications, but it does not allow for actual fractional values on the Enjin Blockchain. -This means that for a token with "Decimals: 2", the balance should be divided by 100 (10^2) when displayed in applications. -For example, for the Gold Coins token example mentioned above, a balance of 1,575 Gold Coins should be shown as 15.75 (1,575/100) in apps. +The `decimalCount` property specifies how token balances should be displayed in applications, but it does not allow for actual fractional values on the Enjin Blockchain. +This means that for a token with "Decimals: 2", the balance should be divided by 100 (10^2) when displayed in applications. +For example, for the Gold Coins token example mentioned above, a balance of 1,575 Gold Coins should be shown as 15.75 (1,575/100) in apps. Similarly, when minting tokens, to mint 4.80 Gold Coins, the minted supply parameter should be set to 480 (4.8 \* 10^2). ::: @@ -43,13 +43,13 @@ Before minting the Mainnet versions of your Tokens, that will be used in your li ## Option A. Using the Enjin Dashboard :::warning Unavailable via the User Interface -The option to create a currency token via the user interface is currently being developed. +The option to create a currency token via the user interface is currently being developed. For the time being, you can create currency token via [Option B. Using the Enjin API & SDKs](#option-b-using-the-enjin-api--sdks). ::: ## Option B. Using the Enjin API & SDKs -CreateToken mutation enables you to create a new token within an existing collection. This operation is essential for introducing new digital assets, and it allows you to define various attributes and characteristics for the newly created token. +CreateToken mutation enables you to create a new token within an existing collection. This operation is essential for introducing new digital assets, and it allows you to define various attributes and characteristics for the newly created token. For the currency token options, configure the metadata parameter, which consists of name, symbol and decimals @@ -152,8 +152,8 @@ fetch('https://platform.canary.enjin.io/graphql', { collectionId: $collection_id params:{ tokenId: {integer: $token_id} - initialSupply: $initial_supply - cap: {type: $cap} + initialSupply: $initial_supply + cap: {type: $cap} metadata: $metadata } ) { @@ -277,7 +277,7 @@ For Token ID management, head to [Best Practices > TokenID Structure](/02-guides ::: :::info Explore More Arguments -For a comprehensive view of all available arguments for queries and mutations, please refer to our [API Reference](/03-api-reference/03-api-reference.md). This resource will guide you on how to use the GraphiQL Playground to explore the full structure and functionality of our API. +For a comprehensive view of all available arguments for queries and mutations, please refer to our [API Reference](/03-api-reference/03-api-reference.md). This resource will guide you on how to use the GraphiQL Playground to explore the full structure and functionality of our API. For instance, you'll find settings such as adding attributes/royalties/supply type and much more with the `CreateTokenParams` argument, or the ability to sign using a managed wallet with the `signingAccount` argument. ::: diff --git a/docs/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md b/docs/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md index 63f2905..baa6b26 100644 --- a/docs/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md +++ b/docs/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md @@ -8,10 +8,10 @@ import GlossaryTerm from '@site/src/components/GlossaryTerm'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -"s" are digital assets that can be traded, sold, or used on the Enjin Blockchain. +"s" are digital assets that can be traded, sold, or used on the Enjin Blockchain. :::info What you'll need: -- Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to process transactions and at least 0.01 ENJ for the . +- Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to process transactions and at least 0.01 ENJ for the . You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://faucet.canary.enjin.io/). - An [Enjin Platform Account](/01-getting-started/04-using-the-enjin-platform.md). - A [Collection](/02-guides/01-platform/01-managing-tokens/01-creating-collections.md) to place the tokens in. @@ -39,7 +39,7 @@ In the Platform menu, navigate to "**[Tokens](https://platform.enjin.io/tokens)* From here, you can customize your collection's Mint Policy, Market Policy, and Attributes. -- **Create Token Section -** Basic token options. Make sure to select the Collection ID you wish to mint the token in, the token ID, and the recipient in the corresponding fields. +- **Create Token Section -** Basic token options. Make sure to select the Collection ID you wish to mint the token in, the token ID, and the recipient in the corresponding fields. Make sure to check out the [TokenID Structure Best Practices](/02-guides/01-platform/03-advanced-mechanics/01-tokenid-structure.md). - **[Cap](/03-api-reference/04-important-arguments.md#cap) -** The token cap (if required). - The **[Infinite](/03-api-reference/04-important-arguments.md#infinite)** supply type is the most flexible. With this model, there is no limit to how many tokens can be minted or be in circulation. The collection owner can always mint additional units, making it ideal for use cases that require an ever-expanding token supply. @@ -355,7 +355,7 @@ For Token ID management, head to [Best Practices > TokenID Structure](/02-guides ::: :::info Explore More Arguments -For a comprehensive view of all available arguments for queries and mutations, please refer to our [API Reference](/03-api-reference/03-api-reference.md). This resource will guide you on how to use the GraphiQL Playground to explore the full structure and functionality of our API. +For a comprehensive view of all available arguments for queries and mutations, please refer to our [API Reference](/03-api-reference/03-api-reference.md). This resource will guide you on how to use the GraphiQL Playground to explore the full structure and functionality of our API. For instance, you'll find settings such as adding attributes/royalties/supply type and much more with the `CreateTokenParams` argument, or the ability to sign using a managed wallet with the `signingAccount` argument. ::: diff --git a/docs/02-guides/01-platform/01-managing-tokens/03-adding-metadata.md b/docs/02-guides/01-platform/01-managing-tokens/03-adding-metadata.md index 306864c..0d4a079 100644 --- a/docs/02-guides/01-platform/01-managing-tokens/03-adding-metadata.md +++ b/docs/02-guides/01-platform/01-managing-tokens/03-adding-metadata.md @@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'; Adding to a token enables games and apps to import detailed information and showcase your token's data. Usually, digital assets are identified just by its . Metadata adds extra details to these assets, giving them properties such as a title, a narrative, and visuals. :::info What you'll need: -- Some [ Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for and metadata s. +- Some [ Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for and metadata s. You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://faucet.canary.enjin.io/). - An [Enjin Platform Account](/01-getting-started/04-using-the-enjin-platform.md). - A [Collection](/02-guides/01-platform/01-managing-tokens/01-creating-collections.md) and a [Token](/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md) to add metadata to. @@ -32,20 +32,20 @@ There are three main ways to store metadata for your tokens: - On-chain storage can cost a small fee at the time of mint and has slight limitations in terms of space, making it suitable for smaller, permanent files. 2. **Off-Chain Storage: JSON** - - This means the metadata is stored outside the blockchain on a separate server or database. + - This means the metadata is stored outside the blockchain on a separate server or database. - It's often accessible through a URL, typically pointing to a JSON file containing the asset's information. - Off-chain storage is cheaper and more flexible for large or frequently updated data, but it relies on external servers' availability and security. 3. **InterPlanetary File System (): JSON** - IPFS is a decentralized storage solution that distributes file storage across a network of computers. - It allows metadata to be stored off the main blockchain but in a way that's still decentralized, tamper-proof, and permanent. - - IPFS assigns a unique hash to each file. When you store metadata on IPFS, you link to it using this hash, ensuring the data remains unchanged. + - IPFS assigns a unique hash to each file. When you store metadata on IPFS, you link to it using this hash, ensuring the data remains unchanged. Each option has trade-offs between cost, reliability, and security, and the choice depends on the specific needs and goals of the digital asset being created. ## Attributes: OnChain Metadata -You can assign multiple on-chain attributes to a token simultaneously, which allows you to define the metadata of the token. +You can assign multiple on-chain attributes to a token simultaneously, which allows you to define the metadata of the token. Some commonly recognized attributes, following the [Universal Metadata Standard](/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/02-metadata-standard.md), include: @@ -59,9 +59,9 @@ Check the [Best Practices for Collection/Token Metadata](/02-guides/01-platform/ ::: :::warning Attributes for Collections and Tokens are very similar. -The process of adding attributes is similar for both collections and tokens. -While this tutorial guides you through adding an attribute to a token, you can follow the same steps to add attributes to a collection. -Simply navigate to the corresponding menu for collections instead of tokens. +The process of adding attributes is similar for both collections and tokens. +While this tutorial guides you through adding an attribute to a token, you can follow the same steps to add attributes to a collection. +Simply navigate to the corresponding menu for collections instead of tokens. ::: :::warning **Important:** Attribute keys are case sensitive. @@ -75,7 +75,7 @@ Ensure you use the correct casing when defining attributes to avoid errors. ### Option A. Using the Enjin Dashboard -In the Platform menu, navigate to "**[Tokens](https://platform.canary.enjin.io/tokens)**". +In the Platform menu, navigate to "**[Tokens](https://platform.canary.enjin.io/tokens)**". **Locate the token** you wish to add / edit attributes for, click the **3 vertical dots** (**⋮**) to it's right, then click the "**Attributes**" button. ![Adding Metadata](/img/guides/managing-tokens/adding-metadata.gif) @@ -215,7 +215,7 @@ int main() { AttributeInput nameAttribute3 = AttributeInput() .SetKey(make_shared("uri")) .SetValue(make_shared("https://yourhost/metadata.json")); - + vectorAttributes.push_back(nameAttribute1); vectorAttributes.push_back(nameAttribute2); vectorAttributes.push_back(nameAttribute3); @@ -433,9 +433,9 @@ Take note of these data points: - **`description`**: This field provides a human-readable description of the asset. It's a text description that helps users understand the nature or significance of the asset. -- **`media`**: The `media` field contains a URL pointing to an image representation of the asset. It supports PNG, GIF, and JPG file formats. +- **`media`**: The `media` field contains a URL pointing to an image representation of the asset. It supports PNG, GIF, and JPG file formats. -- **`external_url`**: The "external_url" field is a URL pointing to an external application or website where users can view additional information or interact with the asset. +- **`external_url`**: The "external_url" field is a URL pointing to an external application or website where users can view additional information or interact with the asset. - **`attributes`**: This is an object array where each object should contain an `title` and `value` fields. The attribute `title` defines the type of trait or attribute associated with the asset, while `value` can be a string or a number, representing the value of that trait or attribute. diff --git a/docs/02-guides/01-platform/01-managing-tokens/04-minting-a-token.md b/docs/02-guides/01-platform/01-managing-tokens/04-minting-a-token.md index da72c33..9f33619 100644 --- a/docs/02-guides/01-platform/01-managing-tokens/04-minting-a-token.md +++ b/docs/02-guides/01-platform/01-managing-tokens/04-minting-a-token.md @@ -8,15 +8,15 @@ import GlossaryTerm from '@site/src/components/GlossaryTerm'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -Now that you've got your tokens created, it's time to start minting them into player wallets as they are earned. +Now that you've got your tokens created, it's time to start minting them into player wallets as they are earned. -We call this "Play-to-Mint," giving players the power to create tokens themselves, which feels more rewarding. +We call this "Play-to-Mint," giving players the power to create tokens themselves, which feels more rewarding. Plus, it keeps your processes more efficient by delivering tokens right to players' wallets without any unnecessary `transfer` transactions. :::info What you'll need: -- Some [ Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for and a deposit of 0.01 ENJ is required for the , for each new token holder. -If the token has , each new unit minted will require the same amount of ENJ to be infused. +- Some [ Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for and a deposit of 0.01 ENJ is required for the , for each new token holder. +If the token has , each new unit minted will require the same amount of ENJ to be infused. You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://faucet.canary.enjin.io/). - An [Enjin Platform Account](/01-getting-started/04-using-the-enjin-platform.md). - A [Collection](/02-guides/01-platform/01-managing-tokens/01-creating-collections.md) and a [Token](/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md) to mint. @@ -29,7 +29,7 @@ You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://fa ## Option A. Using the Enjin Dashboard -In the Platform menu, navigate to "**[Tokens](https://platform.canary.enjin.io/tokens)**". +In the Platform menu, navigate to "**[Tokens](https://platform.canary.enjin.io/tokens)**". **Locate the token** you wish to mint, click the **3 vertical dots** (**⋮**) to it's right, then click the "**Mint**" button. ![Minting a Token](/img/guides/managing-tokens/minting-a-token.gif) @@ -66,7 +66,7 @@ mutation BatchMint { recipients: [ { account: "0xaa89f9099742a928051c41eadba188ad4e863539ff96f16722ae7850271c2921" #The recipient of the mint - mintParams: { + mintParams: { amount:1 #Amount to mint tokenId: {integer: 6533} #Token ID to mint } diff --git a/docs/02-guides/01-platform/01-managing-tokens/05-transferring-tokens.md b/docs/02-guides/01-platform/01-managing-tokens/05-transferring-tokens.md index 5f830d4..325d7bc 100644 --- a/docs/02-guides/01-platform/01-managing-tokens/05-transferring-tokens.md +++ b/docs/02-guides/01-platform/01-managing-tokens/05-transferring-tokens.md @@ -15,7 +15,7 @@ You will need to transfer tokens for: - Providing a seamless user experience by allowing token transfers without leaving the game environment. :::info What you'll need: -- Some [ Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for and a deposit of 0.01 ENJ is required for the , for each new token holder. +- Some [ Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for and a deposit of 0.01 ENJ is required for the , for each new token holder. You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://faucet.canary.enjin.io/). - An [Enjin Platform Account](/01-getting-started/04-using-the-enjin-platform.md). - A [Collection](/02-guides/01-platform/01-managing-tokens/01-creating-collections.md) and a [Token](/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md) to mint. @@ -28,7 +28,7 @@ You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://fa ## Option A. Using the Enjin Dashboard -In the Platform menu, navigate to "**[Tokens](https://platform.canary.enjin.io/tokens)**". +In the Platform menu, navigate to "**[Tokens](https://platform.canary.enjin.io/tokens)**". **Locate the token** you wish to transfer, click the **3 vertical dots** (**⋮**) to it's right, then click the "**Transfer**" button. ![Transferring Token](/img/guides/managing-tokens/transferring-token.gif) @@ -37,7 +37,7 @@ In the Platform menu, navigate to "**[Tokens](https://platform.canary.enjin.io/t Click on the "**Batch**" button, followed by "**Batch Transfer**". ::: -Fill in the recipient, amount, and other optional arguments in the corresponding fields. +Fill in the recipient, amount, and other optional arguments in the corresponding fields. Once you're satisfied with the options, click on the "**Transfer**" button at the bottom right corner to create the request.

@@ -56,7 +56,7 @@ Since this request requires a , it'll need to b - If a **Wallet Daemon is running and configured**, the transaction request will be **signed automatically**. - If **a wallet is connected** such as the Enjin Wallet or Polkadot.js, the transaction must be **signed manually** by clicking the "**Sign**" button and **approving the signature request** in your wallet. -If you're looking to distribute tokens to your community or players, but don't have their account addresses, don't worry! Our solution is Enjin Beam. +If you're looking to distribute tokens to your community or players, but don't have their account addresses, don't worry! Our solution is Enjin Beam. Proceed to the [Distributing Tokens via QR](/02-guides/01-platform/01-managing-tokens/06-create-qr-drops.md) tutorial to learn more. ## Option B. Using the Enjin API & SDKs @@ -474,7 +474,7 @@ mutation TransferKeepAlive( variables = { 'recipient': "cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f", #Specify the recipent address 'amount': 1 #Specify the amount of tokens to transfer - + } response = requests.post('https://platform.canary.enjin.io/graphql', @@ -488,10 +488,10 @@ print(response.json()) :::info **Notes:** - `amount` argument - - In the `TransferBalance` mutation, the `amount` argument is denoted in `u128`. This means that the number you specify is divided by 10^18 to determine the actual amount of ENJ to be transferred. + - In the `TransferBalance` mutation, the `amount` argument is denoted in `u128`. This means that the number you specify is divided by 10^18 to determine the actual amount of ENJ to be transferred. In the example above, an `amount` of `5000000000000000000` will actually send 5 ENJ. Keep this in mind when specifying the `amount` in your mutations. - `keepAlive` argument - - Set to true if you want to make sure the account doesn't get reaped. + - Set to true if you want to make sure the account doesn't get reaped. Learn more about keepAlive argument [here](/03-api-reference/04-important-arguments.md#keepalive) ::: @@ -708,12 +708,12 @@ print(response.json()) A WebSocket event will also be fired so you can pick up the transfer transaction in real time by listening to the app channel on the WebSocket. :::tip Need to send a transaction request to user's wallet? -This can be done using Enjin Platform API & WalletConnect! +This can be done using Enjin Platform API & WalletConnect! To learn more, check out the [Using WalletConnect page](/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/01-using-wallet-connect.md). ::: :::info Explore More Arguments -For a comprehensive view of all available arguments for queries and mutations, please refer to our [API Reference](/03-api-reference/03-api-reference.md). This resource will guide you on how to use the GraphiQL Playground to explore the full structure and functionality of our API. +For a comprehensive view of all available arguments for queries and mutations, please refer to our [API Reference](/03-api-reference/03-api-reference.md). This resource will guide you on how to use the GraphiQL Playground to explore the full structure and functionality of our API. For instance, you'll find settings such as `continueOnFailure` to skip data that would cause the whole batch to fail, or the ability to sign using a managed wallet with the `signingAccount` argument. ::: diff --git a/docs/02-guides/01-platform/01-managing-tokens/06-create-qr-drops.md b/docs/02-guides/01-platform/01-managing-tokens/06-create-qr-drops.md index e5a5df6..306a541 100644 --- a/docs/02-guides/01-platform/01-managing-tokens/06-create-qr-drops.md +++ b/docs/02-guides/01-platform/01-managing-tokens/06-create-qr-drops.md @@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'; is a simple way to distribute digital assets like tokens and collectibles using QR codes. Users just need to scan a Beam QR code with their Enjin Wallet to receive tokens directly. It's a great tool for marketing campaigns, events, or promotions to give away items and easily bring new users into your ecosystem. :::info What you'll need: -- Some [ Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for and a deposit of 0.01 ENJ is required for the , for each new token holder. +- Some [ Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for and a deposit of 0.01 ENJ is required for the , for each new token holder. You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://faucet.canary.enjin.io/). - An [Enjin Platform Account](/01-getting-started/04-using-the-enjin-platform.md). - A [Collection](/02-guides/01-platform/01-managing-tokens/01-creating-collections.md) and a [Token](/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md) to mint. @@ -58,7 +58,7 @@ Now, you'll fill out the details for your Beam: - **Why use Single-use?** It gives you precise control over which specific claim (and thus which token) goes to which person. It's also more secure for private distributions; you can share individual QR codes with specific users without worrying about a main QR code being leaked publicly. ::: -Once you're satisfied with the options, click on the "**Create**" button at the bottom right corner to create the request. +Once you're satisfied with the options, click on the "**Create**" button at the bottom right corner to create the request. If a signature request is needed, approve it. Once the Beam is created, locate it in the "**Beams**" menu, click the **3 vertical dots** (**⋮**) to it's right, then click the "**Claim**" button to view the QR code. @@ -66,12 +66,12 @@ Once the Beam is created, locate it in the "**Beams**" menu, click the **3 verti ![Claiming a Beam](/img/guides/managing-tokens/claim-beam.gif) :::warning Need to get all of the "Single-Use" QR codes? -Please note, viewing all of the "Single-Use" QR codes is currently not available in the Platform User Interface. +Please note, viewing all of the "Single-Use" QR codes is currently not available in the Platform User Interface. For the time being, it can be viewed programmatically only via [Enjin API & SDKs](#option-b-using-the-enjin-api--sdks) ::: -The Enjin Beam is now ready to be shared to distribute tokens. Users can scan the QR code and instantly receive your token! -Next skillset to learn is mutating a collection / token. +The Enjin Beam is now ready to be shared to distribute tokens. Users can scan the QR code and instantly receive your token! +Next skillset to learn is mutating a collection / token. Proceed to the [Freezing & Thawing](/02-guides/01-platform/01-managing-tokens/07-freezing-thawing.md) tutorial to learn more. ## Option B. Using the Enjin API & SDKs @@ -403,7 +403,7 @@ query GetBeam { start end isClaimable - claimsRemaining + claimsRemaining qr { url payload @@ -415,7 +415,7 @@ query GetBeam { forceSingleMint frozen network - } + } } } ``` @@ -551,7 +551,7 @@ int main() { std::cout << error.GetMessage().value() << std::endl; } } - + client.reset(); return 0; @@ -578,7 +578,7 @@ fetch('https://platform.canary.enjin.io/graphql', { start end isClaimable - claimsRemaining + claimsRemaining qr { url payload @@ -590,7 +590,7 @@ fetch('https://platform.canary.enjin.io/graphql', { forceSingleMint frozen network - } + } } } `, @@ -622,7 +622,7 @@ axios.post('https://platform.canary.enjin.io/graphql', { start end isClaimable - claimsRemaining + claimsRemaining qr { url payload @@ -634,7 +634,7 @@ axios.post('https://platform.canary.enjin.io/graphql', { forceSingleMint frozen network - } + } } } `, @@ -666,7 +666,7 @@ query GetBeam start end isClaimable - claimsRemaining + claimsRemaining qr { url payload @@ -678,7 +678,7 @@ query GetBeam forceSingleMint frozen network - } + } } } ''' diff --git a/docs/02-guides/01-platform/01-managing-tokens/07-freezing-thawing.md b/docs/02-guides/01-platform/01-managing-tokens/07-freezing-thawing.md index 3de7469..677b54e 100644 --- a/docs/02-guides/01-platform/01-managing-tokens/07-freezing-thawing.md +++ b/docs/02-guides/01-platform/01-managing-tokens/07-freezing-thawing.md @@ -13,7 +13,7 @@ import TabItem from '@theme/TabItem'; One such use-case is the implementation of "Soulbound" tokens. A Soulbound token is bound to a specific address and cannot be transferred out of the wallet it's minted on. This feature can be used to create unique gameplay mechanics, loyalty rewards, and more. :::note -Freezing only applies to ing and transfers, which also results in marketplace listings being unpurchasable. +Freezing only applies to ing and transfers, which also results in marketplace listings being unpurchasable. Freezing does not suspend token minting. ::: @@ -23,17 +23,17 @@ A **freeze state** determines whether a token can be transferred and the conditi #### Explanation of Freeze States -- **Permanent:** - The token is permanently frozen and cannot be transferred to another account under any circumstances. Use this state for tokens that are intended to stay bound to their original holder, such as "Soulbound" tokens for identity or loyalty purposes. +- **Permanent:** + The token is permanently frozen and cannot be transferred to another account under any circumstances. Use this state for tokens that are intended to stay bound to their original holder, such as "Soulbound" tokens for identity or loyalty purposes. -- **Temporary:** +- **Temporary:** The token is temporarily frozen, restricting transfers until it is explicitly thawed by the collection owner. This state is ideal for implementing time-limited restrictions or conditional asset movement. -- **Never:** - The token is always transferrable and cannot be frozen. Choose this state if you want the token to remain unrestricted in its movement across wallets and platforms. +- **Never:** + The token is always transferrable and cannot be frozen. Choose this state if you want the token to remain unrestricted in its movement across wallets and platforms. :::info What you'll need: -- Some [ Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for . +- Some [ Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for . You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://faucet.canary.enjin.io/). - An [Enjin Platform Account](/01-getting-started/04-using-the-enjin-platform.md). - A [Collection](/02-guides/01-platform/01-managing-tokens/01-creating-collections.md) and a [Token](/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md) to freeze. @@ -46,15 +46,15 @@ You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://fa ## Option A. Using the Enjin Dashboard -:::tip Applying Freeze/Thaw Actions to Collections and Tokens -This tutorial illustrates the process of freezing a collection. -However, the same steps can be applied to freeze or thaw tokens. +:::tip Applying Freeze/Thaw Actions to Collections and Tokens +This tutorial illustrates the process of freezing a collection. +However, the same steps can be applied to freeze or thaw tokens. Simply navigate to the corresponding menu for tokens instead of collections, or for thawing instead of freezing. ::: ### Freezing an entire collection -In the Platform menu, navigate to "**[Collections](https://platform.canary.enjin.io/collections)**". +In the Platform menu, navigate to "**[Collections](https://platform.canary.enjin.io/collections)**". **Locate the collection** you wish to freeze, click the **3 vertical dots** (**⋮**) to it's right, then click the "**Freeze**" button. ![Freezing a Collection](/img/guides/managing-tokens/freezing-collection.gif) @@ -219,7 +219,7 @@ fetch('https://platform.canary.enjin.io/graphql', { $freeze_type: FreezeType! ) { Freeze( - collectionId: $collection_id + collectionId: $collection_id freezeType: $freeze_type ){ id @@ -250,7 +250,7 @@ axios.post('https://platform.canary.enjin.io/graphql', { $freeze_type: FreezeType! ) { Freeze( - collectionId: $collection_id + collectionId: $collection_id freezeType: $freeze_type ){ id @@ -281,7 +281,7 @@ mutation FreezeCollection $freeze_type: FreezeType! ) { Freeze( - collectionId: $collection_id + collectionId: $collection_id freezeType: $freeze_type ){ id @@ -528,7 +528,7 @@ mutation FreezeToken $token_id: BigInt! $freeze_type: FreezeType! $freeze_state: FreezeStateType - + ) { Freeze( collectionId: $collection_id @@ -702,7 +702,7 @@ fetch('https://platform.canary.enjin.io/graphql', { $freeze_type: FreezeType! ) { Thaw( - collectionId: $collection_id + collectionId: $collection_id freezeType: $freeze_type ){ id @@ -733,7 +733,7 @@ axios.post('https://platform.canary.enjin.io/graphql', { $freeze_type: FreezeType! ) { Thaw( - collectionId: $collection_id + collectionId: $collection_id freezeType: $freeze_type ){ id @@ -764,7 +764,7 @@ mutation ThawCollection $freeze_type: FreezeType! ) { Thaw( - collectionId: $collection_id + collectionId: $collection_id freezeType: $freeze_type ){ id @@ -1037,6 +1037,6 @@ For instance, you'll find settings such as `continueOnFailure` to skip data that ::: :::tip Need to send a transaction request to user's wallet? -This can be done using Enjin Platform API & WalletConnect! +This can be done using Enjin Platform API & WalletConnect! To learn more, check out the [Using WalletConnect page](/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/01-using-wallet-connect.md). ::: diff --git a/docs/02-guides/01-platform/01-managing-tokens/08-burning-destroying-tokens.md b/docs/02-guides/01-platform/01-managing-tokens/08-burning-destroying-tokens.md index 56bf50b..55cea11 100644 --- a/docs/02-guides/01-platform/01-managing-tokens/08-burning-destroying-tokens.md +++ b/docs/02-guides/01-platform/01-managing-tokens/08-burning-destroying-tokens.md @@ -8,11 +8,11 @@ import GlossaryTerm from '@site/src/components/GlossaryTerm'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -"Melting" (often called "Burning") refers to the process of decreasing a token's supply and removing it from circulation, or in some cases, even removing the token from the blockchain entirely. +"Melting" (often called "Burning") refers to the process of decreasing a token's supply and removing it from circulation, or in some cases, even removing the token from the blockchain entirely. Melting a token with releases the Infused ENJ to the holder. :::info What you'll need: -- Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for . +- Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for . You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://faucet.canary.enjin.io/). - An [Enjin Platform Account](/01-getting-started/04-using-the-enjin-platform.md). - A [Collection](/02-guides/01-platform/01-managing-tokens/01-creating-collections.md) or a [Token](/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md) to melt/destroy. @@ -27,7 +27,7 @@ You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://fa ### Melting token's supply -In the Platform menu, navigate to "**[Tokens](https://platform.canary.enjin.io/tokens)**". +In the Platform menu, navigate to "**[Tokens](https://platform.canary.enjin.io/tokens)**". **Locate the token** you wish to melt, click the **3 vertical dots** (**⋮**) to it's right, then click the "**Burn**" button. ![melting a Token](/img/guides/managing-tokens/burning-token.gif) @@ -56,14 +56,14 @@ Since this request requires a , it'll need to b :::info To destroy a token, these requirements must be met: - The caller is the collection owner - The token has no attributes - - If the token has attributes, you can remove the attributes by clicking the **3 vertical dots** (**⋮**) next to the token, followed by "**Attributes**" and selecting "**Remove All"**. + - If the token has attributes, you can remove the attributes by clicking the **3 vertical dots** (**⋮**) next to the token, followed by "**Attributes**" and selecting "**Remove All"**. - The token has 0 supply - - If the token has supply, you can follow the above guide [Burning token's supply](#melting-tokens-supply) to remove all token supply (as long as you own all of the token's supply) + - If the token has supply, you can follow the above guide [Burning token's supply](#melting-tokens-supply) to remove all token supply (as long as you own all of the token's supply) Note - you can remove the supply and destroy the token in the same melt transaction. ::: -Melting a token and destroying it are two different actions. -The action demonstrated above is the action of melting a token, which decreases it's circulating supply. +Melting a token and destroying it are two different actions. +The action demonstrated above is the action of melting a token, which decreases it's circulating supply. While destroying a token removes the token from the blockchain, and retrieves the to the collection owner. To destroy a token, follow the above instructions for Melting a token, but make sure to tick the `Remove Token Storage` box. @@ -82,7 +82,7 @@ To destroy a token, follow the above instructions for Melting a token, but make - If the collection has some tokens, you can follow the above guide [Destroying a token and removing it from the Blockchain](#destroying-a-token-and-removing-it-from-the-blockchain) for each of the tokens in the collection, to destroy them all. ::: -In the Platform menu, navigate to "**[Collections](https://platform.canary.enjin.io/collections)**". +In the Platform menu, navigate to "**[Collections](https://platform.canary.enjin.io/collections)**". **Locate the collection** you wish to destroy, click the **3 vertical dots** (**⋮**) to it's right, then click the "**Destroy**" button. ![Destroying a Collection](/img/guides/managing-tokens/destroying-collection.gif) diff --git a/docs/02-guides/01-platform/01-managing-tokens/09-fetching-token-holders.md b/docs/02-guides/01-platform/01-managing-tokens/09-fetching-token-holders.md index 012f88c..13a5607 100644 --- a/docs/02-guides/01-platform/01-managing-tokens/09-fetching-token-holders.md +++ b/docs/02-guides/01-platform/01-managing-tokens/09-fetching-token-holders.md @@ -21,8 +21,8 @@ Accessing this data is valuable for several purposes: ## Fetching Token Holders with the [Enjin API](/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md) :::warning Fetching Tokens Limitations -Please note that the `GetToken` query is limited to tokens from collections that were created via the auth-ed Enjin Platform account. -To get a token that was created elsewhere (via a different Enjin Platform account / [NFT.io](https://nft.io) / [Enjin Console](https://console.enjin.io) / etc.) the collection must be "Tracked" first, or the query response will return an error. +Please note that the `GetToken` query is limited to tokens from collections that were created via the auth-ed Enjin Platform account. +To get a token that was created elsewhere (via a different Enjin Platform account / [NFT.io](https://nft.io) / [Enjin Console](https://console.enjin.io) / etc.) the collection must be "Tracked" first, or the query response will return an error. Learn more about tracking a collection in the [Tracking Collections section below](#tracking-collections). ::: @@ -348,8 +348,8 @@ The response may be displayed on several pages. To view all of it, you may need ## Fetching Collection Holders with the [Enjin API](/01-getting-started/05-using-enjin-api/05-using-enjin-api.md) :::warning Fetching Collections Limitations -Please note that the `GetCollections` query is limited to collections that were created via the auth-ed Enjin Platform Cloud account. -To get a collection that was created elsewhere (via a different Enjin Platform Cloud account / [NFT.io](https://nft.io) / [Enjin Console](https://console.enjin.io) / etc.) the collection must be "Tracked" first, or the query response will return an error. +Please note that the `GetCollections` query is limited to collections that were created via the auth-ed Enjin Platform Cloud account. +To get a collection that was created elsewhere (via a different Enjin Platform Cloud account / [NFT.io](https://nft.io) / [Enjin Console](https://console.enjin.io) / etc.) the collection must be "Tracked" first, or the query response will return an error. Learn more about tracking a collection in the [Tracking Collections section below](#tracking-collections). ::: diff --git a/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/01-using-wallet-connect.md b/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/01-using-wallet-connect.md index 8f44036..9dd47b8 100644 --- a/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/01-using-wallet-connect.md +++ b/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/01-using-wallet-connect.md @@ -8,13 +8,13 @@ import GlossaryTerm from '@site/src/components/GlossaryTerm'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -[WalletConnect](https://docs.walletconnect.com/) is an open-source protocol that connects your mobile wallet to decentralized applications. +[WalletConnect](https://docs.walletconnect.com/) is an open-source protocol that connects your mobile wallet to decentralized applications. Using the Platform API and WalletConnect you can send any transaction request directly to your user's wallet app. :::info What you'll need: - Node.js 18+ and yarn installed - A mobile device with [Enjin Wallet app](https://enjin.io/wallet) installed -- A Canary wallet with at least 6.5 ENJ in it to cover for and . +- A Canary wallet with at least 6.5 ENJ in it to cover for and . You can obtain cENJ for testing from the [Canary faucet](https://faucet.canary.enjin.io/). - An [Enjin Platform Account](/01-getting-started/04-using-the-enjin-platform.md) (Canary). ::: @@ -25,12 +25,12 @@ On production apps, you will need [WalletConnect's SDK](https://docs.walletconne Start by cloning the polkadot-onboard repository: https://github.com/enjin-forks/polkadot-onboard.git -Once cloned, install the packages, install the workspace, build the workspace, and start the example project. +Once cloned, install the packages, install the workspace, build the workspace, and start the example project. To do that, navigate to the cloned repository folder and run the following commands: :::info **Note:** -The commands below are Bash commands, which are commonly run in a Unix-like environment (such as macOS, or Linux). -Windows users may encounter errors if they try running these commands directly in Command Prompt or PowerShell. +The commands below are Bash commands, which are commonly run in a Unix-like environment (such as macOS, or Linux). +Windows users may encounter errors if they try running these commands directly in Command Prompt or PowerShell. To run them successfully on Windows, use a Bash-compatible terminal, like [Git Bash](https://gitforwindows.org/). ::: @@ -49,7 +49,7 @@ yarn start:react-next Navigate to http://localhost:3000 using your browser. If everything went well, a sample page should load up. :::info Configured Chain -The sample project is set to broadcast transaction on the Canary Matrixchain Testnet. +The sample project is set to broadcast transaction on the Canary Matrixchain Testnet. To configure a different blockchain, you can adjust the `chainIds` in the `examples/react-next/components/ConnectContainer.tsx` file. Chain IDs on Enjin Chains: @@ -61,7 +61,7 @@ Chain IDs on Enjin Chains: ## Connect user's wallet -To send transactions to your user, he must be connected to your dapp. +To send transactions to your user, he must be connected to your dapp. Clicking `Get Wallets`, followed by `Polkadot Demo 2.0`, initiates a connection between your user and your dapp.

@@ -74,8 +74,8 @@ Once the user scans the QR code with his Enjin wallet app (or any other wallet w Approve Connection Request

-Once a connection was made, you'll receive a list of all addresses connected from your user's wallet. -Now you are able to send any transaction request to your user's wallet. +Once a connection was made, you'll receive a list of all addresses connected from your user's wallet. +Now you are able to send any transaction request to your user's wallet. To demonstrate a sample transaction request, click the "**Submit Transaction with Polkadot.JS**" button on one of the displayed addresses.

@@ -94,7 +94,7 @@ In the next section, you'll learn how to construct your own transaction requests ## How to construct a custom transaction? -In the example above, we have sent a request to broadcast a transaction that was already constructed for us. +In the example above, we have sent a request to broadcast a transaction that was already constructed for us. But how was that transaction constructed and how can we send any transaction we want? Let's find out! At `examples/react-next/pages/api`, there's two endpoints we'll be using: @@ -102,7 +102,7 @@ At `examples/react-next/pages/api`, there's two endpoints we'll be using: - `transaction.tsx` endpoint which constructs the transaction - `send.tsx` which broadcasts the transaction request to the blockchain using Enjin Platform API. -First, we need to insert our Enjin platform API key to be able to interact with it. +First, we need to insert our Enjin platform API key to be able to interact with it. If you haven't created an api key yet, you can do so in https://platform.canary.enjin.io/settings. In both `examples/react-next/pages/api/transaction.tsx` and `examples/react-next/pages/api/send.tsx` files, replace `your-api-key` with your api key (note, there's three different api key fields that needs to be updated). @@ -110,8 +110,8 @@ In both `examples/react-next/pages/api/transaction.tsx` and `examples/react-next Once we've configured the Enjin Platform API key, rebuild and restart the project: :::info **Note:** -The commands below are Bash commands, which are commonly run in a Unix-like environment (such as macOS, or Linux). -Windows users may encounter errors if they try running these commands directly in Command Prompt or PowerShell. +The commands below are Bash commands, which are commonly run in a Unix-like environment (such as macOS, or Linux). +Windows users may encounter errors if they try running these commands directly in Command Prompt or PowerShell. To run them successfully on Windows, use a Bash-compatible terminal, like [Git Bash](https://gitforwindows.org/). ::: @@ -120,13 +120,13 @@ yarn build:workspace yarn start:react-next ``` -Now that the project is authenticated with the Enjin Platform, we can go ahead and press the "**Submit Transaction with Platform**" button. -A `CreateCollection` request will be sent to your wallet, and once confirmed, the transaction will be signed and broadcasted to the blockchain. +Now that the project is authenticated with the Enjin Platform, we can go ahead and press the "**Submit Transaction with Platform**" button. +A `CreateCollection` request will be sent to your wallet, and once confirmed, the transaction will be signed and broadcasted to the blockchain. Now it's time to break it down and understand how it works: ### Step #1: Constructing the transaction call -We are constructing the transaction using the `transaction.tsx` endpoint. +We are constructing the transaction using the `transaction.tsx` endpoint. First, we make a query to the user's address to get its nonce: ```javascript @@ -150,7 +150,7 @@ First, we make a query to the user's address to get its nonce: }); ``` -Once we get the nonce, we prepare the `CreateCollection` transaction call using Enjin Platform API. +Once we get the nonce, we prepare the `CreateCollection` transaction call using Enjin Platform API. You can use any other mutation Enjin Platform API offers, but for this example we're using CreateCollection. ```javascript @@ -179,12 +179,12 @@ You can use any other mutation Enjin Platform API offers, but for this example w }); ``` -We are also passing the `signingAccount`. This is necessary so your daemon doesn't sign the transaction. +We are also passing the `signingAccount`. This is necessary so your daemon doesn't sign the transaction. In the mutation response, we're asking for the `id` and `signingPayloadJson`, which we will use in the next step. ### Step #2: Sending the Transaction Request to user's wallet -With the payload in hand we pass that to our WalletConnect signer and ask it to sign. In the example project, this is done at: `examples/react-next/components/AccountBox.tsx` +With the payload in hand we pass that to our WalletConnect signer and ask it to sign. In the example project, this is done at: `examples/react-next/components/AccountBox.tsx` ```javascript const txId = data?.data?.CreateCollection?.id; @@ -196,8 +196,8 @@ The above will trigger the Transaction Request dialog you saw previously, asking ### Step #3: Broadcasting the signed transaction -Finally, we received the `txId`, `signature`, and `payload` from the user's wallet. -We can now broadcast the signed transaction to the blockchain using the Enjin Platform API `SendTransaction` mutation. +Finally, we received the `txId`, `signature`, and `payload` from the user's wallet. +We can now broadcast the signed transaction to the blockchain using the Enjin Platform API `SendTransaction` mutation. This is done at: `examples/react-next/pages/api/send.tsx` ```javascript @@ -221,7 +221,7 @@ This is done at: `examples/react-next/pages/api/send.tsx` }); ``` -The Enjin Platform will broadcast the transaction to the blockchain and keep track of it. +The Enjin Platform will broadcast the transaction to the blockchain and keep track of it. You can see the transaction status in Enjin Platform: https://platform.canary.enjin.io/transactions *** diff --git a/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/02-verifying-wallets.md b/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/02-verifying-wallets.md index a6db0f2..78515b0 100644 --- a/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/02-verifying-wallets.md +++ b/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/02-verifying-wallets.md @@ -459,7 +459,7 @@ print(response.json()) ``` :::info Balances Format -API balances fields are formatted as u128 number type. +API balances fields are formatted as u128 number type. to get decimal value, divide the value by 10^18. ::: diff --git a/docs/02-guides/01-platform/02-managing-users/02-reading-user-wallets.md b/docs/02-guides/01-platform/02-managing-users/02-reading-user-wallets.md index 11baf2b..b475f41 100644 --- a/docs/02-guides/01-platform/02-managing-users/02-reading-user-wallets.md +++ b/docs/02-guides/01-platform/02-managing-users/02-reading-user-wallets.md @@ -7,9 +7,9 @@ description: "Explore how to read user wallet data, providing insights into user import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -Fetching wallets is crucial because it allows you to see the contents of a wallet, including all tokens held within. +Fetching wallets is crucial because it allows you to see the contents of a wallet, including all tokens held within. -This is especially important in gaming and app development as it enables you to assign specific utilities or benefits to certain tokens. +This is especially important in gaming and app development as it enables you to assign specific utilities or benefits to certain tokens. For example, if a user has a particular token in their wallet, they might gain access to exclusive in-game items or features within an app, enhancing the user experience and adding value to the tokens. @@ -244,7 +244,7 @@ print(response.json()) ``` :::info Balances Format -API balances fields are formatted as u128 number type. +API balances fields are formatted as u128 number type. to get decimal value, divide the value by 10^18. ::: diff --git a/docs/02-guides/01-platform/02-managing-users/03-using-managed-wallets.md b/docs/02-guides/01-platform/02-managing-users/03-using-managed-wallets.md index 931b6b3..f6314e5 100644 --- a/docs/02-guides/01-platform/02-managing-users/03-using-managed-wallets.md +++ b/docs/02-guides/01-platform/02-managing-users/03-using-managed-wallets.md @@ -22,7 +22,7 @@ Here's how the typical flow works: This process ensures that users can interact with blockchain assets seamlessly within your application without needing to understand the underlying complexities of blockchain technology or operating his own crypto wallet. :::info What you'll need: -- Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for . +- Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin Matrixchain to pay for . You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://faucet.canary.enjin.io/). - An [Enjin Platform Account](/01-getting-started/04-using-the-enjin-platform.md). - A [Collection](/02-guides/01-platform/01-managing-tokens/01-creating-collections.md) and a [Token](/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md) to add to the wallet. @@ -34,7 +34,7 @@ You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://fa To create a Managed wallet, run the `CreateWallet` mutation, with a unique ID as a parameter. -Choose a unique `externalId` for each player/user that can be cross-referenced later. This unique identifier should be something already associated with the player in your database, such as a player ID or username. +Choose a unique `externalId` for each player/user that can be cross-referenced later. This unique identifier should be something already associated with the player in your database, such as a player ID or username. By doing so, you will be able to consistently link the Managed Wallet to the respective player. @@ -195,7 +195,7 @@ print(response.json()) :::warning Lost database data? -Recreate the Managed wallets by running `CreateWallet` mutation again for each of the `externalId`s. +Recreate the Managed wallets by running `CreateWallet` mutation again for each of the `externalId`s. Make sure to use the same Daemon wallet seed and password used to create Managed wallets prior, as Managed wallets are derived with the following derivation path: `walletSeed/externalId///password` ::: diff --git a/docs/02-guides/01-platform/02-managing-users/04-using-fuel-tanks.md b/docs/02-guides/01-platform/02-managing-users/04-using-fuel-tanks.md index 44adad5..c63eae4 100644 --- a/docs/02-guides/01-platform/02-managing-users/04-using-fuel-tanks.md +++ b/docs/02-guides/01-platform/02-managing-users/04-using-fuel-tanks.md @@ -20,7 +20,7 @@ When dispatching a transaction via a Fuel Tank, the following checks must pass: - The Fuel Tank allows dispatching this transaction. :::info What you'll need: -- Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin / Canary Matrixchain to pay for , and for funding the tank. +- Some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) on Enjin / Canary Matrixchain to pay for , and for funding the tank. You can obtain cENJ (Canary ENJ) for testing from the [Canary faucet](https://faucet.canary.enjin.io/). - An [Enjin Platform Account](/01-getting-started/04-using-the-enjin-platform.md). ::: @@ -80,7 +80,7 @@ By default, only the Fuel Tank owner has the permission to add accounts to the F ### Coverage Policy -By default, the fuel tank will subsidize only . +By default, the fuel tank will subsidize only . To cover both and any the dispatched call may require, set the Coverage Policy to `FEES_AND_DEPOSIT` ## Creating Fuel Tanks @@ -88,7 +88,7 @@ To cover both and any s From A Certain Collection :::warning Upcoming Feature Notice: `WhitelistedPallets` Option -The `WhitelistedPallets` argument is not yet supported on the Enjin Platform. -The following code snippet is provided for illustrative purposes only. -If you wish to create a fuel tank with this option now, please use the Enjin Console at [console.enjin.io](https://console.enjin.io). +The `WhitelistedPallets` argument is not yet supported on the Enjin Platform. +The following code snippet is provided for illustrative purposes only. +If you wish to create a fuel tank with this option now, please use the Enjin Console at [console.enjin.io](https://console.enjin.io). We will update the documentation once this option is available. ::: @@ -539,9 +539,9 @@ print(response.json()) The following mutation will set up a fuel tank that subsidizes any transaction, the tank is allowed to subsidize up to 5 ENJ per 30 days for each User Account in the tank, which can be created only if the account is within the whitelisted callers list. :::warning Upcoming Feature Notice: `requireAccount` Option -The `requireAccount` argument is not yet supported on the Enjin Platform. -The following code snippet is provided for illustrative purposes only. -If you wish to create a fuel tank with this option now, please use the Enjin Console at [console.enjin.io](https://console.enjin.io). +The `requireAccount` argument is not yet supported on the Enjin Platform. +The following code snippet is provided for illustrative purposes only. +If you wish to create a fuel tank with this option now, please use the Enjin Console at [console.enjin.io](https://console.enjin.io). We will update the documentation once this option is available. ::: @@ -806,7 +806,7 @@ If you need help figuring out the best fuel tank to use for a transaction, check ### Step #1: Prepare The Mutation -First, prepare the mutation you wish to dispatch, with the `id` and `encodedData` fields in the response. +First, prepare the mutation you wish to dispatch, with the `id` and `encodedData` fields in the response. In this example, we'll dispatch a call to send a from one account to another: :::danger Ask for the `id` and `encodedData` fields! @@ -1032,8 +1032,8 @@ print(response.json()) Once the mutation is sent, signed and broadcasted, If the transaction is eligible, the fuel tank will subsidize the transaction fees; otherwise, the transaction will fail. :::info Need to broadcast from Managed Wallet? -To broadcast the transaction from a managed wallet account, add the `signingAccount` argument as instructed in the [Using Managed Wallets](/02-guides/01-platform/02-managing-users/03-using-managed-wallets.md#transferring-tokens-from-managed-wallets) page. -It's important to note that the `signingAccount` argument should be added on the `Dispatch` mutation level, and **NOT** in the dispatch argument. +To broadcast the transaction from a managed wallet account, add the `signingAccount` argument as instructed in the [Using Managed Wallets](/02-guides/01-platform/02-managing-users/03-using-managed-wallets.md#transferring-tokens-from-managed-wallets) page. +It's important to note that the `signingAccount` argument should be added on the `Dispatch` mutation level, and **NOT** in the dispatch argument. In the above example, to transfer the token from a managed wallet via a fuel tank: ```graphql diff --git a/docs/02-guides/01-platform/03-advanced-mechanics/01-tokenid-structure.md b/docs/02-guides/01-platform/03-advanced-mechanics/01-tokenid-structure.md index 1a7aacf..1b01b7d 100644 --- a/docs/02-guides/01-platform/03-advanced-mechanics/01-tokenid-structure.md +++ b/docs/02-guides/01-platform/03-advanced-mechanics/01-tokenid-structure.md @@ -5,7 +5,7 @@ description: "Learn about the Enjin TokenID structure, its format, and how to ut --- # Token ID Structure -Token IDs in a collection serve as unique identifiers for tokens, represented as 128-bit integers. Beyond their primary role, token IDs can also store structured information about a token's attributes, providing greater organizational flexibility. +Token IDs in a collection serve as unique identifiers for tokens, represented as 128-bit integers. Beyond their primary role, token IDs can also store structured information about a token's attributes, providing greater organizational flexibility. This guide outlines recommended approaches for structuring and organizing token IDs, as well as the four encoding options available on the Enjin Platform: **ERC1155**, **Hash**, **StringId**, and **Integer** (no encoding). @@ -24,20 +24,20 @@ There are 4 key methods for Token ID organization: ### 1. **Bitmasks** -Bitmasks allocate specific bits of the 128-bit token ID to various attributes, such as **game**, **server**, **class**, and **item ID**. Each section of the token ID is defined by the bit size required for that attribute, ensuring efficient use of space. +Bitmasks allocate specific bits of the 128-bit token ID to various attributes, such as **game**, **server**, **class**, and **item ID**. Each section of the token ID is defined by the bit size required for that attribute, ensuring efficient use of space. For example: -- **Game ID**: 4 bits (up to 16 games) -- **Server ID**: 8 bits (up to 256 servers) -- **Class ID**: 16 bits (up to 65,536 classes) -- **Item ID**: Remaining 100 bits +- **Game ID**: 4 bits (up to 16 games) +- **Server ID**: 8 bits (up to 256 servers) +- **Class ID**: 16 bits (up to 65,536 classes) +- **Item ID**: Remaining 100 bits -If you create a token with the ID `0x05ffa34f000000000000000000000001`, it can be decoded as: +If you create a token with the ID `0x05ffa34f000000000000000000000001`, it can be decoded as: -- **Game ID**: `05` (Game 5) -- **Server ID**: `ff` (Server 255) -- **Class ID**: `a34f` (Sword) +- **Game ID**: `05` (Game 5) +- **Server ID**: `ff` (Server 255) +- **Class ID**: `a34f` (Sword) - **Item ID**: `1` This method is compact but requires encoding and decoding logic. @@ -46,22 +46,22 @@ This method is compact but requires encoding and decoding logic. ### 2. **Ranges** -Ranges define numeric intervals for each category, making the structure simpler to understand and decode. +Ranges define numeric intervals for each category, making the structure simpler to understand and decode. for example: -- **Game 01**: Token IDs 0–1000 - - **Server 01**: 0–300 - - **Class A**: 0–20 - - **Class B**: 20–40 - - **Server 02**: 300–600 +- **Game 01**: Token IDs 0–1000 + - **Server 01**: 0–300 + - **Class A**: 0–20 + - **Class B**: 20–40 + - **Server 02**: 300–600 -Token ID `325` maps to: +Token ID `325` maps to: -- **Game ID**: `01` -- **Server ID**: `02` -- **Class ID**: `B` -- **Item ID**: `5` +- **Game ID**: `01` +- **Server ID**: `02` +- **Class ID**: `B` +- **Item ID**: `5` This approach is intuitive but may require manual configuration of ID ranges. @@ -181,8 +181,8 @@ This approach is simple and requires no encoding or decoding. ### Considerations: -- **Ease of Use**: Use Integers or ranges for simplicity. -- **Scalability**: Bitmasks and hashes work best for large collections with many attributes. +- **Ease of Use**: Use Integers or ranges for simplicity. +- **Scalability**: Bitmasks and hashes work best for large collections with many attributes. - **Interoperability**: Use the ERC1155 encoder for compatibility with Ethereum-based assets. By understanding these methods and tools, you can design token ID structures that best suit your project's needs while ensuring flexibility and scalability. 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 e7d0b9b..a9c9ea4 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 @@ -5,8 +5,8 @@ description: "View detailed examples of how to implement metadata within your bl --- 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. -For example, to set the token's description individually, set the token's on-chain attribute key to `description`, and provide the description as the attribute's value. +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. +For example, to set the token's description individually, set the token's on-chain attribute key to `description`, and provide the description as the attribute's value. If both on-chain and off-chain attributes are set, the on-chain attributes will take precedence over the off-chain attributes. :::warning **Important:** Attribute keys are case sensitive. @@ -89,7 +89,7 @@ Ensure you use the correct casing when defining attributes to avoid errors. - On the Enjin Wallet and NFT.io marketplace, when more than one media file is provided, the media is scrollable. - `fallback_image`: A link to an alternative image file that serves as a backup when the media files listed under `media` fail to load or are unsupported in certain views. - Best Practice: Use an image hosted on a different server to ensure availability in case of server downtime. - - The `fallback_image` is also helpful for views that do not support the primary media file. + - The `fallback_image` is also helpful for views that do not support the primary media file. Example: If the main media file is a 3D object (e.g., GLB), a fallback image can be displayed in views that lack 3D rendering support. - `attributes`: A list of custom properties attached to the token. In the above example, it's used as an indicator of the item's common rarity and a list of games it's usable in. - `external_url`: A link to the token's website or a website with information on the token. diff --git a/docs/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/02-metadata-standard.md b/docs/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/02-metadata-standard.md index dbd6320..b241fa5 100644 --- a/docs/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/02-metadata-standard.md +++ b/docs/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/02-metadata-standard.md @@ -5,12 +5,12 @@ description: "Explore Enjin’s metadata standards, enabling you to define the c --- ## Best Practices for Collection/Token Metadata -Metadata plays a vital role in the token ecosystem. It provides necessary details about a token and ensures that tokens are presented correctly across various applications. +Metadata plays a vital role in the token ecosystem. It provides necessary details about a token and ensures that tokens are presented correctly across various applications. To maintain consistency and ensure universal compatibility, it's important to adhere to a specific standard for metadata. ### Why Follow a Metadata Standard? -Following a standard for metadata ensures that token details are accurately represented across all applications that support the standard. This eliminates inconsistencies and ensures that your tokens are presented in the way you intended. +Following a standard for metadata ensures that token details are accurately represented across all applications that support the standard. This eliminates inconsistencies and ensures that your tokens are presented in the way you intended. Adhering to a standard also simplifies the process for application developers, as they can easily support tokens that follow the standard. This contributes to the goal of creating a truly interoperable Metaverse. @@ -28,8 +28,8 @@ Ensure you use the correct casing when defining attributes to avoid errors. There are two ways to create metadata for your tokens: -1. **Off-chain - Hosted JSON File:** Set the collection or token attribute with the key `uri` and the value as a URL to a off-chain hosted JSON file. This file can be hosted either in a centralized manner or on IPFS. - The JSON file should contain metadata that follows the structure defined in the metadata standard. +1. **Off-chain - Hosted JSON File:** Set the collection or token attribute with the key `uri` and the value as a URL to a off-chain hosted JSON file. This file can be hosted either in a centralized manner or on IPFS. + The JSON file should contain metadata that follows the structure defined in the metadata standard. Example: ```graphql mutation SetMetadataUsingJSON { @@ -50,7 +50,7 @@ There are two ways to create metadata for your tokens: } ``` -2. **On-chain - Directly Setting Metadata:** Set the metadata directly on-chain using a structure that follows the metadata standard. +2. **On-chain - Directly Setting Metadata:** Set the metadata directly on-chain using a structure that follows the metadata standard. Example: ```graphql mutation SetMetadataDirectly { @@ -75,18 +75,18 @@ There are two ways to create metadata for your tokens: } ``` -Whichever method you choose, it's crucial to ensure the metadata is structured according to the standard to maintain compatibility and present your tokens correctly. +Whichever method you choose, it's crucial to ensure the metadata is structured according to the standard to maintain compatibility and present your tokens correctly. For a detailed guide on adding metadata, please refer to our [Adding Metadata Tutorial](/02-guides/01-platform/01-managing-tokens/03-adding-metadata.md). ### Dynamic Metadata Fetching -When an application such as [Enjin wallet](https://enj.in/wallet) / [NFT.io](https://nft.io) loads token metadata, it starts by looking for the `uri` attribute on the token level. +When an application such as [Enjin wallet](https://enj.in/wallet) / [NFT.io](https://nft.io) loads token metadata, it starts by looking for the `uri` attribute on the token level. If there’s no `uri` on the token level, it then looks for the `uri` attribute on the collection level. While each token could have it’s own uri attribute, It is sometimes more convenient, and efficient, to use Dynamic Metadata. -For Dynamic Metadata fetching, the metadata doesn't exist on each token. -Instead, one `uri` attribute is set on the collection level, with the dynamic keyword `{id}.json`. +For Dynamic Metadata fetching, the metadata doesn't exist on each token. +Instead, one `uri` attribute is set on the collection level, with the dynamic keyword `{id}.json`. For example: `https://yourdomain.com/{id}.json` When fetching a token dynamically, the `{id}` is replaced with the collection ID, followed by the token ID, like this: https://yourdomain.com/8143-72.json. diff --git a/docs/02-guides/01-platform/03-advanced-mechanics/03-enforced-rarity.md b/docs/02-guides/01-platform/03-advanced-mechanics/03-enforced-rarity.md index e93a06d..7824cda 100644 --- a/docs/02-guides/01-platform/03-advanced-mechanics/03-enforced-rarity.md +++ b/docs/02-guides/01-platform/03-advanced-mechanics/03-enforced-rarity.md @@ -20,12 +20,12 @@ Meanwhile, setting the "**Max Token Supply**" to `1` ensures that each token in ## Immutable Tokenomics -Suppose you want to create a with one simple but crucial rule: Each token has a pre-defined max supply which can only be decreased. +Suppose you want to create a with one simple but crucial rule: Each token has a pre-defined max supply which can only be decreased. Achieving this requires careful configuration of your Mint Policy:

Enforced Collapsable Supply

-By toggling the "**Force Collapsing Supply**", you ensure that each token in the collection will be of collapsing supply type. +By toggling the "**Force Collapsing Supply**", you ensure that each token in the collection will be of collapsing supply type. This guarantees the immutability of each token's maximum supply in the collection, maintaining its value and scarcity over time. diff --git a/docs/02-guides/01-platform/03-advanced-mechanics/04-brand-collab-nfts.md b/docs/02-guides/01-platform/03-advanced-mechanics/04-brand-collab-nfts.md index 462cdf5..75f6b49 100644 --- a/docs/02-guides/01-platform/03-advanced-mechanics/04-brand-collab-nfts.md +++ b/docs/02-guides/01-platform/03-advanced-mechanics/04-brand-collab-nfts.md @@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'; :::info Co-Authored by [SamTheBay](https://twitter.com/SamTheBay) Sam is the Founder of [Etherscape](https://www.etherscape.io/), a multiplayer RPG with some of the most innovative Web3 game design elements in the industry. -[Reach out to Sam on Discord](https://discord.gg/NXwWehg89p) for partnership and collaboration opportunities. +[Reach out to Sam on Discord](https://discord.gg/NXwWehg89p) for partnership and collaboration opportunities. You can see examples of Brand Integrations in [Etherscape's whitepaper](https://whitepaper.etherscape.io/CryptoIntegration/multiverse-support/collaborations). ::: @@ -174,24 +174,24 @@ Here’s an example of a response you can expect. In order to implement any token in game you will need to sync a list of token ids that your player has in their wallet. In the most simple case, you only need to sync tokens from a single collection (likely the main collection associated with your game). However, in multiverse cases, you will now need to sync tokens from multiple collections. There are a couple of options to achieve this. -1. Sync All Tokens +1. Sync All Tokens The first approach is to sync all the tokens in the players wallet across all collections. This makes the graphQL query very simple. However, with this approach you need to bear in mind that some wallets will have thousands of tokens in them (and could grow to even hundreds of thousands). This means that you can’t rely on syncing all the wallets tokens in a single call. You will need to make sure to implement proper pagination using the GraphQL API’s so that you can read out the tokens in many batches. -2. Sync Specific Collections Only +2. Sync Specific Collections Only Another approach is to only sync the collections you care about. This will limit the total number of tokens that you need to sync. In your GraphQL query you can specify a list of collection and token ids in order to narrow down the range. Depending on your case, you may still want to handle pagination of calls if any of the collections you include have a large number of tokens. ### Syncing Metadata When implementing multiverse items you will want to think about how you will represent them in game. This generally means that you are going to want to provide metadata and media for them. Below are a few options for your consideration. -1. Static Metadata +1. Static Metadata If you already know exactly what you want the token to do in your game and it won’t change then you can essentially hard code it. In this case, there is no need to read the metadata from the chain or from an external source. If the group and id match your intention then you can give it the in game visuals and utility that you want. -2. External Sources +2. External Sources The most common practice is to store metadata off-chain at an external url. This is especially true for any media content such as images, videos, 3d models and audio. If you want to leverage this metadata then you will need to make calls to the URI that hosts it in order to download it. When doing that, you will want to consider the following… 1. Make sure the calls are asynchronous. The external calls will take time and you don’t want them to impact your games frame rate. 2. You probably want to cache any media locally on the drive. The URI you are downloading from could be slow, unreliable or throttle you. As a result, you will want to avoid reading it more often than necessary. :::tip Metadata Management -Note that if you’re adopting another game’s token, you may not want to use all the metadata that is provided. For example, if you are making a 2D game you might want to create your own sprite to represent it instead of using a stylistic image that doesn’t suit your game. For example, this is how the ForgeHammer is represented in Etherscape - a 2D pixel-art game. +Note that if you’re adopting another game’s token, you may not want to use all the metadata that is provided. For example, if you are making a 2D game you might want to create your own sprite to represent it instead of using a stylistic image that doesn’t suit your game. For example, this is how the ForgeHammer is represented in Etherscape - a 2D pixel-art game.

Adjust the item's art style to fit your game

diff --git a/docs/02-guides/01-platform/03-advanced-mechanics/05-enj-infusion.md b/docs/02-guides/01-platform/03-advanced-mechanics/05-enj-infusion.md index 0849414..946ebbd 100644 --- a/docs/02-guides/01-platform/03-advanced-mechanics/05-enj-infusion.md +++ b/docs/02-guides/01-platform/03-advanced-mechanics/05-enj-infusion.md @@ -35,7 +35,7 @@ By integrating ENJ Infusion, creators and developers can provide enhanced value ## Creating a Token with Infused ENJ -To create a token with Infused ENJ, proceed with the instructions on the [Creating Tokens](/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md) page, but make sure to specify the amount of ENJ to infuse into the token, in the “Infuse ENJ” section. +To create a token with Infused ENJ, proceed with the instructions on the [Creating Tokens](/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md) page, but make sure to specify the amount of ENJ to infuse into the token, in the “Infuse ENJ” section. If you are using the `CreateToken` mutation, insert the infusion amount in the `params: infusion` parameter. :::warning Important Note @@ -47,12 +47,12 @@ e.g.: to infuse a token with 5 ENJ, the infusion argument should be set to `5000 By default, ENJ infusion is restricted only to the collection owner -At any time, as well as at the time of creating the token, the collection owner can select to to allow anyone to add ENJ infusion to the token. -This can be done with the `CreateToken` mutation by setting the `params: anyoneCanInfuse` parameter to `true`. +At any time, as well as at the time of creating the token, the collection owner can select to to allow anyone to add ENJ infusion to the token. +This can be done with the `CreateToken` mutation by setting the `params: anyoneCanInfuse` parameter to `true`. If the token is already created, the `anyoneCanInfuse` state can be adjusted via the `MutateToken` mutation, with the `mutation: anyoneCanInfuse` parameter. :::warning **Feature Availability Notice** -Currently, the `anyoneCanInfuse` state can only be configured at the time of creating the token. The option to adjust the infusion permission for an existing token via a mutation will be added later on. We will update the documentation once this feature is available. +Currently, the `anyoneCanInfuse` state can only be configured at the time of creating the token. The option to adjust the infusion permission for an existing token via a mutation will be added later on. We will update the documentation once this feature is available. In the meantime, if you wish to adjust infusion permission of an existing token now, please use the Enjin Console at [console.enjin.io](https://console.enjin.io). ::: @@ -61,7 +61,7 @@ In the meantime, if you wish to adjust infusion permission of an existing token To add ENJ infusion to a token that already exists, use the `Infuse` mutation: :::warning Important Note -The `amount` argument is denoted in `u128`. This means that the number you specify is divided by 10^18 to determine the actual amount of ENJ to be infused. +The `amount` argument is denoted in `u128`. This means that the number you specify is divided by 10^18 to determine the actual amount of ENJ to be infused. e.g.: to infuse a token with 5 ENJ, the infusion argument should be set to `5000000000000000000`, which is `5*(10^18)`. ::: diff --git a/docs/02-guides/01-platform/03-advanced-mechanics/06-the-multiverse.md b/docs/02-guides/01-platform/03-advanced-mechanics/06-the-multiverse.md index 13594c2..62f9571 100644 --- a/docs/02-guides/01-platform/03-advanced-mechanics/06-the-multiverse.md +++ b/docs/02-guides/01-platform/03-advanced-mechanics/06-the-multiverse.md @@ -30,7 +30,7 @@ This cycle—driven by consistent player engagement, developer involvement, and ## Using the Primythical Chest to Acquire Players -The is an infinite supply promotional tool and Enjin's primary funnel for onboarding new players into your game. +The is an infinite supply promotional tool and Enjin's primary funnel for onboarding new players into your game. Enjin is giving away this item for free, then educating players on where they can use it. @@ -63,7 +63,7 @@ Multiverse Items are designed as powerful tokens with service = PusherEventService::Builder()
-:::tip +:::tip If you wish to change the key (websocket), you can do so in the platform config files. ::: diff --git a/docs/02-guides/01-platform/04-software-development-kit/03-platform-events.md b/docs/02-guides/01-platform/04-software-development-kit/03-platform-events.md index 82cb54e..9157055 100644 --- a/docs/02-guides/01-platform/04-software-development-kit/03-platform-events.md +++ b/docs/02-guides/01-platform/04-software-development-kit/03-platform-events.md @@ -52,7 +52,7 @@ public: const string& eventName = evt.GetEventName(); const string& channelName = evt.GetChannelName(); const string& message = evt.GetMessage(); - + /* Handle event */ } }; diff --git a/docs/02-guides/01-platform/06-enjin-discord-bot.md b/docs/02-guides/01-platform/06-enjin-discord-bot.md index e3500f7..331e922 100644 --- a/docs/02-guides/01-platform/06-enjin-discord-bot.md +++ b/docs/02-guides/01-platform/06-enjin-discord-bot.md @@ -15,9 +15,9 @@ Head over to this page to add the Enjin Bot to your discord server: https://enj. ## Step #2: Grant the Enjin Bot permissions -Navigate to "**Server Settings**" within your Discord server, and select "**Roles**". -For the Enjin Bot to be able to assign roles to users, it must be positioned higher in the hierarchy than all the roles it is intended to assign. -In the roles list, locate the Enjin Bot and drag it **above** the roles it will be managing. +Navigate to "**Server Settings**" within your Discord server, and select "**Roles**". +For the Enjin Bot to be able to assign roles to users, it must be positioned higher in the hierarchy than all the roles it is intended to assign. +In the roles list, locate the Enjin Bot and drag it **above** the roles it will be managing. Make sure to save the changes by clicking the "**Save Changes**" button. ![Setting up the Enjin Discord Bot - Configuring Roles Permissions](/img/guides/integrations/discord-roles-permissions.gif) @@ -25,9 +25,9 @@ Make sure to save the changes by clicking the "**Save Changes**" button. ## Step #3: Setup the role assignment configurations -To configure the role assignment, you will need to enter the specific collection IDs that the Enjin Bot will use to assign roles. +To configure the role assignment, you will need to enter the specific collection IDs that the Enjin Bot will use to assign roles. -In your Discord server, type `/setup ` or type `/` and select the `/setup` command. You will be prompted to enter the collection ID, and two optional fields `asset` ID and `balance` (which can be viewed by pressing the 'Tab' button) to assign role based on token holdings. +In your Discord server, type `/setup ` or type `/` and select the `/setup` command. You will be prompted to enter the collection ID, and two optional fields `asset` ID and `balance` (which can be viewed by pressing the 'Tab' button) to assign role based on token holdings. These IDs correspond to the collection / asset that users must own in order to be assigned certain roles. You can find the collection IDs by visiting [NFT.io](https://nft.io) and selecting the specific collection. The collection ID is located next to the collection name or in the token's details, where you can also find the token ID. @@ -39,7 +39,7 @@ The bot will then prompt you to select which roles to assign - Select the roles ![Setting up the Enjin Discord Bot - Running the Setup Command](/img/guides/integrations/discord-running-setup-command.gif) :::tip Did you know? -You can assign different roles based on token amount holdings. +You can assign different roles based on token amount holdings. e.g. `Enjineer` role if owning at least 1 Blobby token, and `Gamer` role if owning at least 10 Blobby tokens. ::: diff --git a/docs/02-guides/02-blockchain/01-relaychain/03-creating-nomination-pools.md b/docs/02-guides/02-blockchain/01-relaychain/03-creating-nomination-pools.md index ec735c8..03b7106 100644 --- a/docs/02-guides/02-blockchain/01-relaychain/03-creating-nomination-pools.md +++ b/docs/02-guides/02-blockchain/01-relaychain/03-creating-nomination-pools.md @@ -36,7 +36,7 @@ Important to keep in mind: ## Creation parameters -It's worth noting that `tokenId` is the ID of the Degen NFT you hold. `PoolId` may or may not match the `tokenId`, this wont change anything, but is worth keeping in mind. `Duration` is defined in `eras`, where `1 era = 24 hours` on Enjin Relaychain, and minimum value is set at `30 eras`. `Capacity` is the maximum amount of [sENJ](/04-enjin-blockchain/02-enjin-relaychain/01-validator-staking.md#tokens-overview) that can be staked in the pool. The maximum Capacity is determined by the Degen's token `max_pool_capacity` attribute. +It's worth noting that `tokenId` is the ID of the Degen NFT you hold. `PoolId` may or may not match the `tokenId`, this wont change anything, but is worth keeping in mind. `Duration` is defined in `eras`, where `1 era = 24 hours` on Enjin Relaychain, and minimum value is set at `30 eras`. `Capacity` is the maximum amount of [sENJ](/04-enjin-blockchain/02-enjin-relaychain/01-validator-staking.md#tokens-overview) that can be staked in the pool. The maximum Capacity is determined by the Degen's token `max_pool_capacity` attribute. Note that this is sENJ, not ENJ. To learn more about the difference, [check out the Validator Staking page](/04-enjin-blockchain/02-enjin-relaychain/01-validator-staking.md). ![](/img/components/enjin-relaychain/12.png) diff --git a/docs/02-guides/02-blockchain/02-running-nodes/01-enjin-blockchain-nodes/01-enjin-blockchain-nodes.md b/docs/02-guides/02-blockchain/02-running-nodes/01-enjin-blockchain-nodes/01-enjin-blockchain-nodes.md index 31a8625..b4865bd 100644 --- a/docs/02-guides/02-blockchain/02-running-nodes/01-enjin-blockchain-nodes/01-enjin-blockchain-nodes.md +++ b/docs/02-guides/02-blockchain/02-running-nodes/01-enjin-blockchain-nodes/01-enjin-blockchain-nodes.md @@ -27,7 +27,7 @@ An archive node stores the complete history of the network and is typically used ## Network Participation -Users can earn rewards by running a collator node to participate in the Enjin network. However, it's essential to understand that collators do not secure the network. In Enjin, PoA (Proof of Authority) consensus is used, and block producers or collators are chosen from the list of authorized validators. More collators do not necessarily mean a better or more secure network since Relaychain validators will reject an invalid Matrixchain block. +Users can earn rewards by running a collator node to participate in the Enjin network. However, it's essential to understand that collators do not secure the network. In Enjin, PoA (Proof of Authority) consensus is used, and block producers or collators are chosen from the list of authorized validators. More collators do not necessarily mean a better or more secure network since Relaychain validators will reject an invalid Matrixchain block. Having too many collators can also slow down the network. The only power that collators possess is transaction censorship. To avoid censorship, a Matrixchain must have some neutral collators, but not necessarily a majority. In theory, the censorship problem can be solved by having only one honest collator. ## Staking @@ -36,9 +36,9 @@ The management of collators on the Enjin Matrixchain is handled by the collator ## Rewards -The formula for calculating the block reward is: -reward = `blocks_authored_by_collator \* reward_per_block` -where `reward_per_block = total_reward_per_session / total_blocks_in_session` +The formula for calculating the block reward is: +reward = `blocks_authored_by_collator \* reward_per_block` +where `reward_per_block = total_reward_per_session / total_blocks_in_session` The rewards are then distributed depending on the type of collator: - Invulnerable Collators: the fees are transferred back to the fee distribution account diff --git a/docs/02-guides/02-blockchain/02-running-nodes/01-enjin-blockchain-nodes/02-run-relaychain-node.md b/docs/02-guides/02-blockchain/02-running-nodes/01-enjin-blockchain-nodes/02-run-relaychain-node.md index 5398ac7..cfe834a 100644 --- a/docs/02-guides/02-blockchain/02-running-nodes/01-enjin-blockchain-nodes/02-run-relaychain-node.md +++ b/docs/02-guides/02-blockchain/02-running-nodes/01-enjin-blockchain-nodes/02-run-relaychain-node.md @@ -13,7 +13,7 @@ Then set the permission for it using `sudo chown -R 1000:1000 /data` ## Docker :::info -The Docker Image can be found on Docker Hub at: [enjin/relaychain](https://hub.docker.com/r/enjin/relaychain). +The Docker Image can be found on Docker Hub at: [enjin/relaychain](https://hub.docker.com/r/enjin/relaychain). In this example, we demonstrate using the version `latest`. However, in practice, we recommend statically setting this to a specific version (such as `v100`) and then performing manual upgrades to your nodes as and when appropriate. This is to ensure that your node doesn't inadvertently differ from one restart to the next. See the [Upgrading using Docker](#upgrading-using-docker) section for more information. You can use the following `docker-compose.yml` file: @@ -67,13 +67,13 @@ This should be appended after line 19 in the `docker-compose.yml` file, or at th ## Upgrading :::info It is not always possible to downgrade a node. -In the event the node incurred a database upgrade, it is no longer possible to downgrade the node to an older version without first re-syncing the node. +In the event the node incurred a database upgrade, it is no longer possible to downgrade the node to an older version without first re-syncing the node. -Additionally, in the event an on-chain upgrade has been enacted that requires a newer node minimum version, it will not be possible to downgrade below that version as new blocks following the upgrade will fail to import. +Additionally, in the event an on-chain upgrade has been enacted that requires a newer node minimum version, it will not be possible to downgrade below that version as new blocks following the upgrade will fail to import. **Always keep your node version up-to-date.** ::: -In order to ensure compatibility with the chain at all times, and to ensure the best security, it is imperative that node operators keep their nodes up-to-date with each release that is published. The process of upgrading is incredibly simple, and in almost all cases, requires very little involvement by the node operator. This is because, the node will automatically detect when it's using an older version of the database and automatically upgrade it to the latest one that is compatible with the +In order to ensure compatibility with the chain at all times, and to ensure the best security, it is imperative that node operators keep their nodes up-to-date with each release that is published. The process of upgrading is incredibly simple, and in almost all cases, requires very little involvement by the node operator. This is because, the node will automatically detect when it's using an older version of the database and automatically upgrade it to the latest one that is compatible with the We recommend that node operators subscribe to our mailing list [mailing-list-node-operators@enjin.io](https://groups.google.com/a/enjin.io/g/mailing-list-node-operators) in order to be informed when we publish a new node version. However, for those who don't want to subscribe, you can query our [Docker Hub repository](https://hub.docker.com/r/enjin/relaychain/tags) to check for new versions. All versions are automatically pushed to Docker Hub, so you will always be able to find the latest version there. @@ -82,11 +82,11 @@ We recommend that node operators subscribe to our mailing list [mailing-list-nod Open your `docker-compose.yml` in a text editor and locate the `image` line, in the below example it is line 4: ```yaml -services: - relaychain: - container_name: relaychain +services: + relaychain: + container_name: relaychain image: enjin/relaychain:latest # <-- this line - ports: + ports: - ... ``` @@ -95,12 +95,12 @@ If you are using the version `latest` (as in the above example), simply restarti For example, if you are running `enjin/relaychain:v100` and the latest version is `enjin/relaychain:v200` you would simply need to make the following change: ```yaml -services: - relaychain: - container_name: relaychain +services: + relaychain: + container_name: relaychain + image: enjin/relaychain:v200 # add this line - image: enjin/relaychain:v100 # remove this line - ports: + ports: - ... ``` @@ -112,7 +112,7 @@ Simply download the latest binary and run it as you have always done as per the #### Upgrading from Source -If you are upgrading based on a build you've produced from the source code, you must navigate to the directory containing the source code in a terminal. Once you have built the binary, simply follow the instruction [Upgrading using Binary](/02-guides/02-blockchain/02-running-nodes/01-enjin-blockchain-nodes/02-run-relaychain-node.md#upgrading-using-binary) to complete the upgrade. +If you are upgrading based on a build you've produced from the source code, you must navigate to the directory containing the source code in a terminal. Once you have built the binary, simply follow the instruction [Upgrading using Binary](/02-guides/02-blockchain/02-running-nodes/01-enjin-blockchain-nodes/02-run-relaychain-node.md#upgrading-using-binary) to complete the upgrade. ##### Git-cloned Repository diff --git a/docs/02-guides/02-blockchain/02-running-nodes/01-enjin-blockchain-nodes/03-run-matrixchain-node.md b/docs/02-guides/02-blockchain/02-running-nodes/01-enjin-blockchain-nodes/03-run-matrixchain-node.md index e5972b5..c4dc4a5 100644 --- a/docs/02-guides/02-blockchain/02-running-nodes/01-enjin-blockchain-nodes/03-run-matrixchain-node.md +++ b/docs/02-guides/02-blockchain/02-running-nodes/01-enjin-blockchain-nodes/03-run-matrixchain-node.md @@ -11,7 +11,7 @@ This guide will be updated once that option is available. ## Docker :::info -The Docker Image can be found on Docker Hub at: [enjin/matrixchain](https://hub.docker.com/r/enjin/matrixchain) +The Docker Image can be found on Docker Hub at: [enjin/matrixchain](https://hub.docker.com/r/enjin/matrixchain) In this example, we demonstrate using the version `latest`. However, in practice, we recommend statically setting this to a specific version (such as `v100`) and then performing manual upgrades to your nodes as and when appropriate. This is to ensure that your node doesn't inadvertently differ from one restart to the next. See the [Upgrading using Docker](#upgrading-using-docker) section for more information. ::: @@ -30,16 +30,16 @@ services: volumes: - /MY/LOCAL/DIRECTORY:/chainstate command: [ - "--name=enjin-matrix-docker", - "--rpc-external", - "--rpc-cors=all", - "--chain=mainnet", - "--base-path=/chainstate", - "--", - "--name=enjin-matrix-docker", - "--port=30334", - "--chain=enjin", - "--base-path=/chainstate" + "--name=enjin-matrix-docker", + "--rpc-external", + "--rpc-cors=all", + "--chain=mainnet", + "--base-path=/chainstate", + "--", + "--name=enjin-matrix-docker", + "--port=30334", + "--chain=enjin", + "--base-path=/chainstate" ] ``` @@ -50,7 +50,7 @@ Simply run the command `docker-compose up -d` to run the container. ### Command ```bash -$ ./matrix --name "enjin-matrix-docker" --rpc-external --chain mainnet +$ ./matrix --name "enjin-matrix-docker" --rpc-external --chain mainnet -- --name="enjin-matrix-docker" --port 30334 --chain enjin ``` @@ -74,11 +74,11 @@ These two arguments should be appended after line 19 in the `docker-compose.yml` :::warning It is not always possible to downgrade a node. In the event the node incurred a database upgrade, it is no longer possible to downgrade the node to an older version without first re-syncing the node. -Additionally, in the event an on-chain upgrade has been enacted that requires a newer node minimum version, it will not be possible to downgrade below that version as new blocks following the upgrade will fail to import. +Additionally, in the event an on-chain upgrade has been enacted that requires a newer node minimum version, it will not be possible to downgrade below that version as new blocks following the upgrade will fail to import. **Always keep your node version up-to-date.** ::: -In order to ensure compatibility with the chain at all times, and to ensure the best security, it is imperative that node operators keep their nodes up-to-date with each release that is published. The process of upgrading is incredibly simple, and in almost all cases, requires very little involvement by the node operator. This is because, the node will automatically detect when it's using an older version of the database and automatically upgrade it to the latest one that is compatible with the +In order to ensure compatibility with the chain at all times, and to ensure the best security, it is imperative that node operators keep their nodes up-to-date with each release that is published. The process of upgrading is incredibly simple, and in almost all cases, requires very little involvement by the node operator. This is because, the node will automatically detect when it's using an older version of the database and automatically upgrade it to the latest one that is compatible with the We recommend that node operators subscribe to our mailing list [mailing-list-node-operators@enjin.io](https://groups.google.com/a/enjin.io/g/mailing-list-node-operators) in order to be informed when we publish a new node version. However, for those who don't want to subscribe, you can query our [Docker Hub repository](https://hub.docker.com/r/enjin/matrixchain/tags) to check for new versions. All versions are automatically pushed to Docker Hub, so you will always be able to find the latest version there. @@ -87,11 +87,11 @@ We recommend that node operators subscribe to our mailing list [mailing-list-nod Open your `docker-compose.yml` in a text editor and locate the `image` line, in the below example it is line 4: ```yaml -services: - matrixchain: - container_name: matrixchain +services: + matrixchain: + container_name: matrixchain image: enjin/matrixchain:latest # <-- this line - ports: + ports: - ... ``` @@ -100,12 +100,12 @@ If you are using the version `latest` (as in the above example), simply restarti For example, if you are running `enjin/matrixchain:v100` and the latest version is `enjin/matrixchain:v200` you would simply need to make the following change: ```yaml -services: - matrixchain: - container_name: matrixchain +services: + matrixchain: + container_name: matrixchain + image: enjin/matrixchain:v200 # add this line - image: enjin/matrixchain:v100 # remove this line - ports: + ports: - ... ``` @@ -117,7 +117,7 @@ Simply download the latest binary and run it as you have always done as per the #### Upgrading from Source -If you are upgrading based on a build you've produced from the source code, you must navigate to the directory containing the source code in a terminal. Once you have built the binary, simply follow the instruction [Upgrading using Binary](#upgrading-using-binary) to complete the upgrade. +If you are upgrading based on a build you've produced from the source code, you must navigate to the directory containing the source code in a terminal. Once you have built the binary, simply follow the instruction [Upgrading using Binary](#upgrading-using-binary) to complete the upgrade. ##### Git-cloned Repository diff --git a/docs/02-guides/02-blockchain/02-running-nodes/02-operating-relaychain-validator/01-running-a-validator.md b/docs/02-guides/02-blockchain/02-running-nodes/02-operating-relaychain-validator/01-running-a-validator.md index c10aff4..210d0b7 100644 --- a/docs/02-guides/02-blockchain/02-running-nodes/02-operating-relaychain-validator/01-running-a-validator.md +++ b/docs/02-guides/02-blockchain/02-running-nodes/02-operating-relaychain-validator/01-running-a-validator.md @@ -86,23 +86,23 @@ In order to validate, you must first have a node that has fully synchronized. Th The syncing process can be identified as a result of lines been written to your console indicating "Syncing," like so: ```text -2023-10-10 19:39:00 ⚙️ Syncing, target=#1861415 (8 peers), best: #1733 (0xf5eb…68ab), finalized #1536 (0x14c5…d421), ⬇ 1.0MiB/s ⬆ 15.5kiB/s -2023-10-10 19:39:05 ⚙️ Syncing 439.6 bps, target=#1861415 (8 peers), best: #3931 (0xa854…ea3c), finalized #3584 (0xc223…cab1), ⬇ 580.4kiB/s ⬆ 2.7kiB/s -2023-10-10 19:39:10 ⚙️ Syncing 428.6 bps, target=#1861416 (8 peers), best: #6074 (0x7a75…e2db), finalized #5632 (0x4944…9413), ⬇ 579.2kiB/s ⬆ 1.7kiB/s -2023-10-10 19:39:15 ⚙️ Syncing 417.2 bps, target=#1861417 (8 peers), best: #8160 (0xbb52…b682), finalized #7680 (0x61ce…91bc), ⬇ 577.6kiB/s ⬆ 1.4kiB/s +2023-10-10 19:39:00 ⚙️ Syncing, target=#1861415 (8 peers), best: #1733 (0xf5eb…68ab), finalized #1536 (0x14c5…d421), ⬇ 1.0MiB/s ⬆ 15.5kiB/s +2023-10-10 19:39:05 ⚙️ Syncing 439.6 bps, target=#1861415 (8 peers), best: #3931 (0xa854…ea3c), finalized #3584 (0xc223…cab1), ⬇ 580.4kiB/s ⬆ 2.7kiB/s +2023-10-10 19:39:10 ⚙️ Syncing 428.6 bps, target=#1861416 (8 peers), best: #6074 (0x7a75…e2db), finalized #5632 (0x4944…9413), ⬇ 579.2kiB/s ⬆ 1.7kiB/s +2023-10-10 19:39:15 ⚙️ Syncing 417.2 bps, target=#1861417 (8 peers), best: #8160 (0xbb52…b682), finalized #7680 (0x61ce…91bc), ⬇ 577.6kiB/s ⬆ 1.4kiB/s 2023-10-10 19:39:20 ⚙️ Syncing 416.2 bps, target=#1861418 (8 peers), best: #10241 (0x3303…f6a6), finalized #10240 (0xaac3…9f1c), ⬇ 582.3kiB/s ⬆ 4.0kiB/s ``` You will know when it has synced, as you will no longer see lines as illustrated above and instead you'll see lines indicating blocks have been "Imported": ```text -2023-10-18 14:33:24 ✨ Imported #1971895 (0xa37a…4ec9) -2023-10-18 14:33:24 ✨ Imported #1971895 (0xa37a…4ec9) -2023-10-18 14:33:22 💤 Idle (10 peers), best: #1971894 (0xe81a…d878), finalized #1971891 (0xa9fc…7deb), ⬇ 4.9kiB/s ⬆ 9.1kiB/s -2023-10-18 14:33:19 💤 Idle (9 peers), best: #1971894 (0xe81a…d878), finalized #1971890 (0x7065…145e), ⬇ 5.2kiB/s ⬆ 3.9kiB/s -2023-10-18 14:33:18 ✨ Imported #1971894 (0xe81a…d878) -2023-10-18 14:33:18 ✨ Imported #1971894 (0xe81a…d878) -2023-10-18 14:33:17 💤 Idle (10 peers), best: #1971893 (0xb933…472d), finalized #1971890 (0x7065…145e), ⬇ 7.1kiB/s ⬆ 6.1kiB/s +2023-10-18 14:33:24 ✨ Imported #1971895 (0xa37a…4ec9) +2023-10-18 14:33:24 ✨ Imported #1971895 (0xa37a…4ec9) +2023-10-18 14:33:22 💤 Idle (10 peers), best: #1971894 (0xe81a…d878), finalized #1971891 (0xa9fc…7deb), ⬇ 4.9kiB/s ⬆ 9.1kiB/s +2023-10-18 14:33:19 💤 Idle (9 peers), best: #1971894 (0xe81a…d878), finalized #1971890 (0x7065…145e), ⬇ 5.2kiB/s ⬆ 3.9kiB/s +2023-10-18 14:33:18 ✨ Imported #1971894 (0xe81a…d878) +2023-10-18 14:33:18 ✨ Imported #1971894 (0xe81a…d878) +2023-10-18 14:33:17 💤 Idle (10 peers), best: #1971893 (0xb933…472d), finalized #1971890 (0x7065…145e), ⬇ 7.1kiB/s ⬆ 6.1kiB/s 2023-10-18 14:33:14 💤 Idle (9 peers), best: #1971893 (0xb933…472d), finalized #1971890 (0x7065…145e), ⬇ 8.6kiB/s ⬆ 10.7kiB/s ``` @@ -110,23 +110,22 @@ You will know when it has synced, as you will no longer see lines as illustrated If you're uncertain about your node's current session keys after the setKeys transaction, you can check using two RPC methods: hasKey for a specific key or hasSessionKeys for the entire session key string. -Once your node has been fully synced, it's now time to generate your session keys. You need to stop the node and run it again using the `--validator` option. +Once your node has been fully synced, it's now time to generate your session keys. You need to stop the node and run it again using the `--validator` option. Running with the `--validator` option also requires you to specify the `--public-addr` option. You can do this by first acquiring your public IP address (ex. `198.51.100.69`) and then passing: `--public-addr /ip4/198.51.100.69/tcp/30334/ws` -`$ ./enjin --validator --rpc-methods=unsafe --name "a_reasonably_unique_name_a8f310"` +`$ ./enjin --validator --rpc-methods=unsafe --name "a_reasonably_unique_name_a8f310" --public-addr /ip4/[YOUR-IP]/tcp/30334/ws` You will know if this was successful as you will see an output during startup indicating your role is now `AUTHORITY` and an indication of the `BABE` authorship worker being started. This can be observed in the below example: ```text -2023-10-10 19:38:46 Enjin -2023-10-10 19:38:46 ✌️ version 0.9.43-b624209af49 -2023-10-10 19:38:46 ❤️ by Enjin, 2017-2023 -2023-10-10 19:38:46 📋 Chain specification: Enjin Relaychain -2023-10-10 19:38:46 🏷 Node name: a_reasonably_unique_name_a8f310 -2023-10-10 19:38:46 👤 Role: AUTHORITY -2023-10-10 19:38:46 💾 Database: RocksDb at /enjin/chainstate/relaychain/chains/enjin-relaychain/db/full -2023-10-10 19:38:46 ⛓ Native runtime: enjin-101 (enjin-1.tx2.au1) -[..] -2023-10-10 19:38:55 👶 Starting BABE Authorship worker +2025-08-15 08:34:07 Enjin +2025-08-15 08:34:07 ✌️ version 1.6.0-2dafb82dcb4 +2025-08-15 08:34:07 ❤️ by Enjin, 2017-2025 +2025-08-15 08:34:07 📋 Chain specification: Enjin Relaychain +2025-08-15 08:34:07 🏷 Node name: a_reasonably_unique_name_a8f310 +2025-08-15 08:34:07 👤 Role: AUTHORITY +2025-08-15 08:34:07 💾 Database: RocksDb at /enjin/chainstate/relaychain/chains/enjin-relaychain/db/full +[..] +2025-08-15 08:34:09 👶 Starting BABE Authorship worker ``` #### Generating Session Keys @@ -162,7 +161,7 @@ If you ran this successfully, you will receive a successful response and the res #### Bond ENJ, Set Session Keys and Begin Validating -To become a Validator on the Enjin Relaychain, you initially need 15,000 ENJ. However, to become an Active Validator and earn rewards, you need a total stake that meets or exceeds a certain amount of ENJ. +To become a Validator on the Enjin Relaychain, you initially need 15,000 ENJ. However, to become an Active Validator and earn rewards, you need a total stake that meets or exceeds a certain amount of ENJ. If you want community nominations, you must show commitment and trust by bonding some of your own ENJ and illustrating a willingness of own personal loss if you're to operate the Validator incorrectly. Don't bond all of your ENJ to ensure you can cover transaction fees. Bonded ENJ is locked and cannot be used. diff --git a/docs/02-guides/02-blockchain/03-running-enjin-indexer.md b/docs/02-guides/02-blockchain/03-running-enjin-indexer.md new file mode 100644 index 0000000..cb784b3 --- /dev/null +++ b/docs/02-guides/02-blockchain/03-running-enjin-indexer.md @@ -0,0 +1,220 @@ +--- +title: "Running the Enjin Indexer" +slug: "running-enjin-indexer" +description: "The Enjin Indexer is a tool that processes and serves blockchain data for applications that require efficient data retrieval, filtering, and relations. This guide will walk you through setting up and running the indexer step-by-step." +--- +## Prerequisites + +Before you begin, ensure that you have [installed Docker](https://docs.docker.com/get-started/get-docker/) on a machine you will use to host the Indexer. + +## Quick Start + +1. Begin by creating three files: (`docker-compose.yml`, `.env` and `init.sql`): + +```yaml +# docker-composer.yml + +version: "3.9" + +services: + indexer_db: + container_name: indexer_db + image: postgres:16 + restart: unless-stopped + environment: + POSTGRES_DB: ${DB_NAME} + POSTGRES_PASSWORD: ${DB_PASS} + volumes: + - ./init.sql:/docker-entrypoint-initdb.d/init.sql + - indexer_db:/var/lib/postgresql/data + ports: + - "5432:5432" + command: [ + "postgres", + "-c", "max_connections=200" + ] + + indexer_redis: + container_name: indexer_redis + image: redis:7.0 + restart: on-failure + volumes: + - redis_db:/data + ports: + - "6389:6379" + + indexer_processor: + container_name: indexer_processor + restart: unless-stopped + image: enjin/indexer:${VERSION:-latest} + environment: + CONTAINER_ROLE: processor + build: + context: . + volumes: + - .env:/squid/.env + depends_on: + - indexer_db + - indexer_worker + + indexer_graphql: + container_name: indexer_graphql + restart: unless-stopped + image: enjin/indexer:${VERSION:-latest} + environment: + CONTAINER_ROLE: graphql + build: + context: . + ports: + - "4000:4000" + - "8080:8080" + volumes: + - .env:/squid/.env + depends_on: + - indexer_db + - indexer_processor + + indexer_worker: + container_name: indexer_worker + restart: unless-stopped + image: enjin/indexer:${VERSION:-latest} + environment: + CONTAINER_ROLE: worker + build: + context: . + ports: + - "9090:9090" + volumes: + - .env:/squid/.env + depends_on: + - indexer_db + - indexer_redis + +volumes: + indexer_db: + redis_db: +``` + +```sql +-- init.sql + +CREATE SCHEMA IF NOT EXISTS metadata; + +CREATE TABLE IF NOT EXISTS "metadata"."metadata" ( + id TEXT PRIMARY KEY, + metadata JSONB, + uri TEXT, + last_updated_at TIMESTAMP +); + +CREATE INDEX IF NOT EXISTS metadata_uri ON "metadata"."metadata" (uri); +``` + +### .dotenv Configurations + +#### Enjin Relaychain +```dotenv +# .env (for Enjin Relaychain) + +ARCHIVE_ENDPOINT=https://v2.archive.subsquid.io/network/enjin-relay +CHAIN_ENDPOINT=wss://archive.relay.blockchain.enjin.io +CHAIN_PREFIX=2135 +DB_HOST=indexer_db +DB_NAME=indexer_enjin_relay +DB_PORT=5432 +DB_PASS=postgres +REDIS_URL=redis://indexer_redis:6379/0 +``` + +#### Enjin Matrixchain +```dotenv +# .env (for Enjin Matrixchain) + +ARCHIVE_ENDPOINT=https://v2.archive.subsquid.io/network/enjin-matrix +CHAIN_ENDPOINT=wss://archive.matrix.blockchain.enjin.io +CHAIN_PREFIX=1110 +DB_HOST=indexer_db +DB_NAME=indexer_enjin_matrix +DB_PORT=5432 +DB_PASS=postgres +REDIS_URL=redis://indexer_redis:6379/1 +``` + +#### Canary Relaychain +```dotenv +# .env (for Canary Relaychain) + +ARCHIVE_ENDPOINT=https://v2.archive.subsquid.io/network/canary-relay +CHAIN_ENDPOINT=wss://archive.relay.canary.enjin.io +CHAIN_PREFIX=69 +DB_HOST=indexer_db +DB_NAME=indexer_canary_relay +DB_PORT=5432 +DB_PASS=postgres +REDIS_URL=redis://indexer_redis:6379/2 +``` + +#### Canary Matrixchain +```dotenv +# .env (for Canary Matrixchain) + +ARCHIVE_ENDPOINT=https://v2.archive.subsquid.io/network/canary-matrix +CHAIN_ENDPOINT=wss://archive.matrix.canary.enjin.io +CHAIN_PREFIX=9030 +DB_HOST=indexer_db +DB_NAME=indexer_canary_matrix +DB_PORT=5432 +DB_PASS=postgres +REDIS_URL=redis://indexer_redis:6379/3 +``` +
+ +2. Start the Indexer by running the following command: `docker compose up -d` + _The command will launch all the necessary services in the background._ +3. Access the GraphQL API + Once the services are up and running, you can access the GraphQL Playground of the Indexer by opening your web browser and navigating to: http://localhost:4000/graphql + +You can read the [GraphQL Documentation](https://graphql.org/learn/) for more information about how to construct queries for the GraphQL interface. + +### Advanced Configuration + +1. Clone and Enter the Repository + ```bash + git clone https://github.com/enjin/indexer.git + cd indexer + ``` +2. Configure Environment Variables + In the repository, you will find a `.env.example` file that outlines the necessary environment variables for running the Enjin Matrixchain Indexer. Copy this file to create your own `.env` file: `cp .env.example .env` + Then, open the .env file in a text editor and fill in the missing values. Below is an example of the environment variables and their purpose: + +```text +NODE_ENV: Node.js environment (supported values: development, production) + +CHAIN_ENDPOINT: [Required] WebSocket endpoint to connect to. It is recommended to be set to your own Enjin archive node. +CHAIN_PREFIX: [Required] The chain prefix (SS58) of the chain you are connecting to. +ARCHIVE_ENDPOINT: [Required] Subsquid archive endpoint for historical blockchain data. + +DB_NAME: [Required] Postgres database name. +DB_HOST: [Required] Postgres host. +DB_PORT: [Required] Postgres port. +DB_PASS: [Required] Postgres password. +REDIS_URL: [Required] Redis URL. + +PROMETHEUS_PORT: [Optional] Prometheus port for metrics. +PROCESSOR_PROMETHEUS_ENDPOINT: [Optional] Prometheus endpoint for the processor. + +SQD_DEBUG: [Optional] Debugging flag for Subsquid. More info can be found at: https://docs.sqd.dev/sdk/reference/logger/ +SENTRY_DSN: [Optional] Sentry DSN for error tracking. +``` + +:::info +If you are using your own Redis or PostgresSQL instances (instead of the ones provided by Docker Compose), remember to remove the `indexer_db` and `indexer_redis` services from the `docker-compose.yml`, and set the database connection details (like `DB_HOST`, `DB_PORT` and `REDIS_URL`) in the `.env` file to match your external services. +::: + +## Troubleshooting + +- Ensure Docker is installed and running with sufficient resources. +- Use docker `compose logs -f ` to view logs and diagnose issues. +- Double-check all environment variables and configurations in the `.env` file. + +For additional support, you can reach out to [Enjin Support](https://support.enjin.io). diff --git a/docs/02-guides/02-blockchain/03-running-enjin-matrixchain-indexer.md b/docs/02-guides/02-blockchain/03-running-enjin-matrixchain-indexer.md deleted file mode 100644 index e06d7a2..0000000 --- a/docs/02-guides/02-blockchain/03-running-enjin-matrixchain-indexer.md +++ /dev/null @@ -1,172 +0,0 @@ ---- -title: "Running a Matrixchain Indexer" -slug: "running-enjin-matrixchain-indexer" -description: "The Enjin Matrixchain Indexer is a tool that processes and serves blockchain data for applications that require efficient data retrieval, filtering, and relations. This guide will walk you through setting up and running the indexer step-by-step." ---- -## Prerequisites - -Before you begin, ensure that you have [installed Docker](https://docs.docker.com/get-started/get-docker/) on a machine you will use to host the Indexer. - -## Quick Start - -1. Begin by creating three files (`docker-compose.yml`, `.env` and `init.sql`): - -```yaml -version: "3.9" - -services: - indexer_db: - container_name: indexer_db - image: postgres:16 - restart: unless-stopped - environment: - POSTGRES_DB: ${DB_NAME} - POSTGRES_PASSWORD: ${DB_PASS} - volumes: - - ./init.sql:/docker-entrypoint-initdb.d/init.sql - - indexer_db:/var/lib/postgresql/data - ports: - - "5432:5432" - command: [ - "postgres", - "-c", "max_connections=200" - ] - - indexer_redis: - container_name: indexer_redis - image: redis:7.0 - restart: on-failure - volumes: - - redis_db:/data - ports: - - "6389:6379" - - indexer_processor: - container_name: indexer_processor - restart: unless-stopped - image: enjin/indexer-matrixchain:${VERSION:-latest} - environment: - CONTAINER_ROLE: processor - build: - context: . - volumes: - - .env:/squid/.env - depends_on: - - indexer_db - - indexer_worker - - indexer_graphql: - container_name: indexer_graphql - restart: unless-stopped - image: enjin/indexer-matrixchain:${VERSION:-latest} - environment: - CONTAINER_ROLE: graphql - build: - context: . - ports: - - "4000:4000" - - "8080:8080" - volumes: - - .env:/squid/.env - depends_on: - - indexer_db - - indexer_processor - - indexer_worker: - container_name: indexer_worker - restart: unless-stopped - image: enjin/indexer-matrixchain:${VERSION:-latest} - environment: - CONTAINER_ROLE: worker - build: - context: . - ports: - - "9090:9090" - volumes: - - .env:/squid/.env - depends_on: - - indexer_db - - indexer_redis - -volumes: - indexer_db: - redis_db: -``` -```text -ARCHIVE_ENDPOINT: " -CHAIN_ENDPOINT: "wss://archive.matrix.blockchain.enjin.io" -CHAIN_PREFIX: "1110" -DB_HOST: "indexer_db" -DB_NAME: "indexer_enjin_matrix" -DB_PORT: "5432" -DB_PASS: postgres -REDIS_URL: "redis://indexer_redis:6379/1" -``` -```sql -CREATE SCHEMA IF NOT EXISTS metadata; - -CREATE TABLE IF NOT EXISTS "metadata"."metadata" ( - id TEXT PRIMARY KEY, - metadata JSONB, - uri TEXT, - last_updated_at TIMESTAMP -); - -CREATE INDEX IF NOT EXISTS metadata_uri ON "metadata"."metadata" (uri); -``` - -
- -2. Start the Indexer by running the following command: `docker compose up -d` - _The command will launch all the necessary services in the background._ -3. Access the GraphQL API - Once the services are up and running, you can access the GraphQL Playground of the Indexer by opening your web browser and navigating to: http://localhost:4000/graphql - -You can read the [GraphQL Documentation](https://graphql.org/learn/) for more information about how to construct queries for the GraphQL interface. - -### Advanced Configuration - -1. Clone and Enter the Repository - ```bash - git clone - cd indexer - ``` -2. Configure Environment Variables - In the repository, you will find a `.env.example` file that outlines the necessary environment variables for running the Enjin Matrixchain Indexer. Copy this file to create your own `.env` file: `cp .env.example .env` - Then, open the .env file in a text editor and fill in the missing values. Below is an example of the environment variables and their purpose: - -```text -NODE_ENV=production # Node.js environment (supported values: development, production) - -## Required - Blockchain -CHAIN_ENDPOINT=wss://archive.matrix.blockchain.enjin.io # WebSocket endpoint to connect to the Enjin Matrixchain. It is recommended to be set to your Enjin Archive Node. -CHAIN_PREFIX=1110 # The chain prefix for Enjin Matrixchain -ARCHIVE_ENDPOINT= # Subsquid archive endpoint for historical blockchain data - -## Required - Database -DB_NAME=postgres # Name of your PostgreSQL database. If you -DB_HOST=indexer_db # PostgreSQL host -DB_PORT=5432 # PostgreSQL port -DB_PASS=postgres # Postgres password -REDIS_URL=redis://indexer_redis:6379/1 # Redis URL for caching - -## Optional - Prometheus Monitoring -PROMETHEUS_PORT=7364 # Port for Prometheus metrics -PROCESSOR_PROMETHEUS_ENDPOINT=http://localhost:7364 # Prometheus endpoint for the processor - -## Optional - Error Reporting and Debugging -SQD_DEBUG=INFO # Debugging flag for Subsquid. More info can be found -SENTRY_DSN=your_sentry_dsn # Sentry DSN for error tracking -``` - -:::info -If you are using your own Redis or PostgresSQL instances (instead of the ones provided by Docker Compose), remember to remove the `indexer_db` and `indexer_redis` services from the `docker-compose.yml`, and set the database connection details (like `DB_HOST`, `DB_PORT` and `REDIS_URL`) in the `.env` file to match your external services. -::: - -## Troubleshooting - -- Ensure Docker is installed and running with sufficient resources. -- Use docker `compose logs -f ` to view logs and diagnose issues. -- Double-check all environment variables and configurations in the `.env` file. - -For additional support, you can reach out to [Enjin Support](https://support.enjin.io). diff --git a/docs/03-api-reference/01-queries/01-transactions-queries.md b/docs/03-api-reference/01-queries/01-transactions-queries.md index 4171a5e..1d274ad 100644 --- a/docs/03-api-reference/01-queries/01-transactions-queries.md +++ b/docs/03-api-reference/01-queries/01-transactions-queries.md @@ -18,7 +18,7 @@ For the most up-to-date information, refer to the [API Reference](/03-api-refere - **Mainnet:** `http://platform.enjin.io/graphql` ::: -This is an overview of some of the most commonly used operations in the Enjin Platform Schema. +This is an overview of some of the most commonly used operations in the Enjin Platform Schema. ## GetBlocks @@ -659,7 +659,7 @@ query GetTransactions { ## GetPendingEvents -The `GetPendingEvents` query is designed to retrieve a list of events that have been broadcast by the system but not yet acknowledged by the client. This is useful for ensuring that no events are missed or unprocessed, particularly in systems that rely on event-driven architectures or asynchronous processing. +The `GetPendingEvents` query is designed to retrieve a list of events that have been broadcast by the system but not yet acknowledged by the client. This is useful for ensuring that no events are missed or unprocessed, particularly in systems that rely on event-driven architectures or asynchronous processing. @@ -1089,7 +1089,7 @@ You can use the `GetPendingEvents` query to ensure that all events are accounted - Updating user interfaces in real-time. - Triggering downstream processes that depend on event data. -Developers and system administrators can use this query to monitor and handle event-driven systems effectively, maintaining their reliability and consistency. To acknowledge the outputted events (and therefore remove them from pending events), set the `acknowledgeEvents` parameter to `true` (default is false). +Developers and system administrators can use this query to monitor and handle event-driven systems effectively, maintaining their reliability and consistency. To acknowledge the outputted events (and therefore remove them from pending events), set the `acknowledgeEvents` parameter to `true` (default is false). To filter outputted pending events on specific channels, use the `channelFilters` parameter ```graphql @@ -1111,6 +1111,6 @@ query geFilteredtPendingEvents { } ``` -This example will output pending events broadcasted in either `cxKy7aqhQTtoJYUjpebxFK2ooKhcvQ2FQj3FePrXhDhd9nLfu` and `cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f` channels. -Using the `Type` argument, you, can construct advanced filters like `'channel_1' AND ('channel_2' OR 'channel_3')` +This example will output pending events broadcasted in either `cxKy7aqhQTtoJYUjpebxFK2ooKhcvQ2FQj3FePrXhDhd9nLfu` and `cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f` channels. +Using the `Type` argument, you, can construct advanced filters like `'channel_1' AND ('channel_2' OR 'channel_3')` Note, The default type is "**AND**". diff --git a/docs/03-api-reference/01-queries/03-tokens-queries.md b/docs/03-api-reference/01-queries/03-tokens-queries.md index 2f22f44..0a707ae 100644 --- a/docs/03-api-reference/01-queries/03-tokens-queries.md +++ b/docs/03-api-reference/01-queries/03-tokens-queries.md @@ -177,7 +177,7 @@ Learn more about tracking a collection in the [Tracking Collections section](/02 query GetTokens { GetTokens( collectionId: 7153 - tokenIds: [{integer:10}] + tokenIds: [{integer:10}] ) { edges { cursor diff --git a/docs/03-api-reference/01-queries/04-wallets-queries.md b/docs/03-api-reference/01-queries/04-wallets-queries.md index 2c37a77..fd65501 100644 --- a/docs/03-api-reference/01-queries/04-wallets-queries.md +++ b/docs/03-api-reference/01-queries/04-wallets-queries.md @@ -21,7 +21,7 @@ This is a detailed reference guide that explains the most commonly used operatio ## GetWallet -The `GetWallet` query provides detailed information about a specific wallet. This query retrieves various details related to the wallet, including account information, balances, associated collections and tokens, approvals, and transaction history. +The `GetWallet` query provides detailed information about a specific wallet. This query retrieves various details related to the wallet, including account information, balances, associated collections and tokens, approvals, and transaction history. diff --git a/docs/03-api-reference/01-queries/07-beam-queries.md b/docs/03-api-reference/01-queries/07-beam-queries.md index cfbc597..b03aa05 100644 --- a/docs/03-api-reference/01-queries/07-beam-queries.md +++ b/docs/03-api-reference/01-queries/07-beam-queries.md @@ -18,7 +18,7 @@ For the most up-to-date information, refer to the [API Reference](/03-api-refere - **Mainnet:** `http://platform.enjin.io/graphql/beam` ::: -This is a detailed reference guide that explains the most commonly used operations. +This is a detailed reference guide that explains the most commonly used operations. ## GetBeam @@ -37,7 +37,7 @@ query GetBeam { start end isClaimable - claimsRemaining + claimsRemaining qr { url payload @@ -53,7 +53,7 @@ query GetBeam { forceSingleMint frozen network - } + } } } @@ -355,7 +355,7 @@ query GetClaims { } beam { id - code + code } } } diff --git a/docs/03-api-reference/02-mutations/01-transaction-mutations.md b/docs/03-api-reference/02-mutations/01-transaction-mutations.md index 6e68049..f1c3b72 100644 --- a/docs/03-api-reference/02-mutations/01-transaction-mutations.md +++ b/docs/03-api-reference/02-mutations/01-transaction-mutations.md @@ -17,7 +17,7 @@ For the most up-to-date information, refer to the [API Reference](/03-api-refere - **Mainnet:** `http://platform.enjin.io/graphql` ::: -This is an overview of some of the most commonly used operations in the Enjin Platform Schema. +This is an overview of some of the most commonly used operations in the Enjin Platform Schema. ## AcknowledgeEvents diff --git a/docs/03-api-reference/02-mutations/02-collections-mutations.md b/docs/03-api-reference/02-mutations/02-collections-mutations.md index 8f3adb7..bb51eae 100644 --- a/docs/03-api-reference/02-mutations/02-collections-mutations.md +++ b/docs/03-api-reference/02-mutations/02-collections-mutations.md @@ -133,7 +133,7 @@ The `UnapproveCollection` mutation is used to revoke previously granted permissi mutation UnapproveCollection{ UnapproveCollection( collectionId: "6305" - operator: "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d" + operator: "0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d" ) { id transactionId @@ -347,7 +347,7 @@ The `Freeze` mutation is used to temporarily halt token transfers on a collectio mutation Freeze { Freeze( freezeType: COLLECTION - collectionId: "10943" + collectionId: "10943" ) { id transactionId @@ -451,7 +451,7 @@ The `RemoveCollectionAttribute` mutation is designed to remove a specific attrib ```graphql mutation RemoveCollectionAttribute { RemoveCollectionAttribute( - collectionId: "4741" + collectionId: "4741" key: "name" ) { id diff --git a/docs/03-api-reference/02-mutations/03-tokens-mutations.md b/docs/03-api-reference/02-mutations/03-tokens-mutations.md index 9e51f1e..b578b6e 100644 --- a/docs/03-api-reference/02-mutations/03-tokens-mutations.md +++ b/docs/03-api-reference/02-mutations/03-tokens-mutations.md @@ -359,7 +359,7 @@ mutation BatchTransfer { amount:1 } } - ] + ] ) { id transactionId @@ -576,7 +576,7 @@ The `Freeze` mutation is a powerful tool that enables the temporary suspension o mutation Freeze { Freeze( freezeType: COLLECTION - collectionId: "10943" + collectionId: "10943" ) { id transactionId @@ -735,7 +735,7 @@ The `OperatorTransferToken` mutation is designed for operators to transfer token ```graphql mutation OperatorTransferToken{ OperatorTransferToken( - collectionId: "7154" + collectionId: "7154" recipient: "0x50a1ba0a184c9aca3a2ac7d427e96a676fe988454b4b56a62dd6622e843e890d" params: { tokenId: {integer:6533} @@ -792,7 +792,7 @@ Remove all attributes from a collection and token. ```graphql mutation RemoveAllAttributes { RemoveAllAttributes( - collectionId: "7154" + collectionId: "7154" tokenId: {integer:6533} ) { id diff --git a/docs/03-api-reference/02-mutations/04-wallets-mutations.md b/docs/03-api-reference/02-mutations/04-wallets-mutations.md index eff8ed0..7af0d0f 100644 --- a/docs/03-api-reference/02-mutations/04-wallets-mutations.md +++ b/docs/03-api-reference/02-mutations/04-wallets-mutations.md @@ -82,7 +82,7 @@ mutation VerifyAccount{ verificationId: "0xfdb976d1c5fc9ed6d546f31332e756ca9c9ef6e3c6f0d9ea0ed0713b1cd84440" signature: "0x8958f002f9513256fa329fa92441d39adc59e3a19165aeeb343acd72b7f6a" account: "0xbeac4e574b46a3722da9239f97359b0440c0fb66e3b130f20c2284fd033f9138" - + ) } ``` diff --git a/docs/03-api-reference/02-mutations/06-marketplace-mutations.md b/docs/03-api-reference/02-mutations/06-marketplace-mutations.md index 9f77950..7105d7b 100644 --- a/docs/03-api-reference/02-mutations/06-marketplace-mutations.md +++ b/docs/03-api-reference/02-mutations/06-marketplace-mutations.md @@ -27,8 +27,8 @@ The `CreateListing` mutation is used to initiate the process of placing a buy or The `CreateListing` mutation is a fundamental operation in a marketplace. It allows you, as a seller, to list your assets for sale on the platform, and as a buyer, to create a buy offer. Here's how you can use it: -1. **Asset Details**: Specify the asset you want to buy/sell and the asset you want to receive in exchange. - When creating a sell order, specify the asset you want to sell in the `makeAssetId` parameter, and the asset you want to receive in exchange in the `takeAssetId` parameter. +1. **Asset Details**: Specify the asset you want to buy/sell and the asset you want to receive in exchange. + When creating a sell order, specify the asset you want to sell in the `makeAssetId` parameter, and the asset you want to receive in exchange in the `takeAssetId` parameter. When creating a buy order, specify the asset you want to buy in the `takeAssetId` parameter, and the asset you want to pay with in the `makeAssetId` parameter. :::info @@ -37,7 +37,7 @@ For ENJ tokens, use `collectionId: 0` and `tokenId: {integer: 0}` 2. **Quantity and Price**: Set the quantity (`amount`) and the price (`price`) at which you are willing to buy/sell the asset. 3. **Uniqueness**: Include a random string (`salt`) to ensure the uniqueness of your listing order. -4. **start/end block (Optional)**: If you are conducting an auction, you can specify the start and end blocks for the auction (`auctionParams`). +4. **start/end block (Optional)**: If you are conducting an auction, you can specify the start and end blocks for the auction (`auctionParams`). If you are conducting an offer, you can specify the end block for the auction (`offerParams`). 5. **Response**: After successfully creating the listing, you will receive a response with details about the new listing, including its ID, state, and other relevant information. diff --git a/docs/03-api-reference/02-mutations/07-beam-mutations.md b/docs/03-api-reference/02-mutations/07-beam-mutations.md index 71ab242..9b29227 100644 --- a/docs/03-api-reference/02-mutations/07-beam-mutations.md +++ b/docs/03-api-reference/02-mutations/07-beam-mutations.md @@ -17,7 +17,7 @@ For the most up-to-date information, refer to the [API Reference](/03-api-refere - **Mainnet:** `http://platform.enjin.io/graphql/beam` ::: -This is a detailed reference guide that explains the most commonly used operations. +This is a detailed reference guide that explains the most commonly used operations. ## CreateBeam @@ -62,7 +62,7 @@ The `ClaimBeam` is used to claim a specific Enjin Beam using a unique code. Enji mutation ClaimBeam { ClaimBeam( code: "cd6443f822cf6e89c03edd4f6fbc6e55" - account: "cxMsNPRk7Ek5V76NC4o2HTBrnxcUnxLA9btuKPcuPkmYi84Ts" + account: "cxMsNPRk7Ek5V76NC4o2HTBrnxcUnxLA9btuKPcuPkmYi84Ts" signature:"0x1d670c35a76efa984fa2bd655d21eb28af0ee470e359848d2105845e170bb589fd6b7c2cbe97c9acce1eb205d4ade39cae75c619230cf44b64b25ec8677d7f0f" cryptoSignatureType:SR25519 ) diff --git a/docs/03-api-reference/03-websocket-events.md b/docs/03-api-reference/03-websocket-events.md index eaed058..f2325ac 100644 --- a/docs/03-api-reference/03-websocket-events.md +++ b/docs/03-api-reference/03-websocket-events.md @@ -7,12 +7,12 @@ Enjin Platform Cloud **Canary**: `wss://ws-us2.pusher.com:443/app/76b7604dabc23c Enjin Platform Cloud **Mainnet**: `wss://ws-us2.pusher.com:443/app/02cbd93e7842fb1db299?protocol=7` ::: -The Enjin Platform emits events that you can listen to for various operations. +The Enjin Platform emits events that you can listen to for various operations. For example, whenever a transaction is issued by your wallet daemon, an event is emitted via Websocket. Listening to events is especially useful when awaiting for a transaction to be approved on-chain. -Platform events are emitted to the platform Websocket endpoint, in various channels. +Platform events are emitted to the platform Websocket endpoint, in various channels. For example, we can listen to events related to account address `cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f` by subscribing to the channel `0x5a6aae294416f3e875d9a8975658905002cfd3e5e64105d76296c4b0adbfd77e`, which is the account's public key. :::note Note on Address Formats in Platform Events diff --git a/docs/03-api-reference/04-important-arguments.md b/docs/03-api-reference/04-important-arguments.md index 3d26229..d95b179 100644 --- a/docs/03-api-reference/04-important-arguments.md +++ b/docs/03-api-reference/04-important-arguments.md @@ -15,7 +15,7 @@ This is a detailed reference guide that explains most common arguments within th ## id -The `id` argument is a unique identifier used to specifically identify a query or mutation that occurred on the Enjin Platform. +The `id` argument is a unique identifier used to specifically identify a query or mutation that occurred on the Enjin Platform. It helps pinpoint a particular operation when you want to reference it or perform actions related to that operation. @@ -29,7 +29,7 @@ It is structured in the format `xxxxxx-y`, where `xxxxxx` denotes the block numb ## transactionHash -The "transactionHash" argument in GraphQL serves as a unique identifier for a particular blockchain transaction. +The "transactionHash" argument in GraphQL serves as a unique identifier for a particular blockchain transaction. It is generated using a cryptographic hash function, guaranteeing that each "transactionHash" is entirely distinct and cannot resemble an identifier from a different blockchain network. @@ -45,21 +45,21 @@ You will need to use the `verificationId` to find a wallet address once it's bee ## after -Used as a cursor to specify a starting point for fetching data in a paginated list. +Used as a cursor to specify a starting point for fetching data in a paginated list. -It helps you retrieve data after a specific item or position in the list. +It helps you retrieve data after a specific item or position in the list. ## first Used to specify the number of results or items you want to return per page when dealing with paginated data. -Simply provide it with a numeric value that represents the desired number of results you want to retrieve in a single page. +Simply provide it with a numeric value that represents the desired number of results you want to retrieve in a single page. ## account -Your "Enjin Blockchain account" that acts like your digital identity on the blockchain. +Your "Enjin Blockchain account" that acts like your digital identity on the blockchain. -It allows you to interact with the blockchain, such as sending or receiving tokens. +It allows you to interact with the blockchain, such as sending or receiving tokens. Think of it as your account on the blockchain network. @@ -75,21 +75,21 @@ Your address is derived from your public key and serves as a more user-friendly ### publicKey -A cryptographic key associated with your Enjin Blockchain account. +A cryptographic key associated with your Enjin Blockchain account. -It serves as your unique identifier on the blockchain. +It serves as your unique identifier on the blockchain. When someone wants to send you tokens or verify your transactions, they use your public key to do so. It's like your digital fingerprint. ## hashes -Allows you to filter blockchain transactions based on their unique transaction hashes. +Allows you to filter blockchain transactions based on their unique transaction hashes. Transaction hashes are cryptographic representations of individual transactions on the blockchain, ensuring their immutability and uniqueness. ## numbers -Used for filtering transactions by block numbers, allows you to specify the block numbers from which you want to retrieve transactions. +Used for filtering transactions by block numbers, allows you to specify the block numbers from which you want to retrieve transactions. This is useful when you want to narrow down and retrieve transactions from specific blocks on the blockchain. @@ -101,13 +101,13 @@ Token collections play a pivotal role in organizing and managing related tokens, ## acknowledgeEvents -Controls whether to automatically acknowledge events that were broadcast to the blockchain but have not yet been acknowledged by the blockchain itself. +Controls whether to automatically acknowledge events that were broadcast to the blockchain but have not yet been acknowledged by the blockchain itself. When events are acknowledged before finalization on the blockchain, the operation's `result` is set as `EXTRINSIC_FAILED`, indicating a failure in the blockchain's processing. ## tokenId -Used to request specific information about a particular token on the Enjin Blockchain. +Used to request specific information about a particular token on the Enjin Blockchain. It allows you to retrieve details, properties, and attributes of the token identified by its unique token ID. @@ -123,13 +123,13 @@ It's useful for scenarios where simplicity and efficiency are more important tha Derived from a string, such as a name or label. It you to choose human-readable representations of tokens. -You might choose `stringId` when you want to represent tokens with user-friendly names or labels. +You might choose `stringId` when you want to represent tokens with user-friendly names or labels. It's useful for mapping easily recognizable names. ### hash -A `hash` is created using a cryptographic hash function, ensuring uniqueness and collision resistance. +A `hash` is created using a cryptographic hash function, ensuring uniqueness and collision resistance. It's suitable when uniqueness across collections is critical. @@ -137,7 +137,7 @@ It's often used in cases where tokens must be resistant to duplication or tamper ### ERC1155 -Designed to facilitate seamless conversion between tokens Ethereum Virtual Machine (EVM) chains and tokens on Enjin Blockchain. +Designed to facilitate seamless conversion between tokens Ethereum Virtual Machine (EVM) chains and tokens on Enjin Blockchain. Particularly useful for projects that require interoperability between blockchain ecosystems. @@ -145,13 +145,13 @@ It enables tokens to be converted from one chain to another while retaining thei #### index -A 16-bit integer that represents a specific instance or variation of a token type within an ERC-1155 contract. +A 16-bit integer that represents a specific instance or variation of a token type within an ERC-1155 contract. It is used in combination with the base token ID to uniquely identify individual tokens of the same type within the contract. #### tokenId -A unique identifier used within the ERC-1155 token standard. +A unique identifier used within the ERC-1155 token standard. It combines two components: a 16-bit hexadecimal base token ID and a 16-bit integer index. @@ -159,31 +159,31 @@ When these components are combined, they create a 128-bit integer that serves as ## method -Enables precise and efficient retrieval of transaction-specific method. +Enables precise and efficient retrieval of transaction-specific method. -This targeted approach offers a clear and detailed understanding of the exact actions performed within a transaction, simplifying debugging, security auditing, and user interaction. +This targeted approach offers a clear and detailed understanding of the exact actions performed within a transaction, simplifying debugging, security auditing, and user interaction. It streamlines data retrieval by focusing on the essential method details, making it a powerful tool for developers, auditors, analysts, and end-users to gain insights, enhance security, and improve the overall user experience in blockchain applications. ## signedAtBlock -Specifies the exact block at which a transaction was signed on the blockchain. +Specifies the exact block at which a transaction was signed on the blockchain. -It serves as a historical reference point, indicating precisely when the transaction was initiated and digitally signed within the blockchain's timeline. +It serves as a historical reference point, indicating precisely when the transaction was initiated and digitally signed within the blockchain's timeline. -This information is particularly useful when there is a need find a transaction within a block, verify the authenticity of a digital signature, or ensure compliance with timestamp-related requirements. +This information is particularly useful when there is a need find a transaction within a block, verify the authenticity of a digital signature, or ensure compliance with timestamp-related requirements. -It enables users, developers, and auditors to track the temporal context of blockchain interactions, offering a clear historical record that can be crucial for auditing, legal, regulatory, and security purposes. +It enables users, developers, and auditors to track the temporal context of blockchain interactions, offering a clear historical record that can be crucial for auditing, legal, regulatory, and security purposes. ## state Used for tracking and monitoring the progress of Enjin Platform queries and mutations, offering insights into their current status and history. Here are the various states and why they are useful: -- **`ABANDONED`:** Indicates that the operation couldn't be sent, often due to encoding issues or insufficient funds. -- **`PENDING`:** Represents a newly created operation that is awaiting approval by a wallet. -- **`PROCESSING`:** Signifies that the Enjin Wallet Daemon has picked up the transaction and is actively processing it. +- **`ABANDONED`:** Indicates that the operation couldn't be sent, often due to encoding issues or insufficient funds. +- **`PENDING`:** Represents a newly created operation that is awaiting approval by a wallet. +- **`PROCESSING`:** Signifies that the Enjin Wallet Daemon has picked up the transaction and is actively processing it. - **`BROADCAST`:** Indicates that the transaction has successfully sent the transaction to the Enjin Blockchain. -- **`FINALIZED`:** Denotes that the transaction has been successfully included in a block on the blockchain. Although, it doesn't specify whether the on-chain transaction succeeded or failed. That data can be queried by using the `result` field. +- **`FINALIZED`:** Denotes that the transaction has been successfully included in a block on the blockchain. Although, it doesn't specify whether the on-chain transaction succeeded or failed. That data can be queried by using the `result` field. ## result @@ -197,15 +197,15 @@ This single piece of information is pivotal for ensuring the reliability, integr ## externalId -You can utilize the `externalId` argument to establish a connection between an account in database and an Enjin Platform Account. +You can utilize the `externalId` argument to establish a connection between an account in database and an Enjin Platform Account. It's worth noting that you have control over setting a user's `externalId`, so it's advisable to choose an identifier that aligns with your existing database, making "`externalId`" a valuable and versatile option for processing requests. ## signature -Allows for message authentication, ensuring that data remains unaltered during transmission, and guarantees the integrity of blockchain-stored data. +Allows for message authentication, ensuring that data remains unaltered during transmission, and guarantees the integrity of blockchain-stored data. -Additionally, `signature` serves as a means of verifying user identity and authorization, providing non-repudiation, enhancing security, and confirming the legitimacy of blockchain transactions. +Additionally, `signature` serves as a means of verifying user identity and authorization, providing non-repudiation, enhancing security, and confirming the legitimacy of blockchain transactions. Overall, this argument is indispensable for maintaining trust, security, and data reliability in cryptographic and blockchain environments. @@ -227,7 +227,7 @@ Use the `signingaccount` argument to specify the account responsible for signing ## simulate -You would use the `simulate` parameter set to `true` when you want to test and validate the outcome of a transaction without actually executing it on the blockchain network. +You would use the `simulate` parameter set to `true` when you want to test and validate the outcome of a transaction without actually executing it on the blockchain network. It provides a valuable way to safely experiment with transactions and prevent unintended consequences, especially in scenarios where accuracy and precision are critical. @@ -322,7 +322,7 @@ The `continueOnFailure` parameter, when set to true, indicates that the system s ## keepAlive -When conducting Enjin Coin (ENJ) transfers, utilizing the "keepAlive" option with a value of true is advisable if you intend to preserve the sender's Enjin Coin Account, even when its balance drops below the minimum threshold of 0.1 ENJ. +When conducting Enjin Coin (ENJ) transfers, utilizing the "keepAlive" option with a value of true is advisable if you intend to preserve the sender's Enjin Coin Account, even when its balance drops below the minimum threshold of 0.1 ENJ. It's important to recognize that Enjin Coin Accounts and Token Accounts are distinct entities, meaning that a wallet can still hold tokens and NFTs even if the Enjin Coin Account is removed. @@ -356,9 +356,9 @@ Configures default marketplace royalties for all tokens in the collection. ## explicitRoyaltyCurrencies -The `explicitRoyaltyCurrencies` field within a collection serves the purpose of specifying which currencies are permitted to be accepted as royalties. +The `explicitRoyaltyCurrencies` field within a collection serves the purpose of specifying which currencies are permitted to be accepted as royalties. -By including specific currencies in this field, a collection restricts the acceptance of royalties to only those currencies, ensuring that any listing created that intends to pay royalties in an unaccepted currency will result in a failed listing creation process. +By including specific currencies in this field, a collection restricts the acceptance of royalties to only those currencies, ensuring that any listing created that intends to pay royalties in an unaccepted currency will result in a failed listing creation process. This feature enhances control and compliance in managing royalties within the collection. @@ -390,7 +390,7 @@ For example, when unapproving a collection, "owner" refers to the account from w ## TokenIds -Specifies a list of integer s claimable in the beam. A Beam Claim will be generated for each provided ID. +Specifies a list of integer s claimable in the beam. A Beam Claim will be generated for each provided ID. Provide IDs as strings, using commas to separate multiple entries. Supports single IDs (e.g., "1"), ranges (e.g., "6..8"), or a combination (e.g., ["1", "6..8", "10"] includes IDs 1, 6, 7, 8, and 10). ## tokenQuantityPerClaim diff --git a/docs/04-enjin-blockchain/02-enjin-relaychain/01-validator-staking.md b/docs/04-enjin-blockchain/02-enjin-relaychain/01-validator-staking.md index 506011d..a012263 100644 --- a/docs/04-enjin-blockchain/02-enjin-relaychain/01-validator-staking.md +++ b/docs/04-enjin-blockchain/02-enjin-relaychain/01-validator-staking.md @@ -25,7 +25,7 @@ On Enjin, we use nomination pools to handle staking due to the increased simplic With nomination pools, there is one account that multiple users put their funds into. This account acts as the nominator and receives the rewards. The liquid token, sENJ, is used to represent a user's stake in the pool. -- **Low minimum (1 ENJ) -** pools can have lower minimums per user because all of the pool's funds are staked together +- **Low minimum (1 ENJ) -** pools can have lower minimums per user because all of the pool's funds are staked together Easy to use - users only need to choose a pool, no need to choose validators - **Receive liquid token -** a liquid token, sENJ, is received that represents the user's stake. This can be transferred or even exchanged for ENJ - **Immediate exit -** due to the liquid token, the user can exit immediately by exchanging their sENJ for ENJ diff --git a/docs/04-enjin-blockchain/02-enjin-relaychain/02-enjin-relaychain.md b/docs/04-enjin-blockchain/02-enjin-relaychain/02-enjin-relaychain.md index 1ce2073..6ab0d13 100644 --- a/docs/04-enjin-blockchain/02-enjin-relaychain/02-enjin-relaychain.md +++ b/docs/04-enjin-blockchain/02-enjin-relaychain/02-enjin-relaychain.md @@ -27,7 +27,7 @@ Enjin Relaychain is a decentralized, multi-chain network that aims to provide a - Scalable and customizable multi-chain network; - Enhanced NFT creation capabilities; -- Predictable scalability and costs; +- Predictable scalability and costs; User-friendly staking; - Inclusive and accessible for all users; - Seamlessly integrated with Enjin products. diff --git a/docs/04-enjin-blockchain/02-enjin-relaychain/02-stake-exchange-pallet.md b/docs/04-enjin-blockchain/02-enjin-relaychain/02-stake-exchange-pallet.md index 609e3db..c34536b 100644 --- a/docs/04-enjin-blockchain/02-enjin-relaychain/02-stake-exchange-pallet.md +++ b/docs/04-enjin-blockchain/02-enjin-relaychain/02-stake-exchange-pallet.md @@ -32,7 +32,7 @@ By utilizing Enjin Nomination Pools and the Stake Exchange Pallet, users have th Ensure that you have access to an Enjin Relay Chain and have the necessary ENJ tokens to stake. The UI used in this guide can be accessed [here (*Canary Testnet)](https://console.enjin.io/?rpc=wss%3A%2F%2Frpc.relay.canary.enjin.io#/extrinsics) -**Accessing the Pallet Functions:** +**Accessing the Pallet Functions:** Open your Enjin Explorer and navigate to the Developer -> Extrinsics interface. Locate the "Stake Exchange Pallet" and click on it to access the available functions. ## Creating an Offer @@ -85,19 +85,19 @@ So as the creator of the offer, it is in your best interest to keep this value a **_Note_** : The `minAverageRewardRate` is represented by u128, which allows for higher precision. Example : -if its 1, (the pool should have a reward rate greater than or equal to 1) you would use 1000000000000000000 (1x) -if its 1.1, (the pool should have a reward rate greater than or equal to 1.1), you would use 1100000000000000000 (11.x) +if its 1, (the pool should have a reward rate greater than or equal to 1) you would use 1000000000000000000 (1x) +if its 1.1, (the pool should have a reward rate greater than or equal to 1.1), you would use 1100000000000000000 (11.x) if its 2 (the pool should have a reward rate greater than or equal to 2), you would use 2000000000000000000 (2x) -To get the input ratio, you can multiply your desired ratio with `1000000000000000000`, -ex : `1.112 * 1000000000000000000 = 1120000000000000000` +To get the input ratio, you can multiply your desired ratio with `1000000000000000000`, +ex : `1.112 * 1000000000000000000 = 1120000000000000000` This ratio means, the offer will only accept pool with a reward rate more than 1.112 *** **_Note_** : The `rate` is also represented by Perbill, this value will be used to determine how many `sENJ` will be required to get `ENJ`. Example : -if its 1:1, (you need 1 sENJ to get 1ENJ) you would use 1000000000 (100%) +if its 1:1, (you need 1 sENJ to get 1ENJ) you would use 1000000000 (100%) if its 0.9:1, (you need 0.9 sENJ to get 1ENJ), you would use 900000000 (90%) *** @@ -156,7 +156,7 @@ Configuring Liquidity Account is only required if you create an offer aka if you - Click "Confirm" to proceed with adding liquidity. - If successful, you will receive a confirmation message indicating that the liquidity has been added. - Example : You created an offer with initial amount of 1000ENJ. If you add liquidity of 400ENJ, then your updated + Example : You created an offer with initial amount of 1000ENJ. If you add liquidity of 400ENJ, then your updated offer will have a liquidity of 1400ENJ. ![](/img/components/enjin-relaychain/38.png) diff --git a/docs/04-enjin-blockchain/03-enjin-matrixchain/01-multitoken-pallet.md b/docs/04-enjin-blockchain/03-enjin-matrixchain/01-multitoken-pallet.md index c246fea..4045ba4 100644 --- a/docs/04-enjin-blockchain/03-enjin-matrixchain/01-multitoken-pallet.md +++ b/docs/04-enjin-blockchain/03-enjin-matrixchain/01-multitoken-pallet.md @@ -25,7 +25,7 @@ The Enjin Blockchain has a token standard called MultiTokens. The standard is co **Grouped NFTs** are Multi-unit tokens/NFTs that are a part of a family, and share the same Base ID. :::warning Groups are being implemented. -Please note that Grouped tokens functionality is being implemented. +Please note that Grouped tokens functionality is being implemented. This page will be updated once it is. ::: @@ -77,7 +77,7 @@ By default, the policies are flexible, but you can make them more strict. For ex - Max Token Supply: The maximum supply limit for each individual token within the collection. Setting this to 1 will ensure each token within the collection is an NFT. - Force Collapsing Supply: Whether all tokens within the collection should have a collapsing supply. Read more on the available supply types in the [#Create Token Parameters](#create-token-parameters) section below. - Market Policy: Whether each token within the collection should have forced marketplace royalties. Read more in the [#Create Token Parameters](#create-token-parameters) section below. -- Explicit Royalty Currencies: List of tokens that will be allowed to be used as a royalty currency for each filled listing of a token withing the collection. If no tokens are provided, all tokens will be allowed to be used as a royalty currency. +- Explicit Royalty Currencies: List of tokens that will be allowed to be used as a royalty currency for each filled listing of a token withing the collection. If no tokens are provided, all tokens will be allowed to be used as a royalty currency. Read more in the [#Create Token Parameters](#create-token-parameters) section below. - Attributes: The collection's attributes such as `name`, `description`, `media`, etc. These should be structured according to the [metadata standard](/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/02-metadata-standard.md). @@ -88,18 +88,18 @@ When the collection is created, it will emit a `CollectionCreated` event. This e ## How to create a Token :::info Some deposits are required. -A single of 0.01 ENJ is required to store the token on-chain. This deposit also covers the first . +A single of 0.01 ENJ is required to store the token on-chain. This deposit also covers the first . An additional of 0.01 ENJ is required for each new token holder. ::: Tokens are created using the `mint` extrinsic. It only contains three parameters, the `recipient`, the `collection_id` and `mint params`. The mint params is an enum with a two variants: CreateToken and Mint. -`CreateToken` is used to create a new token and set its configuration such as cap, metadata, royalty, etc. +`CreateToken` is used to create a new token and set its configuration such as cap, metadata, royalty, etc. `Mint` is used to mint additional units to an existing token. ### CreateToken -This must be used the first time a token is created. The provided token id must not already exist. Some additional settings can be chosen when creating a token, such as setting a cap on the supply or giving it a royalty for the marketplace. +This must be used the first time a token is created. The provided token id must not already exist. Some additional settings can be chosen when creating a token, such as setting a cap on the supply or giving it a royalty for the marketplace. Some of these settings can be changed later by using the `mutate_token` extrinsic. To create an NFT, set the cap: `supply`/`collapsing supply` to `1`. @@ -116,7 +116,7 @@ To create an NFT, set the cap: `supply`/`collapsing supply` to `1`. - Token Market Behavior: (can be changed later on using the `MutateToken` extrinsic) - None: No Royalties. - Has Royalty: Set a percentage of ENJ royalty for each filled listing on the marketplace. - - isCurrency: Allows this new token to be used as royalty (instead of ENJ royalty) for other tokens in the collection. + - isCurrency: Allows this new token to be used as royalty (instead of ENJ royalty) for other tokens in the collection. **\*Note**: setting a MultiToken currency as royalty isn't implemented on-chain as of now and only acts as a placeholder. - Listing Forbidden: Whether this token should be prevented from listing on the marketplace (can be changed later on using the `MutateToken` extrinsic) - Freeze State: @@ -127,8 +127,8 @@ To create an NFT, set the cap: `supply`/`collapsing supply` to `1`. - Metadata: The parameters below are for creating a token with decimal support, like a in-game currency. - Name: The token name. Can be set to `0x` to provide an empty name. (this name takes precedence when the token name is provided in different parameters such as `uri`/`name` attributes) - Symbol: The token symbol to be shown in different apps. - - Decimals: The token's decimals count. - Please note, this parameter does not affect the token's behavior on-chain and is used solely for display purposes in applications. It helps apps determine how to format and present the token's total supply. + - Decimals: The token's decimals count. + Please note, this parameter does not affect the token's behavior on-chain and is used solely for display purposes in applications. It helps apps determine how to format and present the token's total supply. e.g. A token with `supply: 175` and `decimals: 2` should be formatted as `1.75`. - ENJ Infusion: - Infusion: The amount of ENJ to infuse to each unit. (More info in the [#ENJ Infusion](#enj-infusion) section below) @@ -154,11 +154,11 @@ A simple transfer is when the `origin` of the extrinsic is also the sender. i.e. ### Operator Transfer -An operator transfer is when an account makes transfers on behalf of another account. This is also known as `transfer_from`. +An operator transfer is when an account makes transfers on behalf of another account. This is also known as `transfer_from`. ![](/img/components/enjin-matrixchain/12.png) -In the example above, Alice is creating a transaction call to transfer a MultiToken to Bob's account from Charlie's account. +In the example above, Alice is creating a transaction call to transfer a MultiToken to Bob's account from Charlie's account. For the transaction to be successful, Bob must approve Alice to transfer this token in advance. #### Transfer Approvals @@ -178,8 +178,8 @@ For tokens with the "Collapsing Supply" cap type, burning token units decreases ### Melting a Token -"Melting" is a term used to describe the process of burning a that contains an . This process not only destroys the token but also releases the infused ENJ to the token holder. -Read more in the [#ENJ Infusion](#enj-infusion) section below. +"Melting" is a term used to describe the process of burning a that contains an . This process not only destroys the token but also releases the infused ENJ to the token holder. +Read more in the [#ENJ Infusion](#enj-infusion) section below. Note that "melting" is a conceptual term and does not exist as a specific function in the blockchain code. ### Destroying Token Account @@ -218,14 +218,14 @@ Accounts, collections, and tokens can be frozen to prevent transfers. This is do ### Freeze a collection or a collection account -This is done by clicking on Freeze button under expanded collection. +This is done by clicking on Freeze button under expanded collection. Use the toggle to switch between freezing a specific collection account and the whole collection. ![](/img/components/enjin-matrixchain/16.png) ### Freeze a token or a token account -This is done by clicking on Freeze button on the token page. +This is done by clicking on Freeze button on the token page. Use the toggle to switch between freezing a specific token account and the whole token. ![](/img/components/enjin-matrixchain/17.png) @@ -236,14 +236,14 @@ To unfreeze either collection, token, collection account or token account, use t ### Thaw a collection or a collection account -This is done by clicking on the `Thaw` button under expanded collection. +This is done by clicking on the `Thaw` button under expanded collection. Use the toggle to switch between thawing a specific collection account and the whole collection. ![](/img/components/enjin-matrixchain/18.png) ### Thaw a token or a token account -This is done by clicking on the `Thaw` button on the token page. +This is done by clicking on the `Thaw` button on the token page. Use the toggle to switch between thawing a specific token account and the whole token. ![](/img/components/enjin-matrixchain/19.png) @@ -272,7 +272,7 @@ Using `batch_set_attribute` you can batch set attribute operations, allowing to ### Remove All Attributes -Removes all attributes from the given `collection_id` or `token_id`. +Removes all attributes from the given `collection_id` or `token_id`. If `token_id` is `None`, it removes all attributes of the collection. If `token_id` is `Some`, it removes all attributes of the token. `attributeCount` must match the number of attributes set in the collection/token, or the transaction will fail. ![](/img/components/enjin-matrixchain/23.png) @@ -285,7 +285,7 @@ Each token unit may have some ENJ infused into it. The token creator can choose ![](/img/components/enjin-matrixchain/24.png) -Infused ENJ can only be retrieved by [burning the token supply](#burning-tokens). +Infused ENJ can only be retrieved by [burning the token supply](#burning-tokens). Burning the token releases the ENJ to the holder. In addition, the token creator can choose to allow anyone to add ENJ infusion to an existing token, or restrict it so only the creator can add ENJ infusion. @@ -294,18 +294,18 @@ In addition, the token creator can choose to allow anyone to add ENJ infusion to ## Token Account Deposit -On top of the required to store the token on-chain, a Storage Deposit of 0.01 ENJ is required to store each Token Account on-chain. +On top of the required to store the token on-chain, a Storage Deposit of 0.01 ENJ is required to store each Token Account on-chain. A Token Account is created when an account has a balance of 1 or more, and it is destroyed when that balance becomes zero. -It's important to note that the storage deposit is required for each new Token Account created, not for the total supply of tokens minted. -For example: +It's important to note that the storage deposit is required for each new Token Account created, not for the total supply of tokens minted. +For example: -- Minting/transferring 1,000 of a single MultiToken to **a single recipient account that doesn’t already hold a balance of that token** will require creating a Token Account for that recipient. This process incurs a one-time storage deposit of only 0.01 ENJ, covering the entirety of the 1,000 tokens. +- Minting/transferring 1,000 of a single MultiToken to **a single recipient account that doesn’t already hold a balance of that token** will require creating a Token Account for that recipient. This process incurs a one-time storage deposit of only 0.01 ENJ, covering the entirety of the 1,000 tokens. -- Minting/transferring any balance of a single MultiToken to **1,000 different recipient accounts, each of which doesn’t already hold a balance of that token**, will require creating a Token Account for each recipient. This process incurs a storage deposit of 0.01 ENJ per account, resulting in a total deposit of 10 ENJ. +- Minting/transferring any balance of a single MultiToken to **1,000 different recipient accounts, each of which doesn’t already hold a balance of that token**, will require creating a Token Account for each recipient. This process incurs a storage deposit of 0.01 ENJ per account, resulting in a total deposit of 10 ENJ. -The token creator can reserve some ENJ for Account Deposits on token creation with the `account_deposit_count` field. +The token creator can reserve some ENJ for Account Deposits on token creation with the `account_deposit_count` field. ENJ reserve for Account Deposits can be added / removed ahead of time by any account, with the `update_account_deposit` extrinsic. -On a `mint`/`transfer` operation, if a new Account Deposit is needed and there's no account deposit in reserve, the ENJ required for the account deposit will be taken on demand from the account that performed the mint or transfer. If it is an operator transfer, it is taken from the source account. +On a `mint`/`transfer` operation, if a new Account Deposit is needed and there's no account deposit in reserve, the ENJ required for the account deposit will be taken on demand from the account that performed the mint or transfer. If it is an operator transfer, it is taken from the source account. In the future, if the created Token Account is destroyed, the ENJ used for the Account Deposit is returned to the account that originally reserved the on-demand deposit. diff --git a/docs/04-enjin-blockchain/03-enjin-matrixchain/02-fuel-tank-pallet.md b/docs/04-enjin-blockchain/03-enjin-matrixchain/02-fuel-tank-pallet.md index 9aff45a..220ae21 100644 --- a/docs/04-enjin-blockchain/03-enjin-matrixchain/02-fuel-tank-pallet.md +++ b/docs/04-enjin-blockchain/03-enjin-matrixchain/02-fuel-tank-pallet.md @@ -7,7 +7,7 @@ description: "Subsidize fees for your players while reducing overall costs." import GlossaryTerm from '@site/src/components/GlossaryTerm'; :::info The Enjin Blockchain Console -Use [console.enjin.io](https://console.enjin.io/) to use the user interface referenced in this document. +Use [console.enjin.io](https://console.enjin.io/) to use the user interface referenced in this document. You may also check the [hands-on guide for creating and using fuel tanks](/02-guides/01-platform/02-managing-users/04-using-fuel-tanks.md) ::: @@ -31,7 +31,7 @@ Dispatch refers to the act of broadcasting a transaction via a Fuel Tank, which #### Tank User Account -Some fuel tanks require users to register an account to use them. The owner of the fuel tank can specify whether only they can add accounts or if users are allowed to create their own accounts, with or without specific requirements, with the `User Account Management` field. +Some fuel tanks require users to register an account to use them. The owner of the fuel tank can specify whether only they can add accounts or if users are allowed to create their own accounts, with or without specific requirements, with the `User Account Management` field. Each fuel tank account requires a 0.01 ENJ deposit for the Tank User Account #### User Account Management @@ -50,7 +50,7 @@ Account Rules are rules that are validated at the time of Tank User Account Crea #### Dispatch Rules -Dispatch Rules are rules that are validated at the time of dispatch. +Dispatch Rules are rules that are validated at the time of dispatch. When a dispatch call is made to a fuel tank, it must be made in accordance with a set of rules. These rules, known as rule sets, can include multiple individual rules that determine the validity of the call. A fuel tank can have multiple rule sets, each of which controls access and permissions to the fuel tank's functionality and resources. #### Available Rules @@ -81,7 +81,7 @@ The "Require token" setting determines that a specific token must be held by the ##### Require Signature: -The "Require Signature" setting determines that a call must be signed by a specific account, and this signature must be included in the dispatch settings for the call to be accepted by the fuel tank. +The "Require Signature" setting determines that a call must be signed by a specific account, and this signature must be included in the dispatch settings for the call to be accepted by the fuel tank. If the signature is not provided, is invalid or is signed by a different account, the call will be rejected and fail. This feature is particularly useful with [managed wallets](/02-guides/01-platform/02-managing-users/03-using-managed-wallets.md) to allow multiple controlled accounts to use the fuel tank without paying s in advance. ##### Whitelisted Pallets: @@ -100,13 +100,13 @@ Permitted calls refer to a list of specific extrinsic calls that are allowed to #### Coverage Policy: -This determines the scope of the fuel tank's subsidy. -Setting the Coverage Policy to "FEES" means it will subsidize only . +This determines the scope of the fuel tank's subsidy. +Setting the Coverage Policy to "FEES" means it will subsidize only . Alternatively, setting it to "FEES_AND_DEPOSIT" ensures it covers both and any the dispatched call may require. #### Freezing: -"Freezing" is a state where a fuel tank or a rule set is temporarily prevented from accepting calls. This means that while a fuel tank or rule set is frozen, no dispatches are allowed to occur on it. This is implemented as a safety measure to prevent accidental or malicious changes and to ensure that the fuel tank or rule set remains in a stable state until the freeze is lifted. +"Freezing" is a state where a fuel tank or a rule set is temporarily prevented from accepting calls. This means that while a fuel tank or rule set is frozen, no dispatches are allowed to occur on it. This is implemented as a safety measure to prevent accidental or malicious changes and to ensure that the fuel tank or rule set remains in a stable state until the freeze is lifted. Also note that in order to mutate any fuel tank or rule set configurations, it must be frozen first. #### Descriptor: @@ -115,9 +115,9 @@ A descriptor is a list of all the data needed to create a fuel tank. It includes #### Require Account: -The "Require Account" setting determines whether the caller must have a tank account in order to dispatch. -If "Require Account" is set to true, the caller must have a tank account; otherwise, their dispatch will be rejected and fail. -If "Require Account" is set to false, the caller can dispatch even without a tank account. +The "Require Account" setting determines whether the caller must have a tank account in order to dispatch. +If "Require Account" is set to true, the caller must have a tank account; otherwise, their dispatch will be rejected and fail. +If "Require Account" is set to false, the caller can dispatch even without a tank account. It is important to note that when "Require Account" is set to false, anyone will be able to dispatch, which could quickly drain the tank funds. Therefore, it is crucial to implement strict dispatch rules when using "Require Account: false" to prevent misuse. ### Extrinsics @@ -132,7 +132,7 @@ Applies provided mutation to the fuel tank. Caller must be the owner of the fuel #### add_account: -Adds a new fuel tank user account, which not only allows using fuel tank, but also stores user consumption and rule set data. An account can be created only if account rules are successfully validated. An account is required to dispatch calls when the ruleset's `require_account` is set to `true`. +Adds a new fuel tank user account, which not only allows using fuel tank, but also stores user consumption and rule set data. An account can be created only if account rules are successfully validated. An account is required to dispatch calls when the ruleset's `require_account` is set to `true`. A storage deposit is required, and may be paid by the user or the fuel tank, depending on the settings. Could fail with `NoPermission` if caller is not the owner and user management settings don't allow users to create accounts on their own. Creation of already existing account withing a tank will result in `AccountAlreadyExists` error. In case some of account rules cannot validate the caller, rule specific error will be returned. In success case emits `AccountAdded` event #### remove_account: @@ -145,8 +145,8 @@ Remove account rule data if it exists. Requires the fuel tank or the rule set to #### dispatch: -Dispatch a call through the fuel tank, where the tank would pay for transaction fees and, if configured, provide a storage deposit. -Additional settings can be provided with the `Settings` argument such as `provide remaining fee`, or include a signature required for the `RequireSignature` dispatch rule. +Dispatch a call through the fuel tank, where the tank would pay for transaction fees and, if configured, provide a storage deposit. +Additional settings can be provided with the `Settings` argument such as `provide remaining fee`, or include a signature required for the `RequireSignature` dispatch rule. All calls are subject to rule set evaluation and would result in rule specific errors in case of failure. In case the inner call fails, the `DispatchFailed` event will be emitted with wrapped dispatch error inside. In success case emits `Dispatched` event. #### dispatch_and_touch: @@ -210,7 +210,7 @@ To mutate or modify a fuel tank, the caller must be the owner of the fuel tank, To mutate a fuel tank using the explorer, head to `Network` → `Fuel tanks`. Mutating a fuel tank involves three steps 1. Freeze the fuel tank 2. Mutate the fuel tank 3. Unfreeze the fuel tank 1. To Freeze the fuel tank, head to `Network` → `Fuel tanks`, this will present a list of all fuel tanks, select the fuel tank you wish to mutate and select freeze/unfreeze. In the next dialog box, set `is_frozen` to `true` and execute the transaction -2. To mutate the fuel tank, head to `Network` → `Fuel Tanks` → under specific fuel tank → `Mutate`In the modal, Select the Account (the owner of the fuel tank) and select the fuel tank id (you can get this from the fuel tanks page in the previous step) and add any modifications to the fuel tank. +2. To mutate the fuel tank, head to `Network` → `Fuel Tanks` → under specific fuel tank → `Mutate`In the modal, Select the Account (the owner of the fuel tank) and select the fuel tank id (you can get this from the fuel tanks page in the previous step) and add any modifications to the fuel tank. If successful, you should see the event with you changes in the explorer `Network` tab 3. To unfreeze the fuel tank, head to `Network` → `Fuel tanks`, and perform the same step but select the `is_frozen` to `false` @@ -294,8 +294,8 @@ fn select_fuel_tank( The method returns a `RpcResult>`, which can be interpreted as: -- `Option<(Address, u32)>` : An optional tuple where: - `Address`: The selected fuel tank's address. +- `Option<(Address, u32)>` : An optional tuple where: + `Address`: The selected fuel tank's address. `u32`: The amount of fuel (funds) available in the selected tank. If no appropriate fuel tanks are found the rpc will return null. @@ -318,7 +318,7 @@ const MATRIX_URL = "ws://127.0.0.1:56287"; async function sendTransaction() { // Initialize the provider const provider = new WsProvider(MATRIX_URL); - + // Create the API instance const api = await ApiPromise.create({ provider, diff --git a/docs/04-enjin-blockchain/03-enjin-matrixchain/03-enjin-matrixchain.md b/docs/04-enjin-blockchain/03-enjin-matrixchain/03-enjin-matrixchain.md index 197e8e5..ea7476d 100644 --- a/docs/04-enjin-blockchain/03-enjin-matrixchain/03-enjin-matrixchain.md +++ b/docs/04-enjin-blockchain/03-enjin-matrixchain/03-enjin-matrixchain.md @@ -8,7 +8,7 @@ import GlossaryTerm from '@site/src/components/GlossaryTerm'; ## What is the Enjin Matrixchain? -Enjin is a blockchain platform that provides a developer-friendly Matrixchain built on the Enjin Relaychain specifically designed for digital assets. Unlike most digital assets that run on general-purpose chains, Enjin provides faster on-chain digital asset creation and interactions, greater security, interoperability, and flexibility. +Enjin is a blockchain platform that provides a developer-friendly Matrixchain built on the Enjin Relaychain specifically designed for digital assets. Unlike most digital assets that run on general-purpose chains, Enjin provides faster on-chain digital asset creation and interactions, greater security, interoperability, and flexibility. Enjin's digital asset functionality is built right into the protocol level, allowing developers to focus on building their apps instead of worrying about security and functionality. Enjin's developer-friendly approach offers a simplified and streamlined experience that can accelerate the creation and adoption of digital assets on the blockchain. ## Enjin Matrixchain Features diff --git a/docs/04-enjin-blockchain/03-enjin-matrixchain/03-marketplace-pallet.md b/docs/04-enjin-blockchain/03-enjin-matrixchain/03-marketplace-pallet.md index 5fc9d6f..c4d5701 100644 --- a/docs/04-enjin-blockchain/03-enjin-matrixchain/03-marketplace-pallet.md +++ b/docs/04-enjin-blockchain/03-enjin-matrixchain/03-marketplace-pallet.md @@ -35,12 +35,12 @@ Bytes used to differentiate listings that have the same values. ### Make Asset -The asset being sold. +The asset being sold. When creating an offer, it's the asset being requested. ### Take Asset -The asset requested. +The asset requested. When creating an offer, it's the asset being bought. ### Fee side @@ -145,7 +145,7 @@ Only the latest bid is stored on an auction. All bids must increase by the `mini **`place_counter_offer`** - Creates a Counter offer to an existing offer listing. Can only be called by an account that owns the token. -**`answer_counter_offer`** - Either accept, reject, or counter a counter offer. Callable by the offer creator (buyer) and the counter offer creator (seller). +**`answer_counter_offer`** - Either accept, reject, or counter a counter offer. Callable by the offer creator (buyer) and the counter offer creator (seller). When a counter offer is successfully accepted/rejected, it is removed from storage. **`set_protocol_fee`** - Change the protocol fee. Can only be called by the `ProtocolFeeOrigin` set in the config. diff --git a/docs/04-enjin-blockchain/04-enjin-blockchain.md b/docs/04-enjin-blockchain/04-enjin-blockchain.md index 55417ce..6a17264 100644 --- a/docs/04-enjin-blockchain/04-enjin-blockchain.md +++ b/docs/04-enjin-blockchain/04-enjin-blockchain.md @@ -11,7 +11,7 @@ The Enjin Blockchain is a Layer 1 protocol designed with native NFT functionalit This documentation provides technical details and guidance for developers aiming to integrate with or leverage the Enjin Blockchain's capabilities. -Enjin Blockchain is made up of the Enjin Relaychain and the Enjin . +Enjin Blockchain is made up of the Enjin Relaychain and the Enjin . ![](/img/components/blockchain-infrastructure/1.png) diff --git a/docs/05-enjin-platform/02-chain-state.md b/docs/05-enjin-platform/02-chain-state.md index 20a5c2b..e7101af 100644 --- a/docs/05-enjin-platform/02-chain-state.md +++ b/docs/05-enjin-platform/02-chain-state.md @@ -6,9 +6,9 @@ description: "Learn how to monitor and manage the chain state for your Enjin blo import GlossaryTerm from '@site/src/components/GlossaryTerm'; -The chain state of a blockchain is a snapshot of all the data it contains at a given moment. +The chain state of a blockchain is a snapshot of all the data it contains at a given moment. -This includes account balances, ownership of digital assets, and other on-chain information. +This includes account balances, ownership of digital assets, and other on-chain information. It's regularly updated through the network's consensus algorithm to maintain data integrity. @@ -16,11 +16,11 @@ To query this state, there are several methods, but let's focus on using the Enj ## Enjin Platform -The Enjin Platform uses a blockchain indexer to gather transactions, aiming to provide the latest chain state as quickly as possible. +The Enjin Platform uses a blockchain indexer to gather transactions, aiming to provide the latest chain state as quickly as possible. Direct queries to the blockchain via an RPC node are possible but can be demanding on resources, especially with many simultaneous queries. Indexers mitigate this issue. -With the Enjin Platform, you can use advanced queries involving multiple relationships to get data faster than directly from RPC nodes. +With the Enjin Platform, you can use advanced queries involving multiple relationships to get data faster than directly from RPC nodes. Here's an example of a query in the GraphiQL playground, showing the state of collection ID 2000: @@ -85,10 +85,10 @@ Open the Enjin Console, you can connect to the network by clicking on the follow To look up data from a specific module (called a ) on the Chainstate page of the Enjin Console, you just need to pick the pallet you're interested in and then select the data item you need from that pallet. -Remember that the database used by the blockchain node is structured like a tree (specifically, a radix tree), which is different from a standard SQL database. +Remember that the database used by the blockchain node is structured like a tree (specifically, a radix tree), which is different from a standard SQL database. -- **Pallet Storage** on a blockchain is like a separate database for each category of data. -- **Specific Storage** within a pallet is akin to a table in a database, holding actual data entries. +- **Pallet Storage** on a blockchain is like a separate database for each category of data. +- **Specific Storage** within a pallet is akin to a table in a database, holding actual data entries. Unlike a traditional SQL database with tables, a blockchain organizes data in a tree structure for efficiency, but the concept of separate areas for different data types (pallets) and specific datasets (storages) within those areas is similar. diff --git a/docs/05-enjin-platform/03-working-with-events.md b/docs/05-enjin-platform/03-working-with-events.md index fddf032..6b96dbf 100644 --- a/docs/05-enjin-platform/03-working-with-events.md +++ b/docs/05-enjin-platform/03-working-with-events.md @@ -7,15 +7,15 @@ description: "Explore how to handle blockchain events within the Enjin platform, import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -In the blockchain ecosystem, "events" refer to important actions or changes within the blockchain network. +In the blockchain ecosystem, "events" refer to important actions or changes within the blockchain network. This includes things like creating or changing digital assets, transferring balances, and any other actions that alter the chain's state. These events are recorded on the blockchain, providing a transparent and unchangeable history of all activities. Monitoring and analyzing these events helps users and developers understand the flow of transactions and respond to specific actions or conditions in the network. This is key for decentralized applications and games, enabling automated interactions and improving overall functionality. :::warning Note on Address Formats in Platform Events -Please note that all account addresses included in platform events, such as channel names or any addresses within the event payload, are formatted as **public keys**. -For example, in a "Transfer" event, the "from" account address appears in its public key format. +Please note that all account addresses included in platform events, such as channel names or any addresses within the event payload, are formatted as **public keys**. +For example, in a "Transfer" event, the "from" account address appears in its public key format. If needed, you may use the [Account Format Transform tool](https://matrix.subscan.io/tools/format_transform) to convert between **SS58-encoded address format** (e.g., "cx...123" for the Canary Matrixchain or "cn...123" for the Canary Relaychain) and public key format. ::: diff --git a/docs/05-enjin-platform/04-enterprise-on-prem/02-local-installation.md b/docs/05-enjin-platform/04-enterprise-on-prem/02-local-installation.md index 02242c9..0612873 100644 --- a/docs/05-enjin-platform/04-enterprise-on-prem/02-local-installation.md +++ b/docs/05-enjin-platform/04-enterprise-on-prem/02-local-installation.md @@ -29,9 +29,9 @@ You login by editing the `configs/core/.env file`. Here, you use the `DAEMON_ACC ### 3\. Run the Start Script -In the main folder of the platform, there are two start scripts: `start.bat` for Windows and `start.sh` for macOS and Linux. +In the main folder of the platform, there are two start scripts: `start.bat` for Windows and `start.sh` for macOS and Linux. -Running either script sets everything up automatically. +Running either script sets everything up automatically. #### Running the Start script on Windows @@ -39,7 +39,7 @@ To run the Start script on windows, simply double click the `start.bat` file. #### Running the Start script on MacOS / Linux -To run the Start script on MacOS / Linux, open your Terminal application on MacOS, or establish an SSH connection to your Linux server. +To run the Start script on MacOS / Linux, open your Terminal application on MacOS, or establish an SSH connection to your Linux server. Then, navigate to the platform's root directory using the `cd platform` command, and start the script using the following command: ```bash @@ -72,18 +72,18 @@ y Done, your daemon password is: 0c0b44096a6f54d3ab92aff019a7dd5ecf383fd0df908e71aec34b62145e96e5 -[+] Building 11.8s (26/26) FINISHED +[+] Building 11.8s (26/26) FINISHED ............ Let's get your wallet daemon address, please wait... [+] Running 1/1 - ✔ Container platform-daemon-1 Started + ✔ Container platform-daemon-1 Started Your wallet daemon address is: efUGPaFNbV3JyqEfv27eRWkQ2tcMd5ympi83p1c2q5VUXPttv Do you want to start all platform services? (y/n) y -[+] Building 179.1s (141/167) +[+] Building 179.1s (141/167) ............... [+] Running 8/8 @@ -94,14 +94,14 @@ y ✔ Container platform-websocket-1 Started ✔ Container platform-app-1 Started ✔ Container platform-ingest-1 Started - ✔ Container platform-beam-1 Started + ✔ Container platform-beam-1 Started Your Enjin Platform is now running, please visit: http://localhost:8000/graphiql ``` ### 4\. Choose Your Network -For the Enjin Platform Starter, the default network is set to `enjin-matrixchain` (mainnet). You can switch different networks by editing NETWORK variable in the `configs/core/.env` file. +For the Enjin Platform Starter, the default network is set to `enjin-matrixchain` (mainnet). You can switch different networks by editing NETWORK variable in the `configs/core/.env` file. Accepted values are `enjin-matrixchain` / `canary-matrixchain` / `local-matrixchain`. :::info To apply the changes, run without caching @@ -114,7 +114,7 @@ There are two ways of interacting with Enjin Platform, through the GraphQL API. ![Local Platform GraphiQL Playground](/img/guides/going-open-source/local-platform-graphiql.png) -But you can also use the Enjin Platform UI which you can access at `http://localhost:8000`, you might see this setup screen where you should enter the `BASIC_AUTH_TOKEN` that was shown to you in the setup script. +But you can also use the Enjin Platform UI which you can access at `http://localhost:8000`, you might see this setup screen where you should enter the `BASIC_AUTH_TOKEN` that was shown to you in the setup script. ![Setup Configuration](/img/guides/going-open-source/setup-configuration.png) @@ -176,8 +176,8 @@ docker compose up -d ### 8\. Configure Collections (Optional) -By default, the Enjin Platform syncs token data from all of the collections in the Blockchain. -To save storage and sync time, you can configure the Enjin Platform to sync only selected collections. +By default, the Enjin Platform syncs token data from all of the collections in the Blockchain. +To save storage and sync time, you can configure the Enjin Platform to sync only selected collections. To do that, head over to http://localhost:8000/graphiql and run the `AddToTracked` mutation, with the IDs of the collections you wish to sync, like so: ```graphql diff --git a/docs/05-enjin-platform/04-enterprise-on-prem/04-enterprise-on-prem.md b/docs/05-enjin-platform/04-enterprise-on-prem/04-enterprise-on-prem.md index 3067470..aa3c93a 100644 --- a/docs/05-enjin-platform/04-enterprise-on-prem/04-enterprise-on-prem.md +++ b/docs/05-enjin-platform/04-enterprise-on-prem/04-enterprise-on-prem.md @@ -5,10 +5,10 @@ description: "Find out how to set up enterprise on-prem for your blockchain infr --- :::info Choosing the right platform for you There are two version of the Enjin Platform -- The [Enjin Platform Cloud](http://platform.enjin.io/) +- The [Enjin Platform Cloud](http://platform.enjin.io/) - A cloud-hosted version that you can start using straight away. - - Ideal if you're new to Enjin or don't want to manage your own infrastructure. -- The [ Enterprise On-Prem Enjin Platform](https://github.com/enjin/platform) + - Ideal if you're new to Enjin or don't want to manage your own infrastructure. +- The [ Enterprise On-Prem Enjin Platform](https://github.com/enjin/platform) - A self-hosted solution that offers customization and full control over the software. - Best for those who are more tech-savvy. It gives you full control over the data and source code, allowing you to customize the platform extensively, including adding new features, writing your own Beam conditions or creating custom events. However, running it requires systems administration skills. You'll need to handle backups, updates, server maintenance, and set up internet access and SSL certificates for the platform. ::: @@ -60,28 +60,28 @@ The Enjin Platform indexer is designed to minimize the blockchain's storage and ### Data Management Tool -The Data Management Tool from Indexers organizes and structures blockchain data. +The Data Management Tool from Indexers organizes and structures blockchain data. It creates a centralized database, making it easier for game developers to access specific data they need without sorting through all blockchain data. ### Quick Sync Method -The Enjin Platform features a quick sync method allowing developers to rapidly update and store the latest blockchain state using a pre-packaged index. +The Enjin Platform features a quick sync method allowing developers to rapidly update and store the latest blockchain state using a pre-packaged index. -This method saves time by avoiding full blockchain syncing. +This method saves time by avoiding full blockchain syncing. A "Worker" service manages and processes all blockchain blocks and their associated events. ### Auto-Healing Feature -The Enjin Platform has an auto-healing feature that constantly checks the database's health. +The Enjin Platform has an auto-healing feature that constantly checks the database's health. If it finds problems like corruption or mismatches, it automatically updates to match the current blockchain state, keeping data accurate and current. ### Events & WebSockets -The Enjin Platform sends notifications through WebSocket channels about activities on the platform. +The Enjin Platform sends notifications through WebSocket channels about activities on the platform. -For instance, it alerts when a new collection is created. Clients can get these updates by subscribing their wallets to the WebSocket channel via the Enjin Wallet Daemon. +For instance, it alerts when a new collection is created. Clients can get these updates by subscribing their wallets to the WebSocket channel via the Enjin Wallet Daemon. This daemon not only checks for transactions to sign but also listens for these event notifications, enabling real-time interaction and dynamic experiences on the platform. \ No newline at end of file diff --git a/docs/05-enjin-platform/04-enterprise-on-prem/05-extending-the-platform.md b/docs/05-enjin-platform/04-enterprise-on-prem/05-extending-the-platform.md index 7388bcb..573a537 100644 --- a/docs/05-enjin-platform/04-enterprise-on-prem/05-extending-the-platform.md +++ b/docs/05-enjin-platform/04-enterprise-on-prem/05-extending-the-platform.md @@ -3,7 +3,7 @@ title: "Extending the Platform" slug: "extending-the-platform" description: "Learn how to extend the Enjin platform by adding custom features and integrations to meet the unique needs of your blockchain projects." --- -Our platform lets you add your own code to customize it without changing the original code. For example, you can use the `adhocRules` feature in the Beam Mutation to set custom rules. +Our platform lets you add your own code to customize it without changing the original code. For example, you can use the `adhocRules` feature in the Beam Mutation to set custom rules. One way to use this is by adding a `ValidationRule` to the `ClaimBeamMutation`. This rule limits how many times a user can claim a Beam, based on their IP address and wallet account. It ensures a user can only claim once per IP or account. diff --git a/docs/05-enjin-platform/04-enterprise-on-prem/_Telemetry_02-local-installation.md b/docs/05-enjin-platform/04-enterprise-on-prem/_Telemetry_02-local-installation.md index 40d0093..4775f91 100644 --- a/docs/05-enjin-platform/04-enterprise-on-prem/_Telemetry_02-local-installation.md +++ b/docs/05-enjin-platform/04-enterprise-on-prem/_Telemetry_02-local-installation.md @@ -29,9 +29,9 @@ You login by editing the `configs/core/.env file`. Here, you use the `DAEMON_ACC ### 3\. Run the Start Script -In the main folder of the platform, there are two start scripts: `start.bat` for Windows and `start.sh` for macOS and Linux. +In the main folder of the platform, there are two start scripts: `start.bat` for Windows and `start.sh` for macOS and Linux. -Running either script sets everything up automatically. +Running either script sets everything up automatically. #### Running the Start script on Windows @@ -39,7 +39,7 @@ To run the Start script on windows, simply double click the `start.bat` file. #### Running the Start script on MacOS / Linux -To run the Start script on MacOS / Linux, open your Terminal application on MacOS, or establish an SSH connection to your Linux server. +To run the Start script on MacOS / Linux, open your Terminal application on MacOS, or establish an SSH connection to your Linux server. Then, navigate to the platform's root directory using the `cd platform` command, and start the script using the following command: ```bash @@ -72,18 +72,18 @@ y Done, your daemon password is: 0c0b44096a6f54d3ab92aff019a7dd5ecf383fd0df908e71aec34b62145e96e5 -[+] Building 11.8s (26/26) FINISHED +[+] Building 11.8s (26/26) FINISHED ............ Let's get your wallet daemon address, please wait... [+] Running 1/1 - ✔ Container platform-daemon-1 Started + ✔ Container platform-daemon-1 Started Your wallet daemon address is: efUGPaFNbV3JyqEfv27eRWkQ2tcMd5ympi83p1c2q5VUXPttv Do you want to start all platform services? (y/n) y -[+] Building 179.1s (141/167) +[+] Building 179.1s (141/167) ............... [+] Running 8/8 @@ -94,14 +94,14 @@ y ✔ Container platform-websocket-1 Started ✔ Container platform-app-1 Started ✔ Container platform-ingest-1 Started - ✔ Container platform-beam-1 Started + ✔ Container platform-beam-1 Started Your Enjin Platform is now running, please visit: http://localhost:8000/graphiql ``` ### 4\. Choose Your Network -For the Enjin Platform Starter, the default network is set to `enjin-matrixchain` (mainnet). You can switch different networks by editing NETWORK variable in the `configs/core/.env` file. +For the Enjin Platform Starter, the default network is set to `enjin-matrixchain` (mainnet). You can switch different networks by editing NETWORK variable in the `configs/core/.env` file. Accepted values are `enjin-matrixchain` / `canary-matrixchain` / `local-matrixchain`. :::info To apply the changes, run without caching @@ -114,7 +114,7 @@ There are two ways of interacting with Enjin Platform, through the GraphQL API. ![Local Platform GraphiQL Playground](/img/guides/going-open-source/local-platform-graphiql.png) -But you can also use the Enjin Platform UI which you can access at `http://localhost:8000`, you might see this setup screen where you should enter the `BASIC_AUTH_TOKEN` that was shown to you in the setup script. +But you can also use the Enjin Platform UI which you can access at `http://localhost:8000`, you might see this setup screen where you should enter the `BASIC_AUTH_TOKEN` that was shown to you in the setup script. ![Setup Configuration](/img/guides/going-open-source/setup-configuration.png) @@ -176,8 +176,8 @@ docker compose up -d ### 8\. Configure Collections (Optional) -By default, the Enjin Platform syncs token data from all of the collections in the Blockchain. -To save storage and sync time, you can configure the Enjin Platform to sync only selected collections. +By default, the Enjin Platform syncs token data from all of the collections in the Blockchain. +To save storage and sync time, you can configure the Enjin Platform to sync only selected collections. To do that, head over to http://localhost:8000/graphiql and run the `AddToTracked` mutation, with the IDs of the collections you wish to sync, like so: ```graphql diff --git a/docs/05-enjin-platform/05-enjin-platform.md b/docs/05-enjin-platform/05-enjin-platform.md index f5ea7f9..9f88720 100644 --- a/docs/05-enjin-platform/05-enjin-platform.md +++ b/docs/05-enjin-platform/05-enjin-platform.md @@ -25,7 +25,7 @@ This versatile platform offers two versions to cater to different needs. The [En ## How does it work? -How does Enjin Platform bring all these functionalities together? The answer lies in its structure. The platform comprises distinct components each designed to offer a unique solution for developers and creators. +How does Enjin Platform bring all these functionalities together? The answer lies in its structure. The platform comprises distinct components each designed to offer a unique solution for developers and creators.

@@ -33,7 +33,7 @@ How does Enjin Platform bring all these functionalities together? The answer lie ### API & Schema -The [Open-Source Enjin Platform](https://github.com/enjin/platform) also provides a ready-made application that simplifies blockchain actions for developers by removing the need for encoding, signing transactions, and understanding complex technical details. +The [Open-Source Enjin Platform](https://github.com/enjin/platform) also provides a ready-made application that simplifies blockchain actions for developers by removing the need for encoding, signing transactions, and understanding complex technical details. The project has two key components: diff --git a/docs/06-enjin-products/01-enjin-tech-stack.md b/docs/06-enjin-products/01-enjin-tech-stack.md index d09c5c6..4f97b75 100644 --- a/docs/06-enjin-products/01-enjin-tech-stack.md +++ b/docs/06-enjin-products/01-enjin-tech-stack.md @@ -7,7 +7,7 @@ Enjin is the ideal blockchain platform for your game or business due to its gami ![](/img/components/1.webp) -Enjin's tools and services, originally developed for gaming, are versatile and applicable to businesses of all sizes and industries. Whether seeking to create blockchain products or utilize tokenized digital assets for acquisition, retention, engagement, and monetization strategies, Enjin's expertise can be a valuable resource. +Enjin's tools and services, originally developed for gaming, are versatile and applicable to businesses of all sizes and industries. Whether seeking to create blockchain products or utilize tokenized digital assets for acquisition, retention, engagement, and monetization strategies, Enjin's expertise can be a valuable resource. The Enjin Platform is a powerful Platform as a Service (PaaS) for blockchain technology, designed to simplify the creation and administration of blockchain games. Unlike traditional blockchain game development that requires building and maintaining complex infrastructure, the Enjin Platform offers a comprehensive, and adaptable set of tools and services. With Enjin's Blockchain SDKs, Platform API, and Automation services such as the wallet Daemon, game developers can revolutionize the creation of blockchain games. The Enjin Platform also incorporates Enjin Relaychain and Enjin Matrixchain, which serve as the blockchain backbone of the entire system. diff --git a/docs/06-enjin-products/03-enjin-wallet.md b/docs/06-enjin-products/03-enjin-wallet.md index 1d0caee..017ac2d 100644 --- a/docs/06-enjin-products/03-enjin-wallet.md +++ b/docs/06-enjin-products/03-enjin-wallet.md @@ -16,7 +16,7 @@ The Enjin Wallet's updated user interface and designs ensure accessibility to us Game developers can enjoy seamless integration with the Enjin Platform when using the new Enjin Wallet, as it is fully compatible with the Enjin Blockchain, our API, SDKs, and NFT.io support. This makes the Enjin Wallet an ideal digital wallet for storing, trading and transferring NFTs in a secure and seamless way. With its user-friendly interface and broad cryptocurrency compatibility, the Enjin Wallet is a valuable tool for anyone looking to engage with the Enjin ecosystem. -The Enjin Wallet is not limited to the Enjin Blockchain and also supports a wide range of other blockchains, including BTC, LTC, ETH, BEP20, Polygon, Polkadot, KSM, Doge, ERC20, and other standards. This broad spectrum of compatibility ensures that users can store, trade, and manage a diverse range of digital assets all in one place. +The Enjin Wallet is not limited to the Enjin Blockchain and also supports a wide range of other blockchains, including BTC, LTC, ETH, BEP20, Polygon, Polkadot, KSM, Doge, ERC20, and other standards. This broad spectrum of compatibility ensures that users can store, trade, and manage a diverse range of digital assets all in one place. The Enjin Wallet is available for both Android and iOS devices: Download from [Google Play](https://play.google.com/store/apps/details?id=com.enjin.mobile.wallet&hl=en&gl=US&pli=1) diff --git a/docs/06-enjin-products/04-nftio-marketplace.md b/docs/06-enjin-products/04-nftio-marketplace.md index ca47c63..88f4272 100644 --- a/docs/06-enjin-products/04-nftio-marketplace.md +++ b/docs/06-enjin-products/04-nftio-marketplace.md @@ -13,7 +13,7 @@ At [NFT.io](http://nft.io/), you can easily explore digital art, crypto-collecti ## Key Benefits & Features -- **Connect using your very own wallet:** The platform is seamlessly integrated with the Enjin Wallet. +- **Connect using your very own wallet:** The platform is seamlessly integrated with the Enjin Wallet. No Ads: Enjoy an ad-free experience on NFT.io. You can explore the platform without any interruption from pesky promotions, dangerous scams, or annoying ads. - **Beginner Friendly:** NFT.io has been revamped from scratch, boasting a user-friendly interface that caters to people from diverse backgrounds and skill levels. Whether you're an experienced NFT trader or a beginner, NFT.io offers simplicity and ease of use for all. - **Made for all NFTs:** NFT.io is designed to support all types of NFTs. Whether you're an art collector, a music enthusiast, a fan of crypto collectibles, or simply browsing, we cater to all NFT categories. diff --git a/docs/06-enjin-products/05-beam.md b/docs/06-enjin-products/05-beam.md index a0cf0e4..dad3878 100644 --- a/docs/06-enjin-products/05-beam.md +++ b/docs/06-enjin-products/05-beam.md @@ -36,7 +36,7 @@ Beam QR codes can be shared through various visually accessible platforms, inclu ![](/img/components/8.png) :::tip Master Enjin Beam -Want to unlock the full potential of your NFT distributions? Our comprehensive guide to Enjin Beam offers advanced techniques, detailed setup instructions, and strategic insights for maximizing your campaign's reach and impact. +Want to unlock the full potential of your NFT distributions? Our comprehensive guide to Enjin Beam offers advanced techniques, detailed setup instructions, and strategic insights for maximizing your campaign's reach and impact. ➡️ **[Read the In-Depth Guide to Enjin Beam](/02-guides/01-platform/01-managing-tokens/06-create-qr-drops.md)** ::: @@ -62,7 +62,7 @@ The Integer Range type is another new feature that makes creating Beams more eff ### Set attributes on the go! -Developers can now set attributes to the minted tokens as they're being minted on-chain for the first time. This feature allows for unique and computed metadata to be added to tokens during the creation process. +Developers can now set attributes to the minted tokens as they're being minted on-chain for the first time. This feature allows for unique and computed metadata to be added to tokens during the creation process. This interaction with the mint on-demand feature is a match made in heaven as game developers will be able to create the tokens. At the same time, the beam is being generated, and they can set the metadata and mint the tokens as the demand for new tokens increases. ![](/img/components/12.png) diff --git a/docusaurus.config.js b/docusaurus.config.js index 4207877..278a9dd 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -90,7 +90,7 @@ const config = { {href: 'https://chatgpt.com/g/g-678f70643d2c8191a78baff699e46e5f-enjin-platform-ai', label: 'AI Assistant', position: 'left'}, {href: 'https://enjin.io/changelog', label: 'Changelog', position: 'left'}, {href: '/tools', label: 'Tools', position: 'left'}, - + { href: 'https://console.enjin.io', label: 'Blockchain Console', diff --git a/src/css/custom.css b/src/css/custom.css index 10fe567..0d4b3f3 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -130,12 +130,12 @@ padding: 0.875rem 2rem; } -[data-theme='light'] +[data-theme='light'] .button:hover { color: var(--button-hover); } -[data-theme='dark'] +[data-theme='dark'] .button:hover { color: var(--button-hover); } diff --git a/src/glossary.js b/src/glossary.js index d8aa1ab..19be878 100644 --- a/src/glossary.js +++ b/src/glossary.js @@ -80,8 +80,8 @@ const glossary = { enjin_platform_cloud: { name: "Enjin Platform Cloud", definition: "A cloud hosted Enjin Platform that allows you to kickstart your next NFT project in just a few minutes. Ran on Enjin's robust servers, yet fully secure and isolated to your unique project instance, you can launch your NFT game with a few simple steps. Just create an account, set it up, generate your first API key, and voila! Your NFT game is operational." }, enterprise_on_prem_platform: { name: "Enterprise On-Prem Enjin Platform", definition: "The Enterprise On-Prem Enjin platform is the most powerful and advanced open-source framework for building NFT platforms. This provides you with comprehensive control over your data, eliminating dependence on any third-party servers or services." }, }; - + export default glossary; - + diff --git a/src/pages/enjin-blockchain-nodes/building-from-source.md b/src/pages/enjin-blockchain-nodes/building-from-source.md index d222897..425e3ad 100644 --- a/src/pages/enjin-blockchain-nodes/building-from-source.md +++ b/src/pages/enjin-blockchain-nodes/building-from-source.md @@ -19,8 +19,8 @@ This guide was tested in Ubuntu 20.04 and macOS 13 (Ventura). The following steps will build the latest version of the Enjin Matrixchain node from the master branch: 1. Install Rust and Substrate dependencies following the official [Substrate installation guide](https://docs.substrate.io/install/). -2. Clone the Enjin repository: - `git clone https://github.com/enjin/matrixchain.git` +2. Clone the Enjin repository: + `git clone https://github.com/enjin/matrixchain.git` `cd matrixchain` 3. Checkout the latest version of the code: `git checkout v3.1.4` 4. Build the node: `cargo build --release`