Project & Player Mutations
Unlink Wallet is used to unlink a wallet from a specific project.
Project & Player*
1
mutation{
2
UnlinkWallet(address: "<address here>")
3
}
Copied!
Expected output:
1
{
2
"data": {
3
"UnlinkWallet": true
4
}
5
}
Copied!

Create Asset

CreateAsset is used to create assets (your token blueprints) on the blockchain.
Project*
1
mutation {
2
CreateAsset(
3
name: "AssetName"
4
totalSupply: "1"
5
initialReserve: "1"
6
supplyModel: COLLAPSING
7
meltValue: "1000000000000000000"
8
meltFeeRatio: 0
9
transferable: PERMANENT
10
transferFeeSettings: {type:PER_TRANSFER, assetId: "0", value: "0" }
11
nonFungible: true
12
wallet: "<address here>"
13
) {
14
value
15
id
16
transactionId
17
title
18
state
19
project{name}
20
}
21
}
Copied!
Expected Output:
1
{
2
"data": {
3
"CreateAsset": {
4
"value": "1",
5
"id": 31179,
6
"transactionId": null,
7
"title": "AssetNamegra",
8
"state": "PENDING",
9
"project": {
10
"name": "V2 Testing Project"
11
}
12
}
13
}
14
}
Copied!

MintAsset

MintAsset is used to mint assets with the parameters from your previously created asset template.
Project*
1
mutation {
2
MintAsset(
3
assetId: "assetId"
4
mints: { to: "<address here>", value: 1 }
5
wallet: "<address here>"
6
send: true
7
) {
8
asset {
9
name
10
id
11
}
12
transactionId
13
id
14
value
15
wallet {
16
ethAddress
17
}
18
}
19
}
Copied!
Expected Output:
1
{
2
"data": {
3
"MintAsset": {
4
"asset": {
5
"name": "AssetName",
6
"id": "TokenId"
7
},
8
"transactionId": null,
9
"id": 31237,
10
"value": "1",
11
"wallet": {
12
"ethAddress": "<address here>"
13
}
14
}
15
}
16
}
Copied!

CreatePlayer

CreatePlayer mutation allows you to create your own players for your game.
Project*
1
mutation {
2
CreatePlayer(id: "BOB") {
3
accessToken
4
}
5
}
Copied!
Expected Output:
1
{
2
"data": {
3
"CreatePlayer": {
4
"accessToken": "accessToken"
5
}
6
}
7
}
Copied!

InvalidateAssetMetadata

InvalidateAssetMetadata mutation allows you to invalidate metadata on EnjinX/Wallet.
Project*
1
mutation {
2
InvalidateAssetMetadata(id: "<tokenId>")
3
}
Copied!
Expected Output:
1
{
2
"data": {
3
"InvalidateAssetMetadata": true
4
}
5
}
Copied!
UnlinkWallet mutation is used to unlink a wallet from a specific project.
1
mutation {
2
UnlinkWallet(address: "<walletaddress>")
3
}
Copied!
Expected output:
1
{
2
"data": {
3
"UnlinkWallet": true
4
}
5
}
Copied!

Create Asset

CreateAsset This mutation is used to create assets on the blockchain.
1
mutation {
2
CreateAsset(
3
name: "Test"
4
totalSupply: "1"
5
initialReserve: "1"
6
supplyModel: COLLAPSING
7
meltValue: "1000000000000000000"
8
meltFeeRatio: 0
9
transferable: PERMANENT
10
transferFeeSettings: {type:PER_TRANSFER, assetId: "0", value: "0" }
11
nonFungible: true
12
wallet: "WalletAddress"
13
) {
14
value
15
id
16
transactionId
17
title
18
state
19
project{name}
20
}
21
}
Copied!
Expected Output:
1
{
2
"data": {
3
"CreateAsset": {
4
"value": "1",
5
"id": 31179,
6
"transactionId": null,
7
"title": "Test",
8
"state": "PENDING",
9
"project": {
10
"name": "Testing Project"
11
}
12
}
13
}
14
}
Copied!

MintAsset

MintAsset Use this mutation to mint assets with the parameters from your previously created asset template.
1
mutation {
2
MintAsset(
3
assetId: "assetId"
4
mints: { to: "WalletAddress", value: 1 }
5
wallet: "WalletAddress"
6
send: true
7
) {
8
asset {
9
name
10
id
11
}
12
transactionId
13
id
14
value
15
wallet {
16
ethAddress
17
}
18
}
19
}
Copied!
Expected Output:
1
{
2
"data": {
3
"MintAsset": {
4
"asset": {
5
"name": "Test 2",
6
"id": "708000000000088e"
7
},
8
"transactionId": null,
9
"id": 31237,
10
"value": "1",
11
"wallet": {
12
"ethAddress": "WalletAddress"
13
}
14
}
15
}
16
}
Copied!

