diff --git a/docs/01-getting-started/02-quick-start-guide.md b/docs/01-getting-started/02-quick-start-guide.md index 523d472..c4aeea3 100644 --- a/docs/01-getting-started/02-quick-start-guide.md +++ b/docs/01-getting-started/02-quick-start-guide.md @@ -28,7 +28,7 @@ The Enjin Platform is your central hub for managing blockchain projects, collect ### Steps to Create an Account: -1. Navigate to the Enjin Platform: https://platform.beta.enjin.io/ +1. Navigate to the Enjin Platform: https://platform.enjin.io/ 2. Click on the "Create an account" button. 3. Fill in your account credentials and click on the "Register" button. 4. Verify your email address by clicking the link sent to your inbox. @@ -42,7 +42,7 @@ Every on-chain action you initiate through the Platform — creating a collectio ### Steps to Set Up: -1. On the [Account Settings](https://platform.beta.enjin.io/settings) page, click **Create API Token** and copy the new token somewhere safe. +1. On the [Account Settings](https://platform.enjin.io/settings) page, click **Create API Token** and copy the new token somewhere safe. 2. Follow the [Wallet Daemon Setup guide](/01-getting-started/06-using-wallet-daemon.md) to download, configure, and run the daemon. It will use the API token from step 1 to know which Platform account to sign for. Once the daemon is running and connected, every transaction you submit from this Platform account is signed automatically. @@ -80,18 +80,18 @@ You can interact with the Enjin Platform and initiate blockchain requests in sev ::: 1. **Create Collection:** - - In the Platform menu, navigate to **[Collections](https://platform.beta.enjin.io/collections)** and click the "**Create Collection**" button. + - In the Platform menu, navigate to **[Collections](https://platform.enjin.io/collections)** and click the "**Create Collection**" button. - Customize your collection — you can specify its Mint Policy, Royalties, Explicit Royalty Currencies, and Attributes. To learn more about collection configuration, see the [Create Collections guide](/02-guides/01-platform/01-managing-tokens/01-creating-collections.md). - - Click **Create** to submit. The Wallet Daemon signs and broadcasts the transaction automatically — watch it move from `PENDING` → `BROADCAST` → `FINALIZED` on the [Transactions page](https://platform.beta.enjin.io/transactions). - - Once finalized, the new collection appears on the [Collections page](https://platform.beta.enjin.io/collections) with its assigned `id`. Keep that id handy for the next step. + - Click **Create** to submit. The Wallet Daemon signs and broadcasts the transaction automatically — watch it move from `PENDING` → `BROADCAST` → `FINALIZED` on the [Transactions page](https://platform.enjin.io/transactions). + - Once finalized, the new collection appears on the [Collections page](https://platform.enjin.io/collections) with its assigned `id`. Keep that id handy for the next step. ![A collection with the collection ID next to it](/img/getting-started/v3-collection-card.png) 2. **Create Token:** - - Open the [Collections page](https://platform.beta.enjin.io/collections), click the collection you just created, then click the "**Create Token**" button at the top of the collection's page. + - Open the [Collections page](https://platform.enjin.io/collections), click the collection you just created, then click the "**Create Token**" button at the top of the collection's page. - Customize your token — Token ID, initial supply, cap, royalty behavior, and attributes. To learn more about token configuration, see the [Create Tokens guide](/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md). - - In the **Recipient** input field, paste the of the wallet that should receive the token's initial supply. To send the supply to your own daemon's wallet, copy its address from the [Settings page](https://platform.beta.enjin.io/settings). - - Click **Create** to submit. The Wallet Daemon signs and broadcasts the transaction automatically; track it on the [Transactions page](https://platform.beta.enjin.io/transactions). + - In the **Recipient** input field, paste the of the wallet that should receive the token's initial supply. To send the supply to your own daemon's wallet, copy its address from the [Settings page](https://platform.enjin.io/settings). + - Click **Create** to submit. The Wallet Daemon signs and broadcasts the transaction automatically; track it on the [Transactions page](https://platform.enjin.io/transactions). :::tip Programmatic Creation You can also create collections and tokens using the API or SDKs. @@ -136,7 +136,7 @@ This is a core interaction — transferring an NFT from your project's wallet (o Sending a token uses the same `CreateTransaction` mutation as the rest of the Platform, with the `transferToken` field set on the `transaction` input. You'll need the recipient's address, the collection id, the token id, and the amount. -Run the following from the [Enjin Platform GraphiQL Playground](https://platform.beta.enjin.io/graphiql) — or from your own GraphQL client (in which case add `Authorization: Bearer ` to your request headers): +Run the following from the [Enjin Platform GraphiQL Playground](https://platform.enjin.io/graphiql) — or from your own GraphQL client (in which case add `Authorization: Bearer ` to your request headers): ```graphql mutation TransferToken { @@ -159,7 +159,7 @@ mutation TransferToken { } ``` -The Wallet Daemon signs and broadcasts automatically. The response includes the transaction's `uuid` — use it to poll status with `GetTransaction(network: CANARY, chain: MATRIX, uuid: "")` or watch the row on the [Transactions page](https://platform.beta.enjin.io/transactions). +The Wallet Daemon signs and broadcasts automatically. The response includes the transaction's `uuid` — use it to poll status with `GetTransaction(network: CANARY, chain: MATRIX, uuid: "")` or watch the row on the [Transactions page](https://platform.enjin.io/transactions). Once finalized, the transfer event is emitted with the recipient and amount — see [Working with Events](/05-enjin-platform/03-working-with-events.md) for how to read it. @@ -179,7 +179,7 @@ Once you know a user's wallet address, you'll often need to check which tokens t ### Implementation (GraphQL Example): -Use the `GetAccount` query to read an address's holdings. Run this from the [GraphiQL Playground](https://platform.beta.enjin.io/graphiql) or your own GraphQL client: +Use the `GetAccount` query to read an address's holdings. Run this from the [GraphiQL Playground](https://platform.enjin.io/graphiql) or your own GraphQL client: ```graphql query FetchingWalletTokens { @@ -220,7 +220,7 @@ Congratulations! You've covered the basics of setting up your project on the Enj :::warning **Ready for Production?** Remember, this guide used the **Canary testnet** for development and testing. When you are ready to launch your application live, you will need to: -1. Switch the network selector to **Enjin (mainnet)** in the [Enjin Platform Cloud](https://platform.beta.enjin.io/). +1. Switch the network selector to **Enjin (mainnet)** in the [Enjin Platform Cloud](https://platform.enjin.io/). 2. Update your application's API calls or SDKs to target [**mainnet**](/01-getting-started/05-using-enjin-api/05-using-enjin-api.md#selecting-a-network-and-chain) by passing `network: ENJIN` on each query and mutation. ::: 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 14765ee..173f590 100644 --- a/docs/01-getting-started/04-using-the-enjin-platform.md +++ b/docs/01-getting-started/04-using-the-enjin-platform.md @@ -15,7 +15,7 @@ You can obtain cENJ (Canary ENJ) for testing from the [built-in Canary faucet](# ## 1. Set Up an Account -To get started, go ahead and create an account on the [Enjin Platform Cloud](https://platform.beta.enjin.io/) and **verify your email address.** +To get started, go ahead and create an account on the [Enjin Platform Cloud](https://platform.enjin.io/) and **verify your email address.** The Enjin Platform is chain-agnostic — a single dashboard covers both networks. Use the **network selector in the top-right corner** of the platform UI to switch between **Canary** (testnet) and **Enjin** (mainnet). We recommend starting on Canary while you build and test. @@ -26,7 +26,7 @@ The Enjin Platform is chain-agnostic — a single dashboard covers both networks ## 2. Set Up an API Token -Once your account is created, create a new API token by clicking the "**Create API Token**" button on the [Account Settings](https://platform.beta.enjin.io/settings) page. +Once your account is created, create a new API token by clicking the "**Create API Token**" button on the [Account Settings](https://platform.enjin.io/settings) page. Copy and save that token somewhere safe — you'll need it to configure your and to authenticate API requests. :::tip Note @@ -83,7 +83,7 @@ However, if you need to make a Platform request programmatically, you can do tha ### Option A. Using the Enjin Dashboard -In the Platform menu, navigate to "**[Collections](https://platform.beta.enjin.io/collections)**" and click the "**Create Collection**" button. +In the Platform menu, navigate to "**[Collections](https://platform.enjin.io/collections)**" and click the "**Create Collection**" button. ![Create collection form on Enjin Platform](/img/getting-started/v3-create-collection-form.png) @@ -111,7 +111,7 @@ On any transaction form — whether a guided flow or the transaction builder — The popup gives you everything needed to reproduce the request programmatically: -- **URL** — the GraphQL endpoint the request is sent to (`https://platform.beta.enjin.io/graphql`). +- **URL** — the GraphQL endpoint the request is sent to (`https://platform.enjin.io/graphql`). - **Request** — the GraphQL mutation, including its variable definitions. - **Variables** — the JSON variable values for this specific transaction. @@ -135,7 +135,7 @@ For a step-by-step walkthrough of the endpoint, authentication, and the `network ::: :::tip Test your requests in the GraphiQL Playground -[Open the Enjin Platform GraphiQL Playground](https://platform.beta.enjin.io/graphiql) +[Open the Enjin Platform GraphiQL Playground](https://platform.enjin.io/graphiql) ::: :::tip Authentication @@ -169,7 +169,7 @@ mutation CreateCollection { ```bash -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{"query":"mutation { CreateTransaction(network: CANARY, chain: MATRIX, transaction: { createCollection: { forceCollapsingSupply: false } }) { uuid action state } }"}' @@ -177,7 +177,7 @@ curl --location 'https://platform.beta.enjin.io/graphql' \ ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -212,7 +212,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation CreateCollection($forceCollapsingSupply: Boolean) { CreateTransaction( @@ -264,7 +264,7 @@ mutation CreateCollection($forceCollapsingSupply: Boolean) { variables = {'forceCollapsingSupply': False} response = requests.post( - 'https://platform.beta.enjin.io/graphql', + 'https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={ 'Content-Type': 'application/json', @@ -290,7 +290,7 @@ A couple of dashboard patterns are worth knowing before you start managing exist The dashboard does not have a top-level **Tokens** page. Tokens are always viewed inside the collection they belong to: -1. In the Platform menu, navigate to "**[Collections](https://platform.beta.enjin.io/collections)**". +1. In the Platform menu, navigate to "**[Collections](https://platform.enjin.io/collections)**". 2. Click the collection that contains the token you want to manage. 3. The collection page lists every token in the collection. Click the **3 vertical dots** (**⋮**) on a token's row to open its action menu — **Mint**, **Transfer**, **Attributes**, **Burn**, **Freeze / Thaw**, and so on. @@ -308,7 +308,7 @@ When you're ready to submit, open the **Batch Queue** panel from the bottom-righ ![Batch Queue panel with two queued actions and the Submit Batch button](/img/getting-started/v3-batch-queue.png) -A successful submit produces a single transaction `uuid` on the [Transactions](https://platform.beta.enjin.io/transactions) page — the same shape any other transaction uses, just with multiple actions packed into it. +A successful submit produces a single transaction `uuid` on the [Transactions](https://platform.enjin.io/transactions) page — the same shape any other transaction uses, just with multiple actions packed into it. :::tip Programmatic equivalent The API equivalent of the Batch Queue is the `CreateBatchTransaction` mutation — it takes a `transactions: [TransactionInput!]!` list where each entry is one of the same discriminator inputs you'd pass to `CreateTransaction`. @@ -325,7 +325,7 @@ For real-time, push-based notifications, see [WebSocket Events](/03-api-referenc ### Receive Transaction Information Using the Platform User Interface -To check the transaction status, head over to the [Transactions](https://platform.beta.enjin.io/transactions) page. Each row shows the transaction's `UUID`, `Action` (e.g. `MultiTokens.create_collection`), `State`, and `Extrinsic Hash` once it has been broadcast. +To check the transaction status, head over to the [Transactions](https://platform.enjin.io/transactions) page. Each row shows the transaction's `UUID`, `Action` (e.g. `MultiTokens.create_collection`), `State`, and `Extrinsic Hash` once it has been broadcast. ![Transactions page showing a finalized create_collection transaction](/img/getting-started/v3-transactions-page.png) @@ -366,7 +366,7 @@ query GetTransactionStatus($uuid: String!) { ```bash -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{"query":"query { GetTransaction(network: CANARY, chain: MATRIX, uuid: \"12f22f91-82df-4b60-a90c-bf72b508a17c\") { uuid action state extrinsicHash } }"}' @@ -374,7 +374,7 @@ curl --location 'https://platform.beta.enjin.io/graphql' \ ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -402,7 +402,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` query GetTransactionStatus($uuid: String!) { GetTransaction(network: CANARY, chain: MATRIX, uuid: $uuid) { @@ -442,7 +442,7 @@ query GetTransactionStatus($uuid: String!) { variables = {'uuid': '12f22f91-82df-4b60-a90c-bf72b508a17c'} response = requests.post( - 'https://platform.beta.enjin.io/graphql', + 'https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={ 'Content-Type': 'application/json', 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 c8d787d..3835c1a 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 @@ -57,7 +57,7 @@ In GraphQL: - `Queries` are used to retrieve data, similar to a `GET` request in REST. - `Mutations` are used to create or modify data, similar to `POST`, `PUT`, or `DELETE` requests in REST. -Here's how the same RESTful request would look in GraphQL, sent as an HTTP POST request to the Enjin Platform GraphQL endpoint at `https://platform.beta.enjin.io/graphql`: +Here's how the same RESTful request would look in GraphQL, sent as an HTTP POST request to the Enjin Platform GraphQL endpoint at `https://platform.enjin.io/graphql`: ```graphql mutation MintToken { @@ -96,7 +96,7 @@ The serves three purposes: ### Step 1: Open the GraphiQL Playground -Open the [Enjin Platform GraphiQL Playground](https://platform.beta.enjin.io/graphiql) in your browser. The Enjin API now serves all queries and mutations from a single endpoint, so there is one playground covering Core operations, Marketplace, Fuel Tanks, and Nomination Pools. +Open the [Enjin Platform GraphiQL Playground](https://platform.enjin.io/graphiql) in your browser. The Enjin API now serves all queries and mutations from a single endpoint, so there is one playground covering Core operations, Marketplace, Fuel Tanks, and Nomination Pools. :::info GraphiQL Playground: The link above opens a graphical interface for exploring and testing operations directly from a web browser. To execute GraphQL requests programmatically from your application, send POST requests to the actual GraphQL endpoint instead — see [Using the Enjin API](/01-getting-started/05-using-enjin-api/05-using-enjin-api.md#graphql-endpoint). 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 7df9749..b56b4bd 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 @@ -34,8 +34,8 @@ API tokens are used to authenticate your application's requests to the Enjin Pla To make authenticated calls to the Enjin Platform: -1. Log in to the [Enjin Platform Cloud](https://platform.beta.enjin.io/). -2. Open your [account settings](https://platform.beta.enjin.io/settings) and create an API token if you haven't already. +1. Log in to the [Enjin Platform Cloud](https://platform.enjin.io/). +2. Open your [account settings](https://platform.enjin.io/settings) and create an API token if you haven't already. 3. Include the token in the `Authorization` header of your HTTP requests, prefixed with `Bearer`: ``` @@ -60,7 +60,7 @@ For developers looking for a more integrated experience, Enjin also provides off The Enjin Platform serves all queries and mutations from a **single GraphQL endpoint**: :::note GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: A single endpoint covers Core operations (collections, tokens, transfers, attributes), Marketplace, Fuel Tanks, and Nomination Pools. @@ -97,7 +97,7 @@ To run the same query on the Canary testnet, change `network: ENJIN` to `network Here is an example of an HTTP cURL request to fetch an account's balance from the Canary Matrixchain, with an API token provided: ```bash -curl --location --request POST 'https://platform.beta.enjin.io/graphql' \ +curl --location --request POST 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{"query":"query { GetAccount(network: CANARY, chain: MATRIX, address: \"efQh8FzLm6oH3dmTU3HWqGrtm6Xcuu1WG33N2Ka9fzo5MFFAr\") { balance } }"}' 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 6cf81e2..e6d7ef6 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 @@ -23,7 +23,7 @@ On Enjin Blockchain, every token must be placed inside a , it must be signed before it broadcasts. @@ -76,7 +76,7 @@ mutation CreateCollection { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation CreateCollection($forceCollapsingSupply: Boolean!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: { createCollection: { forceCollapsingSupply: $forceCollapsingSupply } }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"forceCollapsingSupply":false}}' @@ -140,7 +140,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -182,7 +182,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -212,7 +212,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation CreateCollection($forceCollapsingSupply: Boolean!) { CreateTransaction( @@ -256,7 +256,7 @@ mutation CreateCollection($forceCollapsingSupply: Boolean!) { variables = {'forceCollapsingSupply': False} # set to true to enforce collapsing supply -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) 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 827f15e..f30c42b 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 @@ -48,7 +48,7 @@ mutation SendTransferOwnershipRequest { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation SendTransferOwnershipRequest($collectionId: BigInt!, $newOwner: String!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: { mutateCollection: { collectionId: $collectionId, owner: $newOwner } }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"collectionId":36105,"newOwner":"cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f"}}' @@ -91,7 +91,7 @@ Work in progress ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -127,7 +127,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation SendTransferOwnershipRequest($collectionId: BigInt!, $newOwner: String!) { CreateTransaction( @@ -185,7 +185,7 @@ variables = { 'newOwner': 'cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f' } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) @@ -240,7 +240,7 @@ mutation AcceptTransferOwnershipRequest { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation AcceptTransferOwnershipRequest($id: BigInt!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: { acceptCollectionTransfer: { id: $id } }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"id":36105}}' @@ -280,7 +280,7 @@ Work in progress ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -310,7 +310,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation AcceptTransferOwnershipRequest($id: BigInt!) { CreateTransaction( @@ -356,7 +356,7 @@ mutation AcceptTransferOwnershipRequest($id: BigInt!) { variables = {'id': 36105} -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) 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 9742275..58a0fe7 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 @@ -42,7 +42,7 @@ Before minting the Mainnet versions of your Tokens, that will be used in your li ## Option A. Using the Enjin Dashboard -In the Platform menu, navigate to "**[Collections](https://platform.beta.enjin.io/collections)**" and click the collection you want to mint the token into. From the collection page, click the "**Create Token**" button. +In the Platform menu, navigate to "**[Collections](https://platform.enjin.io/collections)**" and click the collection you want to mint the token into. From the collection page, click the "**Create Token**" button. Fill in the standard token fields — Collection ID, Token ID, Initial Supply, and Recipient. See [Creating Tokens](/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md#option-a-using-the-enjin-dashboard) for the full breakdown of those fields. @@ -55,7 +55,7 @@ To mark the token as a currency, expand the **Advanced Settings** section. Under For a comprehensive view and detail of all available arguments please refer to our [API Reference](/03-api-reference/03-api-reference.md). ::: -Once you're satisfied with the options, click the "**Create**" button to submit the request. A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.beta.enjin.io/transactions) page. +Once you're satisfied with the options, click the "**Create**" button to submit the request. A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.enjin.io/transactions) page. Since this request requires a , it must be signed before it broadcasts. @@ -106,7 +106,7 @@ mutation CreateCurrencyToken { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation CreateCurrencyToken($recipient: String!, $collectionId: BigInt!, $tokenId: BigInt!, $initialSupply: BigInt!, $behavior: TokenBehaviorInput!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: {\r\n createToken: {\r\n recipient: $recipient\r\n collectionId: $collectionId\r\n tokenId: $tokenId\r\n initialSupply: $initialSupply\r\n listingForbidden: false\r\n infusion: 0\r\n anyoneCanInfuse: false\r\n behavior: $behavior\r\n }\r\n }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"recipient":"cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f","collectionId":2406,"tokenId":1,"initialSupply":1,"behavior":{"type":"IS_CURRENCY","name":"Gold Coins","symbol":"GOLD","decimalCount":2}}}' @@ -160,7 +160,7 @@ Work in Progress! ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -211,7 +211,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation CreateCurrencyToken( $recipient: String! @@ -299,7 +299,7 @@ variables = { 'behavior': {'type': 'IS_CURRENCY', 'name': 'Gold Coins', 'symbol': 'GOLD', 'decimalCount': 2}, } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) 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 20a8a4a..9d46e12 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 @@ -33,7 +33,7 @@ Before minting the Mainnet versions of your Tokens, that will be used in your li ## Option A. Using the Enjin Dashboard -In the Platform menu, navigate to "**[Collections](https://platform.beta.enjin.io/collections)**" and click the collection you want to mint the token into. From the collection page, click the "**Create Token**" button. +In the Platform menu, navigate to "**[Collections](https://platform.enjin.io/collections)**" and click the collection you want to mint the token into. From the collection page, click the "**Create Token**" button. From here, you can configure the token's basic settings, supply cap, royalty behavior, and attributes. @@ -50,7 +50,7 @@ From here, you can configure the token's basic settings, supply cap, royalty beh For a comprehensive view and detail of all available arguments please refer to our [API Reference](/03-api-reference/03-api-reference.md). ::: -Once you're satisfied with the options, click the "**Create**" button to submit the request. A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.beta.enjin.io/transactions) page. +Once you're satisfied with the options, click the "**Create**" button to submit the request. A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.enjin.io/transactions) page. Since this request requires a , it must be signed before it broadcasts. @@ -97,7 +97,7 @@ mutation CreateToken { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation CreateToken($recipient: String!, $collectionId: BigInt!, $tokenId: BigInt!, $initialSupply: BigInt!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: {\r\n createToken: {\r\n recipient: $recipient\r\n collectionId: $collectionId\r\n tokenId: $tokenId\r\n initialSupply: $initialSupply\r\n listingForbidden: false\r\n infusion: 0\r\n anyoneCanInfuse: false\r\n }\r\n }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"recipient":"cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f","collectionId":2406,"tokenId":1,"initialSupply":1}}' @@ -180,7 +180,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -222,7 +222,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -270,7 +270,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation CreateToken( $recipient: String! @@ -352,7 +352,7 @@ variables = { 'initialSupply': 1, } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) 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 253b910..fb66499 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 @@ -85,7 +85,7 @@ Type in the "**Key**" that you wish to add, and its "**Value**" in the correspon ![The Set Attribute form](/img/getting-started/v3-set-attribute-form.png) -Once you're satisfied with the options, click the "**Set Attribute**" button to submit the request. A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.beta.enjin.io/transactions) page. +Once you're satisfied with the options, click the "**Set Attribute**" button to submit the request. A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.enjin.io/transactions) page. Since this request requires a , it must be signed before it broadcasts. @@ -136,7 +136,7 @@ mutation BatchSetTokenAttribute { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation BatchSetTokenAttribute($collectionId: BigInt!, $tokenId: BigInt!, $attributes: [AttributeInput!]!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: {\r\n batchSetTokenAttribute: {\r\n collectionId: $collectionId\r\n tokenId: $tokenId\r\n attributes: $attributes\r\n }\r\n }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"collectionId":36105,"tokenId":0,"attributes":[{"key":"name","value":"Chronicles of the Celestium"},{"key":"description","value":"An epic saga where players assume the roles of intrepid tradesmiths, shaping destinies with fire and will across the star-woven expanses of the multiverse."},{"key":"uri","value":"https://yourhost/metadata.json"}]}}' @@ -236,7 +236,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -278,7 +278,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -320,7 +320,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation BatchSetTokenAttribute($collectionId: BigInt!, $tokenId: BigInt!, $attributes: [AttributeInput!]!) { CreateTransaction( @@ -390,7 +390,7 @@ variables = { ], } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) 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 cd7f049..40994d3 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 @@ -30,7 +30,7 @@ Set the recipient and the amount in the corresponding fields, and click on "**Mi ![The Mint Token form](/img/getting-started/v3-mint-token-form.png) -The Transaction Request will then appear in the "**Transactions**" menu. A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.beta.enjin.io/transactions) page. +The Transaction Request will then appear in the "**Transactions**" menu. A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.enjin.io/transactions) page. Since this request requires a , it must be signed before it broadcasts. @@ -79,7 +79,7 @@ mutation MintTokens { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation MintTokens($collectionId: BigInt!, $tokens: [MintTokenEntryInput!]!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: {\r\n mintTokens: {\r\n collectionId: $collectionId\r\n tokens: $tokens\r\n }\r\n }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"collectionId":7154,"tokens":[{"recipient":"0xaa89f9099742a928051c41eadba188ad4e863539ff96f16722ae7850271c2921","tokenId":6533,"amount":1}]}}' @@ -166,7 +166,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -208,7 +208,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -250,7 +250,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation MintTokens($collectionId: BigInt!, $tokens: [MintTokenEntryInput!]!) { CreateTransaction( @@ -320,7 +320,7 @@ variables = { ], } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) 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 67f6b5b..7e0edcc 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 @@ -38,7 +38,7 @@ Fill in the recipient and amount in the corresponding fields. ![The Transfer Token form](/img/getting-started/v3-transfer-token-form.png) -Once you're satisfied with the options, click the "**Transfer**" button to submit the request. A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.beta.enjin.io/transactions) page. +Once you're satisfied with the options, click the "**Transfer**" button to submit the request. A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.enjin.io/transactions) page. Since this request requires a , it must be signed before it broadcasts. @@ -86,7 +86,7 @@ mutation TransferToken { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation TransferToken($recipient: String!, $collectionId: BigInt!, $tokenId: BigInt!, $amount: BigInt!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: {\r\n transferToken: {\r\n recipient: $recipient\r\n collectionId: $collectionId\r\n tokenId: $tokenId\r\n amount: $amount\r\n }\r\n }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"recipient":"cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f","collectionId":36105,"tokenId":0,"amount":1}}' @@ -157,7 +157,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -200,7 +200,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -240,7 +240,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation TransferToken($recipient: String!, $collectionId: BigInt!, $tokenId: BigInt!, $amount: BigInt!) { CreateTransaction( @@ -306,7 +306,7 @@ variables = { 'amount': 1, } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) @@ -342,7 +342,7 @@ mutation TransferEnj { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation TransferEnj($recipient: String!, $amount: BigInt!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: {\r\n transferEnj: {\r\n recipient: $recipient\r\n amount: $amount\r\n }\r\n }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"recipient":"cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f","amount":"5000000000000000000"}}' @@ -384,7 +384,7 @@ Work In Progress ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -420,7 +420,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation TransferEnj($recipient: String!, $amount: BigInt!) { CreateTransaction( @@ -478,7 +478,7 @@ variables = { 'amount': "5000000000000000000", } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) @@ -520,7 +520,7 @@ mutation BatchTransferEnj { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation BatchTransferEnj($transactions: [TransactionInput!]!) {\r\n CreateBatchTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transactions: $transactions\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"transactions":[{"transferEnj":{"recipient":"cxLU94nRz1en6gHnXnYPyTdtcZZ9dqBasexvexjArj4V1Qr8f","amount":"5000000000000000000"}},{"transferEnj":{"recipient":"cxKy7aqhQTtoJYUjpebxFK2ooKhcvQ2FQj3FePrXhDhd9nLfu","amount":"15250000000000000000"}}]}}' @@ -577,7 +577,7 @@ Work In Progress ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -610,7 +610,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation BatchTransferEnj($transactions: [TransactionInput!]!) { CreateBatchTransaction( @@ -662,7 +662,7 @@ variables = { ], } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) @@ -676,8 +676,8 @@ To transfer multiple tokens **from a single collection** to multiple recipients ::: :::tip Need to send a transaction request to user's wallet? -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/02-using-wallet-connect.md). +The Enjin Platform can deliver any transaction straight to a user's Enjin Wallet app for approval. +To learn more, check out the [Sending Wallet Requests page](/02-guides/01-platform/02-managing-users/01-sending-wallet-requests.md). ::: Once a transfer transaction reaches `FINALIZED`, a `MultiTokens.Transferred` event (for token transfers) or `Balances.Transfer` event (for ENJ transfers) is emitted with the sender, recipient, and amount — useful for reacting to inbound transfers in real time (e.g. unlocking an in-game item the moment a player receives the corresponding NFT). See [Working with Events](/05-enjin-platform/03-working-with-events.md) for how to read it. 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 a9db373..f31b029 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 @@ -52,12 +52,12 @@ This tutorial illustrates the process of freezing a collection. The same flow ap ### Freezing an entire collection -In the Platform menu, navigate to "**[Collections](https://platform.beta.enjin.io/collections)**". +In the Platform menu, navigate to "**[Collections](https://platform.enjin.io/collections)**". **Locate the collection** you wish to freeze, click the **3 vertical dots** (**⋮**) on its row, then click the "**Freeze Collection**" button. In the form that opens up, click on the "**Freeze Collection**" button. ![The Freeze Collection form](/img/getting-started/v3-freeze-collection-form.png) -The Transaction Request will then appear in the "**Transactions**" menu. A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.beta.enjin.io/transactions) page. +The Transaction Request will then appear in the "**Transactions**" menu. A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.enjin.io/transactions) page. Since this request requires a , it must be signed before it broadcasts. @@ -101,7 +101,7 @@ mutation FreezeCollection { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation FreezeCollection($collectionId: BigInt!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: { freezeCollection: { collectionId: $collectionId } }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"collectionId":36105}}' @@ -159,7 +159,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -200,7 +200,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -228,7 +228,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation FreezeCollection($collectionId: BigInt!) { CreateTransaction( @@ -270,7 +270,7 @@ mutation FreezeCollection($collectionId: BigInt!) { variables = {'collectionId': 36105} -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) @@ -309,7 +309,7 @@ mutation FreezeToken { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation FreezeToken($collectionId: BigInt!, $tokenId: BigInt!, $state: FreezeState!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: { freezeToken: { collectionId: $collectionId, tokenId: $tokenId, state: $state } }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"collectionId":36105,"tokenId":0,"state":"TEMPORARY"}}' @@ -375,7 +375,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -416,7 +416,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -444,7 +444,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation FreezeToken($collectionId: BigInt!, $tokenId: BigInt!, $state: FreezeState!) { CreateTransaction( @@ -486,7 +486,7 @@ mutation FreezeToken($collectionId: BigInt!, $tokenId: BigInt!, $state: FreezeSt variables = {'collectionId': 36105, 'tokenId': 0, 'state': 'TEMPORARY'} -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) @@ -527,7 +527,7 @@ mutation ThawCollection { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation ThawCollection($collectionId: BigInt!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: { thawCollection: { collectionId: $collectionId } }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"collectionId":36105}}' @@ -585,7 +585,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -626,7 +626,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -654,7 +654,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation ThawCollection($collectionId: BigInt!) { CreateTransaction( @@ -696,7 +696,7 @@ mutation ThawCollection($collectionId: BigInt!) { variables = {'collectionId': 36105} -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) @@ -735,7 +735,7 @@ mutation ThawToken { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation ThawToken($collectionId: BigInt!, $tokenId: BigInt!, $state: FreezeState!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: { thawToken: { collectionId: $collectionId, tokenId: $tokenId, state: $state } }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"collectionId":36105,"tokenId":0,"state":"TEMPORARY"}}' @@ -800,7 +800,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -842,7 +842,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -870,7 +870,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation ThawToken($collectionId: BigInt!, $tokenId: BigInt!, $state: FreezeState!) { CreateTransaction( @@ -912,7 +912,7 @@ mutation ThawToken($collectionId: BigInt!, $tokenId: BigInt!, $state: FreezeStat variables = {'collectionId': 36105, 'tokenId': 0, 'state': 'TEMPORARY'} -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) @@ -928,10 +928,10 @@ For each of these actions, an event is emitted once the transaction reaches `FIN :::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. -To sign with a managed wallet instead of the Wallet Daemon, set `signerAccount` on `CreateTransaction`. +To sign with a managed wallet instead of the Wallet Daemon, set `signerAddress` (or `signerExternalId`) on `CreateTransaction`. ::: :::tip Need to send a transaction request to user's wallet? -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/02-using-wallet-connect.md). +The Enjin Platform can deliver any transaction straight to a user's Enjin Wallet app for approval. +To learn more, check out the [Sending Wallet Requests page](/02-guides/01-platform/02-managing-users/01-sending-wallet-requests.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 71cf868..1efaa00 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 @@ -33,7 +33,7 @@ You can obtain cENJ (Canary ENJ) for testing from the [built-in Canary faucet](/ Insert the amount of tokens to melt, and click on the "**Burn Token**" button. -The Transaction Request will then appear in the "**Transactions**" menu. A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.beta.enjin.io/transactions) page. +The Transaction Request will then appear in the "**Transactions**" menu. A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.enjin.io/transactions) page. Since this request requires a , it must be signed before it broadcasts. @@ -67,11 +67,11 @@ 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.beta.enjin.io/collections)**", **locate the collection** you wish to destroy, click the **3 vertical dots** (**⋮**) on its row, then click "**Destroy Collection**". +In the Platform menu, navigate to "**[Collections](https://platform.enjin.io/collections)**", **locate the collection** you wish to destroy, click the **3 vertical dots** (**⋮**) on its row, then click "**Destroy Collection**". Confirm by clicking the "**Destroy Collection**" button. -A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.beta.enjin.io/transactions) page. +A **Transaction Submitted** modal appears with the new transaction's UUID and a **View Transaction** button that opens its row on the [Transactions](https://platform.enjin.io/transactions) page. Since this request requires a , it must be signed before it broadcasts. @@ -113,7 +113,7 @@ mutation BurnToken { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation BurnToken($collectionId: BigInt!, $tokenId: BigInt!, $amount: BigInt!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: { burnToken: { collectionId: $collectionId, tokenId: $tokenId, amount: $amount, removeTokenStorage: false } }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"collectionId":68844,"tokenId":0,"amount":1}}' @@ -156,7 +156,7 @@ Snippet In Progress ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -191,7 +191,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation BurnToken($collectionId: BigInt!, $tokenId: BigInt!, $amount: BigInt!) { CreateTransaction( @@ -247,7 +247,7 @@ mutation BurnToken($collectionId: BigInt!, $tokenId: BigInt!, $amount: BigInt!) variables = {'collectionId': 68844, 'tokenId': 0, 'amount': 1} -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) @@ -295,7 +295,7 @@ mutation DestroyToken { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation DestroyToken($collectionId: BigInt!, $tokenId: BigInt!, $amount: BigInt!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: { burnToken: { collectionId: $collectionId, tokenId: $tokenId, amount: $amount, removeTokenStorage: true } }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"collectionId":68844,"tokenId":0,"amount":1}}' @@ -338,7 +338,7 @@ Snippet In Progress ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -373,7 +373,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation DestroyToken($collectionId: BigInt!, $tokenId: BigInt!, $amount: BigInt!) { CreateTransaction( @@ -429,7 +429,7 @@ mutation DestroyToken($collectionId: BigInt!, $tokenId: BigInt!, $amount: BigInt variables = {'collectionId': 68844, 'tokenId': 0, 'amount': 1} -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) @@ -474,7 +474,7 @@ mutation DestroyCollection { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation DestroyCollection($id: BigInt!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: { destroyCollection: { id: $id } }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"id":68844}}' @@ -514,7 +514,7 @@ Snippet In Progress ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -544,7 +544,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation DestroyCollection($id: BigInt!) { CreateTransaction( @@ -590,7 +590,7 @@ mutation DestroyCollection($id: BigInt!) { variables = {'id': 68844} -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) 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 32b5f36..2a1b64b 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 @@ -56,7 +56,7 @@ query FetchingTokenHolders{ ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: enjin_api_key' \ -d '{"query":"query FetchingTokenHolders($collection_id: BigInt!, $token_id: BigInt!) {\r\n GetToken(collectionId: $collection_id, tokenId: { integer: $token_id }) {\r\n accounts {\r\n edges {\r\n node {\r\n balance\r\n wallet {\r\n account {\r\n address\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}","variables":{"collection_id":36105,"token_id":0}}' @@ -91,7 +91,7 @@ getToken.Fragment(tokenFragment); // Create and auth a client to send the request to the platform var client = PlatformClient.Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client.Auth("Your_Platform_Token_Here"); @@ -141,7 +141,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -182,7 +182,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Your_Platform_Token_Here'}, body: JSON.stringify({ @@ -225,7 +225,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` query FetchingTokenHolders ( @@ -297,7 +297,7 @@ variables = { 'token_id': 0 #Specify the token ID } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Your_Platform_Token_Here'} ) @@ -380,7 +380,7 @@ query FetchingCollectionHolders{ ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: enjin_api_key' \ -d '{"query":"query FetchingCollectionHolders($collection_id: BigInt!) {\r\n GetCollection(collectionId: $collection_id) {\r\n accounts {\r\n edges {\r\n node {\r\n accountCount\r\n wallet {\r\n account {\r\n address\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}","variables":{"collection_id":36105}}' @@ -414,7 +414,7 @@ getCollection.Fragment(collectionFragment); // Create and auth a client to send the request to the platform var client = PlatformClient.Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client.Auth("Your_Platform_Token_Here"); @@ -464,7 +464,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -505,7 +505,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Your_Platform_Token_Here'}, body: JSON.stringify({ @@ -543,7 +543,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` query FetchingCollectionHolders ( @@ -605,7 +605,7 @@ variables = { 'collection_id': 36105 #Specify the collection ID } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Your_Platform_Token_Here'} ) @@ -661,7 +661,7 @@ For a comprehensive view of all available arguments for queries and mutations, p The `GetToken`, `GetTokens`, `GetCollection`, and `GetCollections` queries are limited only to collections and tokens that were created via the auth-ed Enjin Platform account. To use these queries with collections / tokens created externally (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. -To track a collection, head over to the collections page on Enjin Platform: https://platform.beta.enjin.io/collections, click on the "Track" button, insert the collection ID of the collection you want to track and click "Track". +To track a collection, head over to the collections page on Enjin Platform: https://platform.enjin.io/collections, click on the "Track" button, insert the collection ID of the collection you want to track and click "Track". ![Track Collection](/img/guides/managing-tokens/track-collection.png) diff --git a/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/02-using-wallet-connect.md b/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/02-using-wallet-connect.md deleted file mode 100644 index 79f9d80..0000000 --- a/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/02-using-wallet-connect.md +++ /dev/null @@ -1,237 +0,0 @@ ---- -title: "Using WalletConnect" -slug: "using-wallet-connect" -description: "Find out how to use WalletConnect to seamlessly connect user wallets to your application, enhancing blockchain integration and accessibility." ---- - -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. -Using the Platform API and WalletConnect you can send any transaction request directly to your user's wallet app. - -:::danger **Maintenance Notice** -The `polkadot-onboard` sample repository used in this guide is **no longer maintained** and may not function as expected. - -**Note:** WalletConnect itself remains fully functional and compatible with Enjin Blockchain. This guide is retained as a reference for the implementation logic for developers building their own integrations. - -**Upcoming Feature:** A native solution is in development to enable direct transaction requests from the Enjin Platform to the Enjin Wallet, removing the need for third-party services. -::: - -:::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 . -You can obtain cENJ for testing from the [built-in Canary faucet](/01-getting-started/04-using-the-enjin-platform.md#canary-faucet) in the Platform UI. -- An [Enjin Platform Account](/01-getting-started/04-using-the-enjin-platform.md) (Canary). -::: - -## Install and configure the sample project - -On production apps, you will need [WalletConnect's SDK](https://docs.walletconnect.com/web3wallet/about), but for this guide we'll be using the (now deprecated) sample project called [polkadot-onboard](https://github.com/enjin-forks/polkadot-onboard.git). - -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. -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. -To run them successfully on Windows, use a Bash-compatible terminal, like [Git Bash](https://gitforwindows.org/). -::: - -```bash -yarn -yarn install:workspace -yarn build:workspace -``` - -Now, let's run the project and test it. You can do that by running the following command inside the root folder of the project: - -```bash -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. -To configure a different blockchain, you can adjust the `chainIds` in the `examples/react-next/components/ConnectContainer.tsx` file. - -Chain IDs on Enjin Chains: -- Mainnet Matrixchain: `polkadot:3af4ff48ec76d2efc8476730f423ac07` -- Mainnet Relaychain: `polkadot:d8761d3c88f26dc12875c00d3165f7d6` -- Canary Matrixchain: `polkadot:a37725fd8943d2a524cb7ecc65da438f` -- Canary Relaychain: `polkadot:735d8773c63e74ff8490fee5751ac07e` -::: - -## Connect user's wallet - -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. - -

