Enjin Documentation
Search…
⌃K

Viewing Player Tokens

Learn how to view the contents of a user's verified wallet, which will then allow you to provide benefits and content based on which NFTs they own.
This specific query is used to view the contents of a user's verified wallet, with that, you should be able to interact with the user through your project based on how your project interacts with balances.

GetWallet

To check tokens owned by your users, you can run this specific query.
query {
GetWallet(ethAddress: "<address here>") {
ethAddress
enjAllowance
enjBalance
ethBalance
balances {
asset {
name
}
id
index
value
project {
name
}
}
}
}
The expected response from this query should be
{
"data": {
"GetWallet": {
"ethAddress": "0x7AEAB7C231c88611a2ad434d3A2715Ab3C91F406",
"enjAllowance": 1.157920892373162e+59,
"enjBalance": 23264.24307202013,
"ethBalance": 1.2266632788,
"balances": [
{
"asset": {
"name": "Gate Key"
},
"id": "7000000000000b1d",
"index": "0000000000000000",
"value": 7,
"project": null
},
{
"asset": {
"name": "King's Crown"
},
"id": "7000000000000b1e",
"index": "0000000000000000",
"value": 3,
"project": null
}
With that, you are able to view the ETH, and ENJ balance of the users, their wallet allowance, and token balances created by your project.