AdvancedSendAsset

AdvancedSendAsset Use this mutation to send assets from one wallet to another wallet.
1
mutation {
2
AdvancedSendAsset(
3
transfers: {
4
from: "WalletAddress"
5
to: "WalletAddress"
6
assetId: "AssetId"
7
assetIndex: "AssetIndex"
8
value: "1"
9
}
10
) {
11
transactionId
12
id
13
state
14
value
15
asset{name id}
16
user{name}
17
}
18
}
Copied!
Expected Output:
1
{
2
"data": {
3
"AdvancedSendAsset": {
4
"transactionId": null,
5
"id": 31369,
6
"state": "PENDING",
7
"value": "1",
8
"asset": {
9
"name": "New Test Asset",
10
"id": "788000000000089f"
11
},
12
"user": null
13
}
14
}
15
}
Copied!

ApproveEnj

ApproveEnj use this mutation to approve a specific amount of ENJ to be spent.
1
mutation {
2
ApproveEnj(
3
value: "0"
4
wallet: "WalletAddress"
5
) {
6
type
7
value
8
state
9
}
10
}
Copied!
Expected Output:
1
{
2
"data": {
3
"ApproveEnj": {
4
"type": "APPROVE",
5
"value": "0"
6
}
7
}
8
}
Copied!

ApproveMaxEnj

ApproveMaxEnj use this mutation to set the spending allowance to the max value possible (infinite).
1
mutation {
2
ApproveMaxEnj(
3
wallet: "WalletAddress"
4
) {
5
type
6
value
7
state
8
}
9
}
Copied!
Expected Output:
1
{
2
"data": {
3
"ApproveMaxEnj": {
4
"type": "APPROVE",
5
"value": "-1",
6
"state": "PENDING"
7
}
8
}
9
}
Copied!

Message

Message Sign a message to prove wallet ownership.
1
mutation {
2
Message(
3
message:"This is a Test"
4
wallet: "0x7AEAB7C231c88611a2ad434d3A2715Ab3C91F406"
5
) {
6
type
7
value
8
state
9
}
10
}
Copied!
Expected Output:
1
{
2
"data": {
3
"Message": {
4
"type": "MESSAGE",
5
"value": "0",
6
"state": "PENDING"
7
}
8
}
9
}
Copied!

Create Trade

CreateTrade use this mutation to trade assets (FTs or NFTs) and trade assets for ENJ as well.
1
mutation {
2
CreateTrade(
3
askingAssets: [{ assetId: "assetId", value: 1 }],
4
offeringAssets: [{ assetId: "assetId", value: 1, assetIndex:"assetIndex"}],
5
secondParty: "walletAddress"
6
wallet: "walletAddress"
7
)
8
{
9
transactionId
10
id
11
state
12
value
13
asset{name id}
14
user{name}
15
}
16
}
Copied!
Expected Output:
1
{
2
"data": {
3
"CreateTrade": {
4
"transactionId": null,
5
"id": 160502,
6
"state": "PENDING",
7
"value": "0",
8
"asset": null,
9
"user": null
10
}
11
}
12
}
Copied!

Complete Trade

CompleteTrade use this mutation to complete the trade request initiated by the previous mutation, note that the tradeID is the transactionID from the previous request.
1
mutation {
2
CompleteTrade(
3
tradeId: "160502",
4
wallet: "walletaddressgrta"
5
)
6
{
7
transactionId
8
id
9
state
10
value
11
asset{name id}
12
user{name}
13
}
14
}
Copied!
Expected Output:
1
{
2
"data": {
3
"CompleteTrade": {
4
"transactionId": null,
5
"id": 160503,
6
"state": "PENDING",
7
"value": "0",
8
"asset": null,
9
"user": null
10
}
11
}
12
}
Copied!

Decrease Max Melt Fee