- Connect Wallet Modal -

- -Once the user scans the QR code with his Enjin wallet app (or any other wallet with WalletConnect & Enjin Blockchain support) he will be asked to approve the connection: - -

- 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. -To demonstrate a sample transaction request, click the "**Submit Transaction with Polkadot.JS**" button on one of the displayed addresses. - -

- Connected Wallets -

- -A Transaction Request dialog will pop up on user's connected wallet app, asking for approval. - -

- Confirm Transaction Request -

- -Once the transaction request is confirmed by the user, his wallet will sign and broadcast a message saying "I am signing this transaction!". - -In the next section, you'll learn how to construct your own transaction requests using Enjin Platform API - -## 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. -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: - -- `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. -If you haven't created an api key yet, you can do so in https://platform.beta.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). - -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. -To run them successfully on Windows, use a Bash-compatible terminal, like [Git Bash](https://gitforwindows.org/). -::: - -```bash -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 collection creation 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. -First, we make a query to the user's address to get its nonce: - -```javascript - const walletResponse = await fetch('https://platform.beta.enjin.io/graphql', { - method: 'POST', - mode: 'no-cors', - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer my-auth-key', - }, - body: JSON.stringify({ - query: `query GetAccount($address: String!) { - GetAccount(network: CANARY, chain: MATRIX, address: $address) { - nonce - } - }`, - variables: { - address: req.query.address - } - }) - }); -``` - -Next, we prepare the transaction call using the Enjin Platform API. -Every on-chain action is created through the `CreateTransaction` mutation — the action is selected by which field you set on its `transaction` input. For this example we're creating a collection. - -```javascript - const response = await fetch('https://platform.beta.enjin.io/graphql', { - method: 'POST', - mode: 'no-cors', - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer my-auth-key', - }, - body: JSON.stringify({ - query: `mutation CreateTransaction($signerAccount: String!) { - CreateTransaction( - network: CANARY, - chain: MATRIX, - signerAccount: $signerAccount, - transaction: { createCollection: {} } - ) { - uuid - encodedData - } - }`, - variables: { - signerAccount: req.query.address - } - }) - }); -``` - -We are also passing the `signerAccount`. This is necessary so your daemon doesn't sign the transaction. -In the mutation response, we're asking for the `uuid` and `encodedData`, 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` - -```javascript -const uuid = data?.data?.CreateTransaction?.uuid; -const payload = data?.data?.CreateTransaction?.encodedData; -const { signature } = await signer?.signPayload(payload) -``` - -The above will trigger the Transaction Request dialog you saw previously, asking for the user to confirm signing the transaction. - -### Step #3: Broadcasting the signed transaction - -Finally, we have the transaction's `uuid` and the signed extrinsic returned by the user's wallet. -We can now submit the signed transaction to the blockchain using the Enjin Platform API `SignTransaction` mutation. -This is done at: `examples/react-next/pages/api/send.tsx` - -```javascript - const response = await fetch('https://platform.beta.enjin.io/graphql', { - method: 'POST', - mode: 'no-cors', - headers: { - 'Content-Type': 'application/json', - 'Authorization': 'Bearer my-auth-key', - }, - body: JSON.stringify({ - query: `mutation SignTransaction($uuid: String!, $signedExtrinsic: String!) { - SignTransaction(uuid: $uuid, signedExtrinsic: $signedExtrinsic) - }`, - variables: { - uuid: req.query.uuid, - signedExtrinsic: req.query.signedExtrinsic - } - }) - }); -``` - -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.beta.enjin.io/transactions - -*** - -**Congratulations!** you can now send any transaction request to your user's wallets. diff --git a/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/_01-sending-wallet-requests.md b/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/_01-sending-wallet-requests.md deleted file mode 100644 index bb7f057..0000000 --- a/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/_01-sending-wallet-requests.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: "Sending Wallet Requests" -slug: "sending-wallet-requests" -description: "Link a player's wallet to your application and send transaction requests — consume items, list on the marketplace, infuse, stake — directly to their Enjin Wallet app for approval." ---- - -import GlossaryTerm from '@site/src/components/GlossaryTerm'; - -Many in-game actions need the **player** to authorize a transaction on their own wallet — consuming a potion they own, listing their loot on the marketplace, staking their ENJ for a guild perk. For these, your application can't sign with its own Wallet Daemon — the transaction has to come from the player. - -The Enjin Platform's native wallet-request flow lets your application **link a player's wallet** with their consent, and then **send transaction requests** straight to their . The player sees the request, approves or rejects it, and the platform handles the rest. - -:::warning Coming soon -The native wallet-request flow described on this page is **planned** and will be available once the Enjin Platform exits beta. The exact mutation names, argument shapes, and event payloads are not finalized yet — this page covers the flow conceptually and will be updated with code examples once the feature ships. -::: - -## How it works - -The flow has two steps: - -1. **Link the wallet.** Your application sends a one-time **connection request** to the player. They approve it in their Enjin Wallet app, and the wallet is then linked to your application on the platform. -2. **Send transaction requests.** From then on, any transaction your application creates can be targeted at the linked wallet. The player receives the request in their Enjin Wallet app, approves it (which signs it), and the transaction is broadcast on-chain. - -The link persists, so the connection step only happens once per player. Every subsequent action — consume, list, transfer, stake — is a single approval prompt in their Enjin Wallet app. - -## Step 1 — Linking a player's wallet - -Your application initiates a connection request scoped to the player. The platform delivers it to the player's Enjin Wallet app, where they see your application's name and what they're being asked to link. Once they approve, the wallet's address is returned to your application and the link is stored on the platform. - -After that, your application can: - -- Read the player's on-chain state (balance, tokens) through [`GetAccount`](/02-guides/01-platform/02-managing-users/02-reading-user-wallets.md) using the linked address. -- Send transaction requests against the linked wallet (Step 2). - -A player can unlink at any time from their Enjin Wallet app, which revokes your application's ability to send them further requests. - -## Step 2 — Sending transaction requests - -Once a player's wallet is linked, your application can request that they sign **any** transaction the platform supports — token transfers, burns, marketplace listings, infusions, nomination-pool bonds, and so on. - -The mechanic is straightforward: when your application calls `CreateTransaction`, it sets an argument identifying the linked player as the intended signer. The transaction is built on the platform, but instead of being signed by your Wallet Daemon, it's pushed to the player's Enjin Wallet app as a signing prompt. Approving it in the app produces the signature; rejecting it cancels the transaction. - -The response your application receives includes a `uuid` for the transaction. Poll `GetTransaction(network, chain, uuid: "")` to watch its `state` move through `PENDING` → `BROADCAST` → `FINALIZED` (or `ABANDONED` if the player rejects, `TIMEOUT` if they don't respond). - -Once it reaches `FINALIZED`, the corresponding on-chain event is emitted — `MultiTokens.Burned` after a burn, `Marketplace.ListingCreated` after a listing, `NominationPools.Bonded` after a stake, and so on. See [Working with Events](/05-enjin-platform/03-working-with-events.md) for how to read them, and use the event payload to react in-game. - -## Example use cases - -The transactions a player can sign are the same ones your application's Wallet Daemon can sign — anything in the [`CreateTransaction` discriminator](/03-api-reference/02-mutations/01-transaction-mutations.md). A few examples that illustrate the gameplay loops this unlocks: - -### Consume an in-game item - -Send a request to burn a **Health Potion** NFT the player owns. On `FINALIZED`, your game reads the `MultiTokens.Burned` event, confirms the burn matched the player's wallet and the potion's token id, and restores their HP in-game. The same pattern covers any "consume" action — eat food, drink mana, use a one-shot scroll. Because each consume is an on-chain burn that needs the player's approval and a few seconds to finalize, this fits deliberate actions rather than split-second use in fast-paced games. For instant consumption, see [Hot & Cold Inventories](/02-guides/01-platform/03-advanced-mechanics/07-hot-cold-inventories.md). - -### List an item on the marketplace - -Send a request to list the player's **Epic Sword** on the [Enjin Marketplace](https://nft.io/) for 300 ENJ. On `FINALIZED`, the `Marketplace.ListingCreated` event returns the new `listing_id`; your game can store it against the item and show "Listed for sale" on it in the player's inventory. - -### Infuse ENJ into a token - -Send a request to infuse 50 ENJ into the player's **Legendary Sword** to boost its in-game stats. On `FINALIZED`, the `MultiTokens.Infused` event confirms the new infusion amount, which your game reads to apply the stat boost — and the additional underlying ENJ value — to the item. - -### Stake ENJ in the game's nomination pool - -Send a request to bond 500 ENJ into your game's nomination pool to unlock a guild perk. On `FINALIZED`, the `NominationPools.Bonded` event confirms the amount; your game grants the player the perk and starts displaying their pool position in-game. - -:::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. -::: diff --git a/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/_category_.json b/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/_category_.json deleted file mode 100644 index 7c7d976..0000000 --- a/docs/02-guides/01-platform/02-managing-users/01-connecting-user-wallets/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "label": "Connecting User Wallets" -} \ No newline at end of file diff --git a/docs/02-guides/01-platform/02-managing-users/01-sending-wallet-requests.md b/docs/02-guides/01-platform/02-managing-users/01-sending-wallet-requests.md new file mode 100644 index 0000000..b7cbd47 --- /dev/null +++ b/docs/02-guides/01-platform/02-managing-users/01-sending-wallet-requests.md @@ -0,0 +1,756 @@ +--- +title: "Sending Wallet Requests" +slug: "sending-wallet-requests" +description: "Link your users' Enjin Wallets to your Enjin Platform account and send transaction requests straight to their Enjin Wallet app for approval — no third-party tools required." +--- + +import GlossaryTerm from '@site/src/components/GlossaryTerm'; +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +Some in-game actions need the **player** to sign a transaction with their own wallet — transferring an item they own, listing loot on the marketplace, or burning a consumable. The Enjin Platform lets you send these transaction requests **directly to your users' **: the request pops up in their app, their wallet signs it when they approve, and the platform broadcasts it on-chain — no third-party tooling involved. + +Here's how the typical flow works: + +1. **[Set up your developer profile](#setting-up-your-developer-profile):** A one-time step. Your name, image, and description are shown to users in the Enjin Wallet whenever they link or receive a request from you. +2. **[Link the user's wallet](#linking-a-users-wallet):** Generate a linking code, show the user its QR code, and they approve the connection by scanning it with their Enjin Wallet app. This happens once per user. +3. **[Send transaction requests](#sending-a-transaction-request):** Create any transaction with the linked wallet as the signer. The user receives it in their Enjin Wallet app and approves or rejects it. +4. **[Track the request](#tracking-the-request):** Poll the transaction's state to react once the user approves and the transaction finalizes on-chain. + +Linking also doubles as **proof of wallet ownership** — if all you need is a verified wallet address for each user, you can stop after step 2. See [Verifying wallet ownership](#verifying-wallet-ownership). + +:::tip Onboarding with Managed Wallets first? +Many games onboard new players with [Managed Wallets](/02-guides/01-platform/02-managing-users/03-using-managed-wallets.md) so they can play without installing anything. When a player is ready for self-custody, [sweep their managed wallet](/02-guides/01-platform/02-managing-users/03-using-managed-wallets.md#sweeping-a-managed-wallet) to their own Enjin Wallet and link it using the flow on this page — from then on, you send transaction requests to their app instead of signing on their behalf. +::: + +:::info What you'll need: +- An [Enjin Platform Account](/01-getting-started/04-using-the-enjin-platform.md). +- A user with the [Enjin Wallet app](https://enjin.io/wallet) installed. +- For the example request on this page: a [Token](/02-guides/01-platform/01-managing-tokens/02-creating-tokens/02-creating-tokens.md) held by the user's wallet, and some [Enjin Coin](/06-enjin-products/02-enjin-coin.md) in that wallet to pay for . +::: + +## Setting Up Your Developer Profile {#setting-up-your-developer-profile} + +Before you can send linking requests, you must complete your **Developer Profile** — the identity users see in their Enjin Wallet when they're asked to link their wallet or approve a transaction. On the [Enjin Platform](https://platform.enjin.io), open [**Settings**](https://platform.enjin.io/settings) and fill in the **Developer Profile** section: + +- **Image** — a square JPG or PNG, at least 512×512 and up to 1 MB. +- **Name** — your game or application's name. +- **Description** — a short description that tells wallet users who you are. + +