DecreaseMaxMeltFee use this mutation to decrease the Max Melt Fee of an asset.
1
mutation {
2
DecreaseMaxMeltFee(
3
assetId: "assetId"
4
maxMeltFee: 2500,
5
wallet: "walletAddress")
6
{
7
transactionId
8
id
9
state
10
value
11
asset{name id}
12
user{name}
13
}
14
}
Copied!
Expected Output:
1
{
2
"data": {
3
"DecreaseMaxMeltFee": {
4
"transactionId": null,
5
"id": 160508,
6
"state": "PENDING",
7
"value": "0",
8
"asset": {
9
"name": "Melt Fee Asset",
10
"id": "assetId"
11
},
12
"user": null
13
}
14
}
15
}
Copied!

Decrease Max Transfer Fee

DecreaseMaxTransferFee use this mutation to decrease the Max Transfer Fee of an asset.
1
mutation {
2
DecreaseMaxTransferFee(
3
assetId: "assetId"
4
maxTransferFee: "0"
5
wallet: "walletAddress"
6
) {
7
transactionId
8
id
9
state
10
value
11
asset {
12
name
13
id
14
}
15
user {
16
name
17
}
18
}
19
}
Copied!
Expected Output:
1
{
2
"data": {
3
"DecreaseMaxTransferFee": {
4
"transactionId": null,
5
"id": 160515,
6
"state": "PENDING",
7
"value": "0",
8
"asset": {
9
"name": "Transfer Fee Asset Test",
10
"id": "assetId"
11
},
12
"user": null
13
}
14
}
15
}
Copied!

Melt Asset

MeltAsset use this mutation to melt an FT or NFT.
1
mutation {
2
MeltAsset(
3
melts:[{assetId:"assetId",value:"1"}]
4
wallet:"walletAddress"
5
) {
6
transactionId
7
id
8
state
9
value
10
asset {
11
name
12
id
13
}
14
user {
15
name
16
}
17
}
18
}
Copied!
Expected Output:
1
{
2
"data": {
3
"MeltAsset": {
4
"transactionId": null,
5
"id": 160522,
6
"state": "PENDING",
7
"value": "1",
8
"asset": {
9
"name": "Transfer Fee Asset Test",
10
"id": "assetIdgra"
11
},
12
"user": null
13
}
14
}
15
}
Copied!

Release Reserve

ReleaseReserve use the mutation to release the reserve of assets that you didn't mint yet.
1
mutation {
2
ReleaseReserve(
3
assetId: "assetId"
4
value: "3"
5
wallet: "walletAddress"
6
) {
7
transactionId
8
id
9
state
10
value
11
asset {
12
name
13
id
14
}
15
user {
16
name
17
}
18
}
19
}
Copied!
Expected Output:
1
{
2
"data": {
3
"ReleaseReserve": {
4
"transactionId": null,
5
"id": 160532,
6
"state": "PENDING",
7
"value": "3",
8
"asset": {
9
"name": "new corecore",
10
"id": "assetId"
11
},
12
"user": null
13
}
14
}
15
}
Copied!

Cancel Transaction

CancelTransaction use this mutation to cancel a transaction that was not approved yet. It's important to know that once a transaction has been broadcast to the blockchain, it wouldn't be possible to cancel the request.a
1
mutation {
2
CancelTransaction(id:requestId)}
Copied!
Expected Output:
1
{
2
"data": {
3
"CancelTransaction": true
4
}
5
}
Copied!

Send Enjin or JEnjin

SendEnj - This mutation can be used to send ENJ from address A to address B, the user involved in the request should be the one approving the send mutation.
1
mutation {
2
SendEnj(
3
to: "walletAddress"
4
value: "100000000000000000"
5
wallet: "walletAddressgra"
6
) {
7
transactionId
8
id
9
state
10
value
11
}
12
}
Copied!
Expected Output:
1
{
2
"data": {
3
"SendEnj": {
4
"transactionId": null,
5
"id": 164719,
6
"state": "PENDING",
7
"value": "0.1"
8
}
9
}
10
}
Copied!

Send Asset

SendAsset use this mutation to send FTs or NFTs.
1
mutation {
2
SendAsset(
3
assetId: "assetId"
4
assetIndex: "assetIndex"
5
to: "walletAddress"
6
value: "1"
7
wallet: "walletAddress"
8
) {
9
transactionId
10
id
11
state
12
value
13
asset {
14
name
15
id
16
}
17
user {
18
name
19
}
20
}
21
}
Copied!
Expected Output:
1
{
2
"data": {
3
"SendAsset": {
4
"transactionId": null,
5
"id": 164727,
6
"state": "PENDING",
7
"value": "1",
8
"asset": {
9
"name": "NFT Test",
10
"id": "78c00000000004b1"
11
},
12
"user": null
13
}
14
}
15
}
Copied!

SetApprovalForAll

SetApprovalForAll use this mutation to allow an operator complete control on all assets owned by the caller.
1
mutation {
2
SetApprovalForAll(
3
operator: "walletAddress"
4
approved: true
5
wallet: "walletAddress"
6
) {
7
transactionId
8
id
9
state
10
value
11
asset {
12
name
13
id
14
}
15
user {
16
name
17
}
18
}
19
}
Copied!
Expected Output:
1
{
2
"data": {
3
"SetApprovalForAll": {
4
"transactionId": null,
5
"id": 164731,
6
"state": "PENDING",
7
"value": "0",
8
"asset": null,
9
"user": null
10
}
11
}
12
}
Copied!

SetWhitelisted

SetWhiteListed use this mutation to set whitelisting parameters to a specific asset.
1
mutation {
2
SetWhitelisted(
3
assetId:"assetId"
4
account:"walletAddres"
5
whitelisted:SEND_AND_RECEIVE
6
on:true
7
wallet: "walletAddresg"
8
) {
9
transactionId
10
id
11
state
12
value
13
asset {
14
name
15
id
16
}
17
user {
18
name
19
}
20
}
21
}
Copied!
Expected output:
1
{
2
"data": {
3
"SetWhitelisted": {
4
"transactionId": null,
5
"id": 164732,
6
"state": "PENDING",
7
"value": "0",
8
"asset": {
9
"name": "NFT Test",
10
"id": "78c00000000004b1"
11
},
12
"user": null
13
}
14
}
15
}
Copied!

SetUri

SetUri use this mutation to set the metadata of an asset
1
mutation {
2
SetUri(
3
assetId: "assetId"
4
uri:"your uri url here"
5
wallet: "your wallet address"
6
) {
7
transactionId
8
id
9
state
10
value
11
asset {
12
name
13
id
14
}
15
user {
16
name
17
}
18
}
19
}
Copied!
Expected Output:
1
{
2
"data": {
3
"SetUri": {
4
"transactionId": null,
5
"id": 98422,
6
"state": "PENDING",
7
"value": "0",
8
"asset": {
9
"name": "NFT Test",
10
"id": "assetId"
11
},
12
"user": null
13
}
14
}
15
}
Copied!

SetMeltFee

SetMeltFee use this mutation to set the Melt Fee of an asset.
1
mutation {
2
SetMeltFee(
3
assetId: "assetId"
4
meltFee: 500
5
wallet: "walletAddress"
6
) {
7
transactionId
8
id
9
state
10
value
11
asset {
12
name
13
id
14
}
15
user {
16
name
17
}
18
}
19
}
Copied!
Expected output:
1
{
2
"data": {
3
"SetMeltFee": {
4
"transactionId": null,
5
"id": 181704,
6
"state": "PENDING",
7
"value": "0",
8
"asset": {
9
"name": "Melt Fee NFT",
10
"id": "38c0000000000516"
11
},
12
"user": null
13
}
14
}
15
}
Copied!

SetTransferFee

SetTransferFee use this mutation to set a transfer fee with an asset.
1
mutation {
2
SetTransferFee(
3
assetId: "assetId"
4
transferFee: 1000000000000000
5
wallet: "walletAddress"
6
) {
7
transactionId
8
id
9
state
10
value
11
asset {
12
name
13
id
14
}
15
user {
16
name
17
}
18
}
19
}
Copied!
Expected Output:
1
{
2
"data": {
3
"SetTransferFee": {
4
"transactionId": null,
5
"id": 181705,
6
"state": "PENDING",
7
"value": "0",
8
"asset": {
9
"name": "Transfer Fee NFT",
10
"id": "assetId"
11
},
12
"user": null
13
}
14
}
15
}
Copied!

SetTransferable

SetTransferable Use this mutation to change the transferable status of an asset.
1
mutation {
2
SetTransferable(
3
assetId: "assetIdgra"
4
transferable: BOUND
5
wallet: "0x7AEAB7C231c88611a2ad434d3A2715Ab3C91F406"
6
) {
7
transactionId
8
id
9
state
10
value
11
asset {
12
name
13
id
14
}
15
user {
16
name
17
}
18
}
19
}
Copied!
Expected Output:
1
{
2
"data": {
3
"SetTransferable": {
4
"transactionId": null,
5
"id": 181709,
6
"state": "PENDING",
7
"value": "0",
8
"asset": {
9
"name": "Test",
10
"id": "assetId"
11
},
12
"user": null
13
}
14
}
15
}
Copied!