+ Developer Profile settings on the Enjin Platform +

+ +Until your developer profile is completed, linking-related requests are rejected — for example, `CreateLinkingCode` returns an error instead of a code. + +## Linking a User's Wallet {#linking-a-users-wallet} + +To send requests to a user's Enjin Wallet app, the user must first **link their wallet** to your Enjin Platform account. Linking is consent-based: you generate a short-lived linking code, the user scans its QR code with their Enjin Wallet app, picks the account they want to link, and approves the connection. The link persists until the user disconnects your application from their wallet app, so this step happens only once per user. + +### Step 1: Create a linking code + +Run the `CreateLinkingCode` mutation. You can pass an `idempotencyKey` of your choosing, or omit it and the platform generates one for you — either way, it's the key you'll use afterwards to look up which wallet address the user linked, so store it against the user's record in your database. Each key identifies **one linking code** and can never be reused: if a code expires before the user scans it, create the next code with a fresh key (for example, your player ID plus an attempt counter or timestamp). + + + +```graphql +mutation CreateLinkingCode($idempotencyKey: String) { + CreateLinkingCode(idempotencyKey: $idempotencyKey) { + idempotencyKey + qr + url + expires + } +} +``` + +Variables: + +```json +{ + "idempotencyKey": "player-123" +} +``` + + +``` +curl --location 'https://platform.enjin.io/graphql' \ +-H 'Content-Type: application/json' \ +-H 'Authorization: Bearer Your_Platform_Token_Here' \ +-d '{"query":"mutation CreateLinkingCode($idempotencyKey: String) {\r\n CreateLinkingCode(idempotencyKey: $idempotencyKey) {\r\n idempotencyKey\r\n qr\r\n url\r\n expires\r\n }\r\n}","variables":{"idempotencyKey":"player-123"}}' +``` + + +```csharp +using System; +using Enjin.Platform.Sdk; + +// Create and authenticate the client +using var client = new PlatformClient(); +client.Auth(""); + +// Create a linking code; store the key to look up the linked wallet later +var mutation = new MutationQueryBuilder() + .WithCreateLinkingCode( + new LinkingCodeQueryBuilder() + .WithIdempotencyKey() + .WithQr() + .WithUrl() + .WithExpires(), + idempotencyKey: "player-123"); + +var response = await client.SendMutation(mutation); +Console.WriteLine(response.Result.Data?.CreateLinkingCode?.Qr); +``` + + +```javascript +fetch('https://platform.enjin.io/graphql', { + method: 'POST', + headers: {'Content-Type': 'application/json','Authorization': 'Bearer Your_Platform_Token_Here'}, + body: JSON.stringify({ + query: ` + mutation CreateLinkingCode($idempotencyKey: String) { + CreateLinkingCode(idempotencyKey: $idempotencyKey) { + idempotencyKey + qr + url + expires + } + } + `, + variables: { + idempotencyKey: "player-123" //Unique, single-use key for this linking code + } + }), +}) +.then(response => response.json()) +.then(data => console.log(data)); +``` + + +```javascript +const axios = require('axios'); + +axios.post('https://platform.enjin.io/graphql', { + query: ` + mutation CreateLinkingCode($idempotencyKey: String) { + CreateLinkingCode(idempotencyKey: $idempotencyKey) { + idempotencyKey + qr + url + expires + } + } + `, + variables: { + idempotencyKey: "player-123" //Unique, single-use key for this linking code + } +}, { + headers: {'Content-Type': 'application/json','Authorization': 'Bearer Your_Platform_Token_Here'} +}) +.then(response => console.log(response.data)) +.catch(error => console.error(error)); +``` + + +```python +import requests + +query = ''' +mutation CreateLinkingCode($idempotencyKey: String) { + CreateLinkingCode(idempotencyKey: $idempotencyKey) { + idempotencyKey + qr + url + expires + } +} +''' + +variables = { + 'idempotencyKey': "player-123" #Unique, single-use key for this linking code +} + +response = requests.post('https://platform.enjin.io/graphql', + json={'query': query, 'variables': variables}, + headers={'Content-Type': 'application/json', 'Authorization': 'Bearer Your_Platform_Token_Here'} +) +print(response.json()) +``` + + + +**Response:** + +```json +{ + "data": { + "CreateLinkingCode": { + "idempotencyKey": "player-123", + "qr": "https://platform.enjin.io/qrcode/aHR0cHM6Ly9wbGF0Zm9ybS5lbmppbi5pby9saW5rLzMyNzIzMTky", + "url": "https://platform.enjin.io/link/32723192", + "expires": "2026-08-24T15:36:12Z" + } + } +} +``` + +Present the response to the user in whichever form fits your application: + +- **`qr`** — a ready-to-display QR code image. Show it in your game/app for the user to scan with their Enjin Wallet app. This is the most common option for desktop and console. +- **`url`** — a link that opens the linking flow directly. Useful when your application runs on the same mobile device as the Enjin Wallet app. + +Linking codes are **short-lived** (see the `expires` field). If a code expires before the user completes the flow, simply create a new one with a fresh `idempotencyKey`. + +### Step 2: The user approves in their Enjin Wallet app + +When the user scans the QR code with their Enjin Wallet app, they see your **developer profile** — the image, name, and description you configured earlier — along with a prompt to pick which account to link. Once they approve, their wallet is linked to your Enjin Platform account. + +The user stays in control: they can disconnect your application from their Enjin Wallet app at any time, which removes the link and stops any further requests from reaching them. + +### Step 3: Confirm the link + +Run the `GetLinkedWallet` query with the same `idempotencyKey` you used when creating the linking code. Once the user has approved, it returns the linked wallet; until then (or if the user has disconnected), it returns `null`. + + + +```graphql +query GetLinkedWallet($idempotencyKey: String) { + GetLinkedWallet(idempotencyKey: $idempotencyKey) { + publicKey + idempotencyKey + } +} +``` + +Variables: + +```json +{ + "idempotencyKey": "player-123" +} +``` + + +``` +curl --location 'https://platform.enjin.io/graphql' \ +-H 'Content-Type: application/json' \ +-H 'Authorization: Bearer Your_Platform_Token_Here' \ +-d '{"query":"query GetLinkedWallet($idempotencyKey: String) {\r\n GetLinkedWallet(idempotencyKey: $idempotencyKey) {\r\n publicKey\r\n idempotencyKey\r\n }\r\n}","variables":{"idempotencyKey":"player-123"}}' +``` + + +```csharp +using System; +using Enjin.Platform.Sdk; + +// Create and authenticate the client +using var client = new PlatformClient(); +client.Auth(""); + +// Look up the wallet linked for this player/user ID +var query = new QueryQueryBuilder() + .WithGetLinkedWallet( + new LinkedWalletQueryBuilder() + .WithPublicKey() + .WithIdempotencyKey(), + idempotencyKey: "player-123"); + +var response = await client.SendQuery(query); +Console.WriteLine(response.Result.Data?.GetLinkedWallet?.PublicKey ?? "Not linked yet"); +``` + + +```javascript +fetch('https://platform.enjin.io/graphql', { + method: 'POST', + headers: {'Content-Type': 'application/json','Authorization': 'Bearer Your_Platform_Token_Here'}, + body: JSON.stringify({ + query: ` + query GetLinkedWallet($idempotencyKey: String) { + GetLinkedWallet(idempotencyKey: $idempotencyKey) { + publicKey + idempotencyKey + } + } + `, + variables: { + idempotencyKey: "player-123" //The key used when creating the linking code + } + }), +}) +.then(response => response.json()) +.then(data => console.log(data)); +``` + + +```javascript +const axios = require('axios'); + +axios.post('https://platform.enjin.io/graphql', { + query: ` + query GetLinkedWallet($idempotencyKey: String) { + GetLinkedWallet(idempotencyKey: $idempotencyKey) { + publicKey + idempotencyKey + } + } + `, + variables: { + idempotencyKey: "player-123" //The key used when creating the linking code + } +}, { + headers: {'Content-Type': 'application/json','Authorization': 'Bearer Your_Platform_Token_Here'} +}) +.then(response => console.log(response.data)) +.catch(error => console.error(error)); +``` + + +```python +import requests + +query = ''' +query GetLinkedWallet($idempotencyKey: String) { + GetLinkedWallet(idempotencyKey: $idempotencyKey) { + publicKey + idempotencyKey + } +} +''' + +variables = { + 'idempotencyKey': "player-123" #The key used when creating the linking code +} + +response = requests.post('https://platform.enjin.io/graphql', + json={'query': query, 'variables': variables}, + headers={'Content-Type': 'application/json', 'Authorization': 'Bearer Your_Platform_Token_Here'} +) +print(response.json()) +``` + + + +**Response — user has linked their wallet:** + +```json +{ + "data": { + "GetLinkedWallet": { + "publicKey": "0x5a6aae294416f3e875d9a8975658905002cfd3e5e64105d76296c4b0adbfd77e", + "idempotencyKey": "player-123" + } + } +} +``` + +**Response — user hasn't linked yet (or has disconnected):** + +```json +{ + "data": { + "GetLinkedWallet": null + } +} +``` + +Store the returned `publicKey` against the user's record in your database — it identifies the wallet the user linked, and it's the account you'll target with transaction requests. The hex public key and the SS58-encoded address (`ef...`) are two representations of the same account, and address arguments like `signerAddress` accept either form. You can also call `GetLinkedWallet` with an `address` argument instead of `idempotencyKey` to check whether a specific wallet address is linked to your account. + +:::note Polling the link state +There's no push notification for link state yet, so poll `GetLinkedWallet` (e.g. every few seconds while your "link your wallet" screen is open) until it returns data. A `null` response after a successful link means the user has since **disconnected** your application from their wallet app — treat the wallet as unlinked and offer to link again. +::: + +## Verifying Wallet Ownership {#verifying-wallet-ownership} + +Even if you never send a transaction request, the linking flow is the simplest way to learn a user's wallet address **and prove they own it**. Only the holder of the wallet can approve the linking request in their Enjin Wallet app — so when `GetLinkedWallet` returns a `publicKey` for the `idempotencyKey` you issued to that user, you can be certain the user controls that address. + +From there you can associate the address with the user's account and [read their wallet](/02-guides/01-platform/02-managing-users/02-reading-user-wallets.md) — check ENJ balance, list the tokens they hold, gate content based on ownership — without ever sending them a request. + +## Sending a Transaction Request {#sending-a-transaction-request} + +Once a user's wallet is linked, set the **`signerAddress`** argument to their linked address on any transaction you create. Instead of being signed by your Wallet Daemon, the request is delivered to the user's Enjin Wallet app, where they can review and approve it. Approving signs the transaction and hands it back to the platform, which broadcasts it on-chain — you don't need to handle signatures or broadcasting yourself. + +The example below asks the user to transfer an NFT out of their wallet — for instance, handing an item to another player or back to the game: + + + +```graphql +mutation RequestTokenTransfer( + $signerAddress: String + $recipient: String! + $collectionId: BigInt! + $tokenId: BigInt! + $amount: BigInt! +) { + CreateTransaction( + network: ENJIN # or CANARY for testnet + chain: MATRIX + signerAddress: $signerAddress + transaction: { + transferToken: { + recipient: $recipient + collectionId: $collectionId + tokenId: $tokenId + amount: $amount + } + } + ) { + uuid + state + } +} +``` + +Variables: + +```json +{ + "signerAddress": "efRC9jw5LeZFqmaWBBDxZRTyaLP9dLAqixy32tSnqW9wCsb6y", + "recipient": "efRP7f5aFWWobNiNxcWGNxhY1RdRXZ4kScvwuFdD4bsBHEUZW", + "collectionId": 36105, + "tokenId": 1, + "amount": 1 +} +``` + + +``` +curl --location 'https://platform.enjin.io/graphql' \ +-H 'Content-Type: application/json' \ +-H 'Authorization: Bearer Your_Platform_Token_Here' \ +-d '{"query":"mutation RequestTokenTransfer($signerAddress: String, $recipient: String!, $collectionId: BigInt!, $tokenId: BigInt!, $amount: BigInt!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n signerAddress: $signerAddress\r\n transaction: {\r\n transferToken: {\r\n recipient: $recipient\r\n collectionId: $collectionId\r\n tokenId: $tokenId\r\n amount: $amount\r\n }\r\n }\r\n ) {\r\n uuid\r\n state\r\n }\r\n}","variables":{"signerAddress":"efRC9jw5LeZFqmaWBBDxZRTyaLP9dLAqixy32tSnqW9wCsb6y","recipient":"efRP7f5aFWWobNiNxcWGNxhY1RdRXZ4kScvwuFdD4bsBHEUZW","collectionId":36105,"tokenId":1,"amount":1}}' +``` + + +```csharp +using System; +using Enjin.Platform.Sdk; + +// Create and authenticate the client +using var client = new PlatformClient(); +client.Auth(""); + +// Request the linked wallet to sign a token transfer +var mutation = new MutationQueryBuilder() + .WithCreateTransaction( + new TransactionQueryBuilder().WithUuid().WithState(), + network: Network.Enjin, // or Network.Canary for testnet + chain: Chain.Matrix, + signerAddress: "efRC9jw5LeZFqmaWBBDxZRTyaLP9dLAqixy32tSnqW9wCsb6y", // the linked wallet + transaction: new TransactionInput + { + TransferToken = new TransferTokenInput + { + Recipient = "efRP7f5aFWWobNiNxcWGNxhY1RdRXZ4kScvwuFdD4bsBHEUZW", + CollectionId = 36105, + TokenId = 1, + Amount = 1, + }, + }); + +var response = await client.SendMutation(mutation); +Console.WriteLine(response.Result.Data?.CreateTransaction?.Uuid); +``` + + +```javascript +fetch('https://platform.enjin.io/graphql', { + method: 'POST', + headers: {'Content-Type': 'application/json','Authorization': 'Bearer Your_Platform_Token_Here'}, + body: JSON.stringify({ + query: ` + mutation RequestTokenTransfer($signerAddress: String, $recipient: String!, $collectionId: BigInt!, $tokenId: BigInt!, $amount: BigInt!) { + CreateTransaction( + network: ENJIN + chain: MATRIX + signerAddress: $signerAddress + transaction: { + transferToken: { + recipient: $recipient + collectionId: $collectionId + tokenId: $tokenId + amount: $amount + } + } + ) { + uuid + state + } + } + `, + variables: { + signerAddress: "efRC9jw5LeZFqmaWBBDxZRTyaLP9dLAqixy32tSnqW9wCsb6y", //The linked wallet + recipient: "efRP7f5aFWWobNiNxcWGNxhY1RdRXZ4kScvwuFdD4bsBHEUZW", + collectionId: 36105, + tokenId: 1, + amount: 1 + } + }), +}) +.then(response => response.json()) +.then(data => console.log(data)); +``` + + +```javascript +const axios = require('axios'); + +axios.post('https://platform.enjin.io/graphql', { + query: ` + mutation RequestTokenTransfer($signerAddress: String, $recipient: String!, $collectionId: BigInt!, $tokenId: BigInt!, $amount: BigInt!) { + CreateTransaction( + network: ENJIN + chain: MATRIX + signerAddress: $signerAddress + transaction: { + transferToken: { + recipient: $recipient + collectionId: $collectionId + tokenId: $tokenId + amount: $amount + } + } + ) { + uuid + state + } + } + `, + variables: { + signerAddress: "efRC9jw5LeZFqmaWBBDxZRTyaLP9dLAqixy32tSnqW9wCsb6y", //The linked wallet + recipient: "efRP7f5aFWWobNiNxcWGNxhY1RdRXZ4kScvwuFdD4bsBHEUZW", + collectionId: 36105, + tokenId: 1, + amount: 1 + } +}, { + headers: {'Content-Type': 'application/json','Authorization': 'Bearer Your_Platform_Token_Here'} +}) +.then(response => console.log(response.data)) +.catch(error => console.error(error)); +``` + + +```python +import requests + +query = ''' +mutation RequestTokenTransfer($signerAddress: String, $recipient: String!, $collectionId: BigInt!, $tokenId: BigInt!, $amount: BigInt!) { + CreateTransaction( + network: ENJIN + chain: MATRIX + signerAddress: $signerAddress + transaction: { + transferToken: { + recipient: $recipient + collectionId: $collectionId + tokenId: $tokenId + amount: $amount + } + } + ) { + uuid + state + } +} +''' + +variables = { + 'signerAddress': "efRC9jw5LeZFqmaWBBDxZRTyaLP9dLAqixy32tSnqW9wCsb6y", #The linked wallet + 'recipient': "efRP7f5aFWWobNiNxcWGNxhY1RdRXZ4kScvwuFdD4bsBHEUZW", + 'collectionId': 36105, + 'tokenId': 1, + 'amount': 1 +} + +response = requests.post('https://platform.enjin.io/graphql', + json={'query': query, 'variables': variables}, + headers={'Content-Type': 'application/json', 'Authorization': 'Bearer Your_Platform_Token_Here'} +) +print(response.json()) +``` + + + +**Response:** + +```json +{ + "data": { + "CreateTransaction": { + "uuid": "6a1c7cb6-4b06-4a5c-9c3f-d3e1a4b2f8d0", + "state": "PENDING" + } + } +} +``` + +The user now receives the request in their Enjin Wallet app, where they can review exactly what they're being asked to sign — presented under your developer profile — and approve or reject it. + +### Anything you can sign, they can sign + +Any transaction you can normally sign from the platform can be sent to a linked wallet instead — just set `signerAddress`. That includes every action available through `CreateTransaction` (transfers, burns, marketplace listings, ENJ infusions, nomination-pool bonds, and more), and all of its companion arguments work as usual: + +- **Batches** — use [`CreateBatchTransaction`](/02-guides/01-platform/03-advanced-mechanics/08-batching-transactions.md) to have the user approve several actions with a single signature. +- **Fuel Tanks** — add the `fuelTank` argument so a [Fuel Tank](/02-guides/01-platform/02-managing-users/04-using-fuel-tanks.md) pays the transaction fees. The user approves the transaction without spending any of their own ENJ — a big onboarding win. +- **Proxies** — add `proxyAddress` to have the user sign a call that executes on behalf of a [proxied account](/02-guides/01-platform/02-managing-users/05-using-proxies.md). + +## Tracking the Request {#tracking-the-request} + +The transaction stays in the `PENDING` state while it waits for the user. Poll the `GetTransaction` query with the `uuid` you received to follow it: + + + +```graphql +query GetTransaction($uuid: String) { + GetTransaction( + network: ENJIN # or CANARY for testnet + chain: MATRIX + uuid: $uuid + ) { + uuid + state + } +} +``` + +Variables: + +```json +{ + "uuid": "6a1c7cb6-4b06-4a5c-9c3f-d3e1a4b2f8d0" +} +``` + + +``` +curl --location 'https://platform.enjin.io/graphql' \ +-H 'Content-Type: application/json' \ +-H 'Authorization: Bearer Your_Platform_Token_Here' \ +-d '{"query":"query GetTransaction($uuid: String) {\r\n GetTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n uuid: $uuid\r\n ) {\r\n uuid\r\n state\r\n }\r\n}","variables":{"uuid":"6a1c7cb6-4b06-4a5c-9c3f-d3e1a4b2f8d0"}}' +``` + + +```csharp +using System; +using Enjin.Platform.Sdk; + +// Create and authenticate the client +using var client = new PlatformClient(); +client.Auth(""); + +// Check the state of the transaction request +var query = new QueryQueryBuilder() + .WithGetTransaction( + new TransactionQueryBuilder().WithUuid().WithState(), + network: Network.Enjin, // or Network.Canary for testnet + chain: Chain.Matrix, + uuid: "6a1c7cb6-4b06-4a5c-9c3f-d3e1a4b2f8d0"); + +var response = await client.SendQuery(query); +Console.WriteLine(response.Result.Data?.GetTransaction?.State); +``` + + +```javascript +fetch('https://platform.enjin.io/graphql', { + method: 'POST', + headers: {'Content-Type': 'application/json','Authorization': 'Bearer Your_Platform_Token_Here'}, + body: JSON.stringify({ + query: ` + query GetTransaction($uuid: String) { + GetTransaction(network: ENJIN, chain: MATRIX, uuid: $uuid) { + uuid + state + } + } + `, + variables: { + uuid: "6a1c7cb6-4b06-4a5c-9c3f-d3e1a4b2f8d0" //The uuid returned by CreateTransaction + } + }), +}) +.then(response => response.json()) +.then(data => console.log(data)); +``` + + +```javascript +const axios = require('axios'); + +axios.post('https://platform.enjin.io/graphql', { + query: ` + query GetTransaction($uuid: String) { + GetTransaction(network: ENJIN, chain: MATRIX, uuid: $uuid) { + uuid + state + } + } + `, + variables: { + uuid: "6a1c7cb6-4b06-4a5c-9c3f-d3e1a4b2f8d0" //The uuid returned by CreateTransaction + } +}, { + headers: {'Content-Type': 'application/json','Authorization': 'Bearer Your_Platform_Token_Here'} +}) +.then(response => console.log(response.data)) +.catch(error => console.error(error)); +``` + + +```python +import requests + +query = ''' +query GetTransaction($uuid: String) { + GetTransaction(network: ENJIN, chain: MATRIX, uuid: $uuid) { + uuid + state + } +} +''' + +variables = { + 'uuid': "6a1c7cb6-4b06-4a5c-9c3f-d3e1a4b2f8d0" #The uuid returned by CreateTransaction +} + +response = requests.post('https://platform.enjin.io/graphql', + json={'query': query, 'variables': variables}, + headers={'Content-Type': 'application/json', 'Authorization': 'Bearer Your_Platform_Token_Here'} +) +print(response.json()) +``` + + + +**Response:** + +```json +{ + "data": { + "GetTransaction": { + "uuid": "6a1c7cb6-4b06-4a5c-9c3f-d3e1a4b2f8d0", + "state": "FINALIZED" + } + } +} +``` + +The `state` moves through: + +- **`PENDING`** — waiting for the user to approve in their Enjin Wallet app. +- **`BROADCAST`** — the user approved; the signed transaction has been submitted to the blockchain. +- **`FINALIZED`** — the transaction is included in a finalized block. Read its on-chain events to confirm the outcome and react in your application — see [Working with Events](/05-enjin-platform/03-working-with-events.md). +- **`FAILED`** — the transaction was broadcast but failed on-chain (check the `error` field). + +If the user rejects the request or never responds, the transaction won't proceed. You can also withdraw a request that's still `PENDING` at any time with the [`CancelTransaction(uuid:)`](/03-api-reference/02-mutations/01-transaction-mutations.md#canceltransaction) mutation — for example, when the in-game offer that triggered it expires — which marks the transaction `ABANDONED`. + +:::note Polling the transaction state +Real-time push notifications for transaction state aren't covered in the docs yet, so poll `GetTransaction` while a request is outstanding, the same way you polled `GetLinkedWallet` during linking. +::: + +:::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. +::: 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 a5d5b73..09231bd 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 @@ -48,7 +48,7 @@ query FetchWalletBalance{
``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer enjin_api_key' \ -d '{"query":"query FetchWalletBalance($address: String!) {\r\n GetAccount(network: ENJIN, chain: MATRIX, address: $address) {\r\n balance\r\n }\r\n}","variables":{"address":"efQh8FzLm6oH3dmTU3HWqGrtm6Xcuu1WG33N2Ka9fzo5MFFAr"}}' @@ -102,7 +102,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -143,7 +143,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer Your_Platform_Token_Here'}, body: JSON.stringify({ @@ -167,7 +167,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` query FetchWalletBalance($address: String!) { GetAccount(network: ENJIN, chain: MATRIX, address: $address) { @@ -201,7 +201,7 @@ variables = { 'address': "efQh8FzLm6oH3dmTU3HWqGrtm6Xcuu1WG33N2Ka9fzo5MFFAr" #Specify the account address } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer Your_Platform_Token_Here'} ) @@ -256,7 +256,7 @@ query FetchWalletTokens{ ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer enjin_api_key' \ -d '{"query":"query FetchWalletTokens($address: String!) {\r\n GetAccount(network: ENJIN, chain: MATRIX, address: $address) {\r\n tokens {\r\n id\r\n tokenId\r\n collection {\r\n id\r\n }\r\n attributes {\r\n key\r\n value\r\n }\r\n }\r\n }\r\n}","variables":{"address":"efQh8FzLm6oH3dmTU3HWqGrtm6Xcuu1WG33N2Ka9fzo5MFFAr"}}' @@ -338,7 +338,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -379,7 +379,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer Your_Platform_Token_Here'}, body: JSON.stringify({ @@ -413,7 +413,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` query FetchWalletTokens($address: String!) { GetAccount(network: ENJIN, chain: MATRIX, address: $address) { @@ -467,7 +467,7 @@ variables = { 'address': "efQh8FzLm6oH3dmTU3HWqGrtm6Xcuu1WG33N2Ka9fzo5MFFAr" #Specify the account address } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer Your_Platform_Token_Here'} ) 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 c0224bf..8785f23 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 @@ -56,7 +56,7 @@ mutation CreateManagedWallet { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer enjin_api_key' \ -d '{"query":"mutation CreateManagedWallet($externalId: String!) {\r\n CreateManagedWallet(externalId: $externalId)\r\n}","variables":{"externalId":"docs-example-player"}}' @@ -96,7 +96,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -137,7 +137,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Your_Platform_Token_Here'}, body: JSON.stringify({ @@ -159,7 +159,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation CreateManagedWallet($externalId: String!) { CreateManagedWallet(externalId: $externalId) @@ -189,7 +189,7 @@ variables = { 'externalId': "docs-example-player" #Replace this with a unique ID } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer Your_Platform_Token_Here'} ) @@ -224,7 +224,7 @@ query GetManagedWallet { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer enjin_api_key' \ -d '{"query":"query GetManagedWallet($externalId: String!) {\r\n GetManagedWallet(network: CANARY, chain: MATRIX, externalId: $externalId) {\r\n publicKey\r\n externalId\r\n }\r\n}","variables":{"externalId":"docs-example-player"}}' @@ -277,7 +277,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -318,7 +318,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Your_Platform_Token_Here'}, body: JSON.stringify({ @@ -343,7 +343,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` query GetManagedWallet($externalId: String!) { GetManagedWallet(network: CANARY, chain: MATRIX, externalId: $externalId) { @@ -379,7 +379,7 @@ variables = { 'externalId': "docs-example-player" #Specify the managed wallet's unique ID } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer Your_Platform_Token_Here'} ) @@ -430,7 +430,7 @@ mutation MintToManagedWallet { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer enjin_api_key' \ -d '{"query":"mutation MintToManagedWallet {\r\n CreateTransaction(\r\n network: CANARY\r\n chain: MATRIX\r\n transaction: {\r\n mintToken: {\r\n recipient: \"0xded3c8f0296f5ee023f07aa5617fc261bd5991c4474ee775a16ec35c1d1a1e3a\"\r\n collectionId: 36105\r\n tokenId: 1\r\n amount: 1\r\n }\r\n }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{}}' @@ -505,7 +505,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -546,7 +546,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Your_Platform_Token_Here'}, body: JSON.stringify({ @@ -580,7 +580,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation MintToManagedWallet { CreateTransaction( @@ -633,7 +633,7 @@ mutation MintToManagedWallet { } ''' -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer Your_Platform_Token_Here'} ) @@ -683,7 +683,7 @@ mutation TransferFromManagedWallet { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer enjin_api_key' \ -d '{"query":"mutation TransferFromManagedWallet {\r\n CreateTransaction(\r\n network: CANARY\r\n chain: MATRIX\r\n signerExternalId: \"docs-example-player\"\r\n transaction: {\r\n transferToken: {\r\n recipient: \"cxLf6yvvtscKrHRfKDphnzsT3eoRY45VbJvqXKub5pmj5mdbQ\"\r\n collectionId: 36105\r\n tokenId: 1\r\n amount: 1\r\n }\r\n }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{}}' @@ -761,7 +761,7 @@ int main() { // Create and auth a client to send the request to the platform unique_ptr client = PlatformClient::Builder() - .SetBaseAddress("https://platform.beta.enjin.io") + .SetBaseAddress("https://platform.enjin.io") .Build(); client->Auth("Your_Platform_Token_Here"); @@ -802,7 +802,7 @@ int main() { ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Your_Platform_Token_Here'}, body: JSON.stringify({ @@ -837,7 +837,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation TransferFromManagedWallet { CreateTransaction( @@ -892,7 +892,7 @@ mutation TransferFromManagedWallet { } ''' -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer Your_Platform_Token_Here'} ) @@ -939,7 +939,7 @@ Variables: ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer enjin_api_key' \ -d '{"query":"mutation SweepManagedWallet($network: Network!, $chain: Chain!, $signerExternalId: String, $recipient: String!) {\r\n SweepManagedWallet(network: $network, chain: $chain, signerExternalId: $signerExternalId, recipient: $recipient)\r\n}","variables":{"network":"CANARY","chain":"MATRIX","signerExternalId":"docs-example-player","recipient":"cxLf6yvvtscKrHRfKDphnzsT3eoRY45VbJvqXKub5pmj5mdbQ"}}' @@ -947,7 +947,7 @@ curl --location 'https://platform.beta.enjin.io/graphql' \ ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Your_Platform_Token_Here'}, body: JSON.stringify({ @@ -977,7 +977,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation SweepManagedWallet($network: Network!, $chain: Chain!, $signerExternalId: String, $recipient: String!) { SweepManagedWallet( @@ -1023,7 +1023,7 @@ variables = { 'recipient': 'cxLf6yvvtscKrHRfKDphnzsT3eoRY45VbJvqXKub5pmj5mdbQ' } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer Your_Platform_Token_Here'} ) 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 f687c9a..bdd02fe 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 @@ -73,7 +73,7 @@ Fill out the form: Click **Create fuel tank** and sign the transaction. Once it is on-chain, the new tank appears in the Fuel tanks list with its own address. :::tip Finding your daemon wallet address -The Require Signature rule must point at the address your Platform [Wallet Daemon](/01-getting-started/06-using-wallet-daemon.md) signs with — that's what lets the platform authorize dispatches through this tank automatically. The quickest way to find it is the **Daemon address** field on your [Platform settings page](https://platform.beta.enjin.io/settings), where you can copy it directly. +The Require Signature rule must point at the address your Platform [Wallet Daemon](/01-getting-started/06-using-wallet-daemon.md) signs with — that's what lets the platform authorize dispatches through this tank automatically. The quickest way to find it is the **Daemon address** field on your [Platform settings page](https://platform.enjin.io/settings), where you can copy it directly. ::: ### 3. Fund the tank {#fund-tank} diff --git a/docs/02-guides/01-platform/02-managing-users/05-using-proxies.md b/docs/02-guides/01-platform/02-managing-users/05-using-proxies.md index a1b209c..7f91983 100644 --- a/docs/02-guides/01-platform/02-managing-users/05-using-proxies.md +++ b/docs/02-guides/01-platform/02-managing-users/05-using-proxies.md @@ -56,7 +56,7 @@ Fill out the form: Click **Submit Transaction** and sign with the owner account. This reserves a refundable of about 0.5 ENJ. Once it's on-chain, your daemon can act for the owner account. :::tip Finding your daemon wallet address -The **delegate** must be the address your Platform [Wallet Daemon](/01-getting-started/06-using-wallet-daemon.md) signs with. The quickest way to find it is the **Daemon address** field on your [Platform settings page](https://platform.beta.enjin.io/settings), where you can copy it directly. +The **delegate** must be the address your Platform [Wallet Daemon](/01-getting-started/06-using-wallet-daemon.md) signs with. The quickest way to find it is the **Daemon address** field on your [Platform settings page](https://platform.enjin.io/settings), where you can copy it directly. ::: ### 2. Dispatch actions through the proxy {#dispatch-as-owner} diff --git a/docs/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/03-dynamic-metadata.md b/docs/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/03-dynamic-metadata.md index 550ec40..58cb2b3 100644 --- a/docs/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/03-dynamic-metadata.md +++ b/docs/02-guides/01-platform/03-advanced-mechanics/02-metadata-standard/03-dynamic-metadata.md @@ -134,7 +134,7 @@ Finally, let's tell your collection where to find these new metadata files. You' 1. The `value` you need to set is your **``** from the last step, followed by the `/{id}.json` placeholder. * **Example Value:** `ipfs://bafy...xyz/{id}.json` (Replace `bafy...xyz` with your actual ``). -2. Set this attribute using the `batchSetCollectionAttribute` action on `CreateTransaction`. You can copy/paste the example below into the [GraphiQL playground](https://platform.beta.enjin.io/graphiql) and change the values. +2. Set this attribute using the `batchSetCollectionAttribute` action on `CreateTransaction`. You can copy/paste the example below into the [GraphiQL playground](https://platform.enjin.io/graphiql) and change the values. ```graphql mutation SetDynamicMetadataURI { 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 0e7f9a2..4de1628 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 @@ -101,7 +101,7 @@ query ScanForBrandItems { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"query ScanForBrandItems($address: String!) {\r\n GetAccount(network: ENJIN, chain: MATRIX, address: $address) {\r\n tokens {\r\n id\r\n tokenId\r\n collection { id }\r\n attributes { key value }\r\n }\r\n }\r\n}","variables":{"address":"efUVQhs3Q1ih9RKn1ukpb45p2Zomu5jvopsQE6n5LtW52FJH3"}}' 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 6d292e9..ae37a47 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 @@ -125,7 +125,7 @@ mutation InfuseToken { ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation InfuseToken($collectionId: BigInt!, $tokenId: BigInt!, $amount: BigInt!) {\r\n CreateTransaction(\r\n network: ENJIN\r\n chain: MATRIX\r\n transaction: {\r\n infuseToken: {\r\n collectionId: $collectionId\r\n tokenId: $tokenId\r\n amount: $amount\r\n }\r\n }\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"collectionId":3298,"tokenId":1,"amount":"5000000000000000000"}}' @@ -169,7 +169,7 @@ Console.WriteLine(response.Result.Data?.CreateTransaction?.Uuid); ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -207,7 +207,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation InfuseToken($collectionId: BigInt!, $tokenId: BigInt!, $amount: BigInt!) { CreateTransaction( @@ -269,7 +269,7 @@ variables = { 'amount': "5000000000000000000" } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) diff --git a/docs/02-guides/01-platform/03-advanced-mechanics/08-batching-transactions.md b/docs/02-guides/01-platform/03-advanced-mechanics/08-batching-transactions.md index 845239f..6639168 100644 --- a/docs/02-guides/01-platform/03-advanced-mechanics/08-batching-transactions.md +++ b/docs/02-guides/01-platform/03-advanced-mechanics/08-batching-transactions.md @@ -55,7 +55,7 @@ mutation CraftItem($signerExternalId: String!, $transactions: [TransactionInput! ``` -curl --location 'https://platform.beta.enjin.io/graphql' \ +curl --location 'https://platform.enjin.io/graphql' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -d '{"query":"mutation CraftItem($signerExternalId: String!, $transactions: [TransactionInput!]!) {\r\n CreateBatchTransaction(\r\n network: CANARY\r\n chain: MATRIX\r\n signerExternalId: $signerExternalId\r\n transactions: $transactions\r\n ) {\r\n uuid\r\n action\r\n state\r\n }\r\n}","variables":{"signerExternalId":"docs-example-player","transactions":[{"burnToken":{"collectionId":36105,"tokenId":1,"amount":3}},{"burnToken":{"collectionId":36105,"tokenId":2,"amount":2}},{"burnToken":{"collectionId":36105,"tokenId":3,"amount":1}}]}}' @@ -100,7 +100,7 @@ Work In Progress ```javascript -fetch('https://platform.beta.enjin.io/graphql', { +fetch('https://platform.enjin.io/graphql', { method: 'POST', headers: {'Content-Type': 'application/json','Authorization': 'Bearer YOUR_API_TOKEN'}, body: JSON.stringify({ @@ -136,7 +136,7 @@ fetch('https://platform.beta.enjin.io/graphql', { ```javascript const axios = require('axios'); -axios.post('https://platform.beta.enjin.io/graphql', { +axios.post('https://platform.enjin.io/graphql', { query: ` mutation CraftItem($signerExternalId: String!, $transactions: [TransactionInput!]!) { CreateBatchTransaction( @@ -194,7 +194,7 @@ variables = { ], } -response = requests.post('https://platform.beta.enjin.io/graphql', +response = requests.post('https://platform.enjin.io/graphql', json={'query': query, 'variables': variables}, headers={'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_TOKEN'} ) diff --git a/docs/02-guides/01-platform/05-enjin-farmer-sample-game/01-overview.md b/docs/02-guides/01-platform/05-enjin-farmer-sample-game/01-overview.md index c16f0c2..4101023 100644 --- a/docs/02-guides/01-platform/05-enjin-farmer-sample-game/01-overview.md +++ b/docs/02-guides/01-platform/05-enjin-farmer-sample-game/01-overview.md @@ -44,7 +44,7 @@ Before you begin, make sure you have the following. These are the requirements f - ✅ The **[.NET 9 SDK](https://dotnet.microsoft.com/download/dotnet/9.0)** for running the game server. - ✅ **Git** for cloning the repositories. - - ✅ An **Enjin Platform account**. If you don't have one, you can create it [here](https://platform.beta.enjin.io/). + - ✅ An **Enjin Platform account**. If you don't have one, you can create it [here](https://platform.enjin.io/). - ✅ Some cENJ tokens (can be acquired from the [built-in Canary faucet](/01-getting-started/04-using-the-enjin-platform.md#canary-faucet) in the Platform UI). ----- @@ -71,8 +71,8 @@ Next, you'll set up your Enjin Platform account and the Wallet Daemon. ### Enjin Platform -1. Log in to your [Enjin Platform](https://platform.beta.enjin.io/) account. -2. Head over to your [account settings page](https://platform.beta.enjin.io/settings). +1. Log in to your [Enjin Platform](https://platform.enjin.io/) account. +2. Head over to your [account settings page](https://platform.enjin.io/settings). 3. Navigate to the **Daemon Wallet** section and create a new API Token. 4. Copy the **API Token**; you will need this in the next step. 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 23566f6..48886ff 100644 --- a/docs/03-api-reference/01-queries/01-transactions-queries.md +++ b/docs/03-api-reference/01-queries/01-transactions-queries.md @@ -9,7 +9,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: Use these queries to look up the state of transactions you've submitted (`GetTransaction` / `GetTransactions`) and to read the underlying blocks and extrinsics they ended up in (`GetBlock` / `GetBlocks`, `GetExtrinsic` / `GetExtrinsics`). diff --git a/docs/03-api-reference/01-queries/02-collections-queries.md b/docs/03-api-reference/01-queries/02-collections-queries.md index 82bac5a..f8db939 100644 --- a/docs/03-api-reference/01-queries/02-collections-queries.md +++ b/docs/03-api-reference/01-queries/02-collections-queries.md @@ -8,7 +8,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: `Collection` is the parent resource for a set of related tokens. A collection carries its mint, market, and transfer policies, its on-chain attributes, and any token groups defined within it. Individual tokens within a collection are read separately via [`GetTokens`](/03-api-reference/01-queries/03-tokens-queries.md#gettokens). 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 fd4c145..2530e57 100644 --- a/docs/03-api-reference/01-queries/03-tokens-queries.md +++ b/docs/03-api-reference/01-queries/03-tokens-queries.md @@ -8,7 +8,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: A `Token` is an individual asset (fungible or non-fungible) inside a [collection](/03-api-reference/01-queries/02-collections-queries.md). Tokens carry their supply, cap, attributes, metadata, behavior (currency / royalty), and any token-group memberships. 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 e15cb84..1e3c73d 100644 --- a/docs/03-api-reference/01-queries/04-wallets-queries.md +++ b/docs/03-api-reference/01-queries/04-wallets-queries.md @@ -1,22 +1,23 @@ --- title: "Wallets" slug: "wallets" -description: "Read on-chain accounts, managed wallets, and verify signed messages via the Enjin API." +description: "Read on-chain accounts, managed wallets, linked wallets, and verify signed messages via the Enjin API." --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: -The Enjin Platform exposes two complementary read surfaces for wallets: +The Enjin Platform exposes three complementary read surfaces for wallets: - **`GetAccount` / `GetAccounts`** — read any on-chain account by address (ENJ balance, held tokens, nonce). - **`GetManagedWallet` / `GetManagedWallets`** — read platform-managed wallets (the keypairs your application creates via `CreateManagedWallet`). +- **`GetLinkedWallet`** — read a user wallet linked to your account via the [wallet linking flow](/02-guides/01-platform/02-managing-users/01-sending-wallet-requests.md) (`CreateLinkingCode`). -`VerifyMessage` lets you cryptographically verify that a given signature belongs to a given address — useful for signed-message ownership proofs in WalletConnect-style flows. +`VerifyMessage` lets you cryptographically verify that a given signature belongs to a given address — useful for signed-message ownership proofs in custom signing flows. ## GetAccount @@ -204,6 +205,47 @@ query GetManagedWallets { +## GetLinkedWallet + +Returns a wallet that a user has linked to your Enjin Platform account by approving a [linking code](/03-api-reference/02-mutations/04-wallets-mutations.md#createlinkingcode) in their Enjin Wallet app. Look it up by the `idempotencyKey` you set when creating the linking code, or by the wallet's `address` (the two arguments are mutually exclusive). + +Returns `null` when no linked wallet matches — the user hasn't approved the linking code yet, or they've since disconnected your application from their Enjin Wallet app. See [Sending Wallet Requests](/02-guides/01-platform/02-managing-users/01-sending-wallet-requests.md) for the full flow. + + + +```graphql +query GetLinkedWallet($idempotencyKey: String) { + GetLinkedWallet(idempotencyKey: $idempotencyKey) { + publicKey + idempotencyKey + } +} +``` + +Variables: + +```json +{ + "idempotencyKey": "player-123" +} +``` + + +```json +{ + "data": { + "GetLinkedWallet": { + "publicKey": "0x5a6aae294416f3e875d9a8975658905002cfd3e5e64105d76296c4b0adbfd77e", + "idempotencyKey": "player-123" + } + } +} +``` + + + +Pass the returned `publicKey` as `signerAddress` on [`CreateTransaction`](/03-api-reference/02-mutations/01-transaction-mutations.md#createtransaction) to send a transaction request to the user's Enjin Wallet app. + ## VerifyMessage Cryptographically verifies that `signature` was produced by the holder of `publicKey` over `message`. Returns `true` or `false`. Useful for signed-message ownership proofs — for example, prompting a user's wallet to sign a unique challenge string so your backend can confirm they control the address. diff --git a/docs/03-api-reference/01-queries/05-fuel-tank-queries.md b/docs/03-api-reference/01-queries/05-fuel-tank-queries.md index 51570ca..dbbc945 100644 --- a/docs/03-api-reference/01-queries/05-fuel-tank-queries.md +++ b/docs/03-api-reference/01-queries/05-fuel-tank-queries.md @@ -8,7 +8,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: :::warning Fuel Tank API is being updated diff --git a/docs/03-api-reference/01-queries/06-marketplace-queries.md b/docs/03-api-reference/01-queries/06-marketplace-queries.md index e127da3..9fa14e4 100644 --- a/docs/03-api-reference/01-queries/06-marketplace-queries.md +++ b/docs/03-api-reference/01-queries/06-marketplace-queries.md @@ -8,7 +8,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: The Enjin Platform marketplace exposes two read queries: `GetListing` for a single listing by id, and `GetListings` for a paginated list scoped to a collection. To act on a listing (place a bid, fill, cancel, finalize an auction, etc.) use [Marketplace Mutations](/03-api-reference/02-mutations/06-marketplace-mutations.md). diff --git a/docs/03-api-reference/01-queries/07-token-groups-queries.md b/docs/03-api-reference/01-queries/07-token-groups-queries.md index 8c256ad..e05065b 100644 --- a/docs/03-api-reference/01-queries/07-token-groups-queries.md +++ b/docs/03-api-reference/01-queries/07-token-groups-queries.md @@ -8,7 +8,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: A **token group** is an on-chain set of tokens within a single collection. Each token can belong to zero or more groups; each group can hold many tokens. Groups make it easier to organise large collections in marketplaces and games — for example, the `Epochrome Sword` group inside Enjin's `The Multiverse` collection bundles every Epochrome Sword variant together so games can grant in-game utility to anyone holding any one of them. diff --git a/docs/03-api-reference/01-queries/08-nomination-pool-queries.md b/docs/03-api-reference/01-queries/08-nomination-pool-queries.md index aa2fb11..b76d11a 100644 --- a/docs/03-api-reference/01-queries/08-nomination-pool-queries.md +++ b/docs/03-api-reference/01-queries/08-nomination-pool-queries.md @@ -8,7 +8,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: Nomination pools live on the **Relaychain** — pass `chain: RELAY` on every query in this section. They let many small ENJ holders pool their stake under a single nominator, sharing rewards proportionally. To bond into a pool or unbond, see [Nomination Pool Mutations](/03-api-reference/02-mutations/08-nomination-pool-mutations.md). 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 de31118..8cb9a76 100644 --- a/docs/03-api-reference/02-mutations/01-transaction-mutations.md +++ b/docs/03-api-reference/02-mutations/01-transaction-mutations.md @@ -1,14 +1,14 @@ --- title: "Transactions" slug: "transactions" -description: "Submit on-chain actions through the Enjin Platform's transaction mutations: CreateTransaction, CreateBatchTransaction, SignTransaction, RefreshMetadata." +description: "Submit on-chain actions through the Enjin Platform's transaction mutations: CreateTransaction, CreateBatchTransaction, SignTransaction, CancelTransaction, RefreshMetadata." --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: The Enjin Platform exposes a small number of root-level mutations. Almost every on-chain action — creating a collection, minting, transferring, listing, burning, freezing, bonding to a nomination pool, managing token groups — is funnelled through the single `CreateTransaction` mutation, with the action selected by which field is set on the `transaction` input. @@ -66,8 +66,8 @@ mutation CreateTransaction { Useful additional arguments: -- `idempotencyKey: String` — pass the same key on a retried request to avoid creating a duplicate transaction. -- `signerAddress: String` — sign with a specific account instead of the Wallet Daemon (e.g. a Managed Wallet's public key, or an external user address for client-side signing). +- `idempotencyKey: String` — a unique key for the transaction, protecting against accidental duplicates: creating another transaction with a key that was already used returns a validation error. +- `signerAddress: String` — sign with a specific account instead of the Wallet Daemon: a Managed Wallet's public key, a [linked user wallet](/02-guides/01-platform/02-managing-users/01-sending-wallet-requests.md) (the request is delivered to the user's Enjin Wallet app for approval), or an external address for custom client-side signing. - `signerExternalId: String` — same as `signerAddress` but resolved from a Managed Wallet's `externalId`. - `proxyAddress: String` — wrap the call in `proxy.proxy` so it executes on behalf of a proxied account. - `fuelTank: String` — dispatch through a fuel tank's address; the tank pays the transaction fees. @@ -124,7 +124,9 @@ See the [Batching Transactions](/02-guides/01-platform/03-advanced-mechanics/08- ## SignTransaction -Submits the signed extrinsic for a transaction that was created with an external `signerAddress`. Use this when you want a user's wallet (e.g. through WalletConnect) — rather than the Wallet Daemon — to sign on-chain actions. +Submits the signed extrinsic for a transaction that was created with an external `signerAddress`. Use this for custom client-side signing integrations (e.g. a browser extension) where you collect the signature yourself. + +You don't need this mutation when the signer is a wallet [linked via the Enjin Wallet app](/02-guides/01-platform/02-managing-users/01-sending-wallet-requests.md) — in that flow the request is delivered to the user's app, and the platform receives the signature and broadcasts automatically once the user approves. The typical flow is: @@ -162,6 +164,43 @@ mutation SignTransaction { +## CancelTransaction + +Cancels a transaction that hasn't been signed yet (its `state` is still `PENDING`), marking it `ABANDONED`. Useful for withdrawing a [wallet request](/02-guides/01-platform/02-managing-users/01-sending-wallet-requests.md) the user hasn't approved yet — for example, when the in-game offer that triggered it expires. + + + +```graphql +mutation CancelTransaction($uuid: String!) { + CancelTransaction(uuid: $uuid) { + uuid + state + } +} +``` + +Variables: + +```json +{ + "uuid": "a90ded41-4262-40a2-95c0-98255b660bf1" +} +``` + + +```json +{ + "data": { + "CancelTransaction": { + "uuid": "a90ded41-4262-40a2-95c0-98255b660bf1", + "state": "ABANDONED" + } + } +} +``` + + + ## RefreshMetadata Forces the platform to re-fetch off-chain metadata for one or more tokens / collections. Useful after you update the JSON behind a token's metadata URI. 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 929e597..e616c8c 100644 --- a/docs/03-api-reference/02-mutations/02-collections-mutations.md +++ b/docs/03-api-reference/02-mutations/02-collections-mutations.md @@ -8,7 +8,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: All collection-level actions are submitted through [`CreateTransaction`](/03-api-reference/02-mutations/01-transaction-mutations.md#createtransaction), with the action selected by the field set on the `transaction` input. Each section below shows the discriminator and its expected fields. 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 9ed38aa..e0cfc40 100644 --- a/docs/03-api-reference/02-mutations/03-tokens-mutations.md +++ b/docs/03-api-reference/02-mutations/03-tokens-mutations.md @@ -8,7 +8,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: All token-level actions are submitted through [`CreateTransaction`](/03-api-reference/02-mutations/01-transaction-mutations.md#createtransaction), with the action selected by the field set on the `transaction` input. The response shape is always a `Transaction` — the examples below all return the standard `{ uuid, action, state }` selection. Once a transaction reaches `FINALIZED`, the on-chain event(s) it emitted (e.g. `MultiTokens.Minted`, `MultiTokens.Transferred`, `MultiTokens.Burned`) can be read via the flow described in [Working with Events](/05-enjin-platform/03-working-with-events.md). 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 0a7d5fd..9f6f760 100644 --- a/docs/03-api-reference/02-mutations/04-wallets-mutations.md +++ b/docs/03-api-reference/02-mutations/04-wallets-mutations.md @@ -1,19 +1,19 @@ --- title: "Wallets" slug: "wallets" -description: "Create platform-managed wallets via the Enjin API." +description: "Create platform-managed wallets and link user wallets via the Enjin API." --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: -The Enjin Platform has two wallet-related mutations: `CreateManagedWallet` and `SweepManagedWallet`. Managed wallets are keypairs derived from the Wallet Daemon's seed plus an `externalId` you control — they let your application create signing accounts on demand without managing private keys. +The Enjin Platform has three wallet-related mutations: `CreateManagedWallet` and `SweepManagedWallet` for platform-managed wallets, and `CreateLinkingCode` for linking end-user wallets. Managed wallets are keypairs derived from the Wallet Daemon's seed plus an `externalId` you control — they let your application create signing accounts on demand without managing private keys. -For end-user wallets connected via WalletConnect, there's no mutation here — the user's wallet already exists on chain. To submit transactions signed by an end-user wallet, see `CreateTransaction(..., signerAddress: )` followed by `SignTransaction(uuid:, signedExtrinsic:)` on the [Transactions](/03-api-reference/02-mutations/01-transaction-mutations.md) page. +End-user wallets aren't created through the API — the user's wallet already exists on chain. Instead, use `CreateLinkingCode` to link a user's Enjin Wallet to your account, after which `CreateTransaction(..., signerAddress: )` delivers transaction requests straight to their Enjin Wallet app for approval. See [Sending Wallet Requests](/02-guides/01-platform/02-managing-users/01-sending-wallet-requests.md) for the full flow. ## CreateManagedWallet @@ -83,8 +83,56 @@ Variables: +## CreateLinkingCode + +Creates a short-lived linking code that a user scans (as a QR code) with their Enjin Wallet app to link their wallet to your Enjin Platform account — authorizing you to send transaction requests to their app. Requires a completed [Developer Profile](/02-guides/01-platform/02-managing-users/01-sending-wallet-requests.md#setting-up-your-developer-profile). + +You can pass your own `idempotencyKey` or let the platform generate one; once the user approves, look up the linked wallet with [`GetLinkedWallet`](/03-api-reference/01-queries/04-wallets-queries.md#getlinkedwallet) using the same key. Each key identifies one linking code and can never be reused — if a code expires unused, create the next one with a fresh key. See [Sending Wallet Requests](/02-guides/01-platform/02-managing-users/01-sending-wallet-requests.md) for the full walkthrough. + + + +```graphql +mutation CreateLinkingCode($idempotencyKey: String) { + CreateLinkingCode(idempotencyKey: $idempotencyKey) { + idempotencyKey + qr + url + expires + } +} +``` + +Variables: + +```json +{ + "idempotencyKey": "player-123" +} +``` + + +```json +{ + "data": { + "CreateLinkingCode": { + "idempotencyKey": "player-123", + "qr": "https://platform.enjin.io/qrcode/aHR0cHM6Ly9wbGF0Zm9ybS5lbmppbi5pby9saW5rLzMyNzIzMTky", + "url": "https://platform.enjin.io/link/32723192", + "expires": "2026-08-24T15:36:12Z" + } + } +} +``` + + + +- `qr` — a renderable QR code image of the linking link, ready to display to the user. +- `url` — the linking link itself, for when your application runs on the same device as the Enjin Wallet app. +- `expires` — when the code stops working; create a new one if it expires before the user finishes linking. + :::tip Looking for the signing flow? - For Wallet Daemon-signed transactions, see [`CreateTransaction`](/03-api-reference/02-mutations/01-transaction-mutations.md#createtransaction). - For Managed Wallet-signed transactions, pass `signerAddress` or `signerExternalId` on `CreateTransaction`. -- For end-user-signed transactions (WalletConnect, browser extension, etc.), pair `CreateTransaction(... signerAddress:)` with [`SignTransaction`](/03-api-reference/02-mutations/01-transaction-mutations.md#signtransaction). +- For transactions signed by a user's linked Enjin Wallet, pass the linked address as `signerAddress` on `CreateTransaction` — the request is delivered to their app for approval. See [Sending Wallet Requests](/02-guides/01-platform/02-managing-users/01-sending-wallet-requests.md). +- For custom end-user signing integrations (browser extension, etc.), pair `CreateTransaction(... signerAddress:)` with [`SignTransaction`](/03-api-reference/02-mutations/01-transaction-mutations.md#signtransaction). ::: diff --git a/docs/03-api-reference/02-mutations/05-fuel-tanks-mutations.md b/docs/03-api-reference/02-mutations/05-fuel-tanks-mutations.md index c6bface..cd4c8be 100644 --- a/docs/03-api-reference/02-mutations/05-fuel-tanks-mutations.md +++ b/docs/03-api-reference/02-mutations/05-fuel-tanks-mutations.md @@ -8,7 +8,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: :::warning Fuel Tank API is being updated 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 a0aebd5..73c7b39 100644 --- a/docs/03-api-reference/02-mutations/06-marketplace-mutations.md +++ b/docs/03-api-reference/02-mutations/06-marketplace-mutations.md @@ -8,7 +8,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: All marketplace actions are submitted through [`CreateTransaction`](/03-api-reference/02-mutations/01-transaction-mutations.md#createtransaction), with the action selected by the field set on the `transaction` input. The response shape is always a `Transaction` — the examples below all return the standard `{ uuid, action, state }` selection. diff --git a/docs/03-api-reference/02-mutations/07-token-groups-mutations.md b/docs/03-api-reference/02-mutations/07-token-groups-mutations.md index 273437b..8f8f0bd 100644 --- a/docs/03-api-reference/02-mutations/07-token-groups-mutations.md +++ b/docs/03-api-reference/02-mutations/07-token-groups-mutations.md @@ -8,7 +8,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: A token group is an on-chain bucket of tokens within a single collection — see [Token Groups Queries](/03-api-reference/01-queries/07-token-groups-queries.md) for the read side. All token-group actions are submitted through [`CreateTransaction`](/03-api-reference/02-mutations/01-transaction-mutations.md#createtransaction), with the action selected by the field set on the `transaction` input. The response shape is always a `Transaction` — the examples below all return the standard `{ uuid, action, state }` selection. diff --git a/docs/03-api-reference/02-mutations/08-nomination-pool-mutations.md b/docs/03-api-reference/02-mutations/08-nomination-pool-mutations.md index 64204b8..56d8219 100644 --- a/docs/03-api-reference/02-mutations/08-nomination-pool-mutations.md +++ b/docs/03-api-reference/02-mutations/08-nomination-pool-mutations.md @@ -8,7 +8,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: Nomination pools live on the **Relaychain** — pass `chain: RELAY` on every mutation in this section. To read pool state, see [Nomination Pool Queries](/03-api-reference/01-queries/08-nomination-pool-queries.md). diff --git a/docs/03-api-reference/03-api-reference.md b/docs/03-api-reference/03-api-reference.md index 2c81659..1ca25d3 100644 --- a/docs/03-api-reference/03-api-reference.md +++ b/docs/03-api-reference/03-api-reference.md @@ -6,7 +6,7 @@ slug: "/api-reference" This section is a per-resource reference for the Enjin Platform GraphQL API. Each page focuses on one resource family (accounts, collections, tokens, transactions, marketplace listings, fuel tanks, token groups, nomination pools) and walks through the queries and mutations available for it. :::tip GraphQL Endpoint -`https://platform.beta.enjin.io/graphql` +`https://platform.enjin.io/graphql` ::: ## How this section is organised diff --git a/docs/05-enjin-platform/03-working-with-events.md b/docs/05-enjin-platform/03-working-with-events.md index ca6208a..7e43158 100644 --- a/docs/05-enjin-platform/03-working-with-events.md +++ b/docs/05-enjin-platform/03-working-with-events.md @@ -19,7 +19,7 @@ Until the `Transaction.events` field ships, the workflow is: 1. **Poll for finalization.** Call [`GetTransaction(uuid:)`](/03-api-reference/01-queries/01-transactions-queries.md#gettransaction) until `state` is `FINALIZED`. The response also exposes `extrinsicHash` once the transaction has been broadcast. 2. **Read the events on Subscan.** Open the transaction by its `extrinsicHash` on the [Enjin Matrixchain Subscan explorer](https://matrix.subscan.io/). The **Events** tab there lists every event the extrinsic emitted, including IDs you'll commonly need (new `collection_id`, `token_id`, `listing_id`, etc.). -The Enjin dashboard makes this one click — open the [Transactions page](https://platform.beta.enjin.io/transactions), find your transaction, and click its **Extrinsic Hash** link to jump straight to the Subscan event view. +The Enjin dashboard makes this one click — open the [Transactions page](https://platform.enjin.io/transactions), find your transaction, and click its **Extrinsic Hash** link to jump straight to the Subscan event view. :::note Address formats in event payloads On-chain events represent account addresses as **hex public keys**, not the SS58-encoded `ef…` / `cx…` strings shown in most platform UIs. Use Subscan's [Account Format Transform tool](https://matrix.subscan.io/tools/format_transform) to convert between the two. diff --git a/docs/05-enjin-platform/05-enjin-platform.md b/docs/05-enjin-platform/05-enjin-platform.md index 057e7ca..307db08 100644 --- a/docs/05-enjin-platform/05-enjin-platform.md +++ b/docs/05-enjin-platform/05-enjin-platform.md @@ -65,4 +65,4 @@ The Enjin Platform is fully hosted, so there's nothing to install, deploy, or ma Each project runs in its own isolated context on Enjin's infrastructure, with your API token scoping access. Signing stays under your control: a [Wallet Daemon](/01-getting-started/06-using-wallet-daemon.md) that you run holds your private keys and signs transactions before submitting them through the platform — keys never leave your environment. -[Create an account](https://platform.beta.enjin.io/register) to get started. +[Create an account](https://platform.enjin.io/register) to get started. diff --git a/src/pages/tools.md b/src/pages/tools.md index 03ae14a..2993683 100644 --- a/src/pages/tools.md +++ b/src/pages/tools.md @@ -10,7 +10,7 @@ The Enjin Platform is **chain-agnostic** — a single dashboard and API endpoint 1. **Build and test on Canary** — the fast, free environment for testing Enjin's tools. 1. Download the [Enjin Wallet](https://enj.in/wallet). - 2. Create an [Enjin Platform account](https://platform.beta.enjin.io). + 2. Create an [Enjin Platform account](https://platform.enjin.io). 3. With the network selector set to **Canary**, get some cENJ to test with from the [built-in faucet](/getting-started/using-the-enjin-platform#canary-faucet). 2. **Move to Enjin mainnet** once your integration works end-to-end. 1. Get some [ENJ](https://enjin.io/enjin-coin) to cover fees and storage deposits. @@ -22,10 +22,10 @@ These tools are the same on both networks — switch between Canary and Enjin us | Tool | Description | |------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [Enjin Platform Cloud](https://platform.beta.enjin.io) | The plug-and-play Web3-integration platform, enabling you to launch a full-scale valuable economy with ease. | -| [API Key & Settings](https://platform.beta.enjin.io/settings) | Enjin Platform settings where you can generate your API Key, authenticate your wallet account, and more. | -| [API Endpoint](https://platform.beta.enjin.io/graphql) | Use this to interact with the Enjin Platform API: `https://platform.beta.enjin.io/graphql` | -| [API Playground](https://platform.beta.enjin.io/graphiql) | An easy-to-use interface where you can run queries and mutations powered by Enjin’s GraphQL API. | +| [Enjin Platform Cloud](https://platform.enjin.io) | The plug-and-play Web3-integration platform, enabling you to launch a full-scale valuable economy with ease. | +| [API Key & Settings](https://platform.enjin.io/settings) | Enjin Platform settings where you can generate your API Key, authenticate your wallet account, and more. | +| [API Endpoint](https://platform.enjin.io/graphql) | Use this to interact with the Enjin Platform API: `https://platform.enjin.io/graphql` | +| [API Playground](https://platform.enjin.io/graphiql) | An easy-to-use interface where you can run queries and mutations powered by Enjin’s GraphQL API. | | [Enjin Wallet](https://enj.in/wallet) | A powerful cross-chain wallet that allows you to sign transactions and manage your assets on both mainnet and testnet. | | [Built-in Canary Faucet](/getting-started/using-the-enjin-platform#canary-faucet) | The Platform's built-in faucet drops 250 cENJ to your Wallet Daemon's wallet — switch the network selector to Canary and click the faucet icon. | diff --git a/static/img/guides/managing-users/developer-profile-settings.png b/static/img/guides/managing-users/developer-profile-settings.png new file mode 100644 index 0000000..3652407 Binary files /dev/null and b/static/img/guides/managing-users/developer-profile-settings.png differ