gaming_getPlayerAssets – Mythos Gaming RPC
gaming_getPlayerAssets
aggregates a player’s Mythos holdings by scanning pallet_nfts::Account
and returning decoded items, metadata, and optional marketplace listings. Ideal for refreshing inventories at login or between matches.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
account | string | Yes | Substrate SS58 or hex account ID |
limit | number | No | Max assets to return (default 100) |
cursor | string | No | Pagination cursor returned from previous call |
Response Fields
Field | Type | Description |
---|---|---|
items | array | List of asset objects with collection, item, metadata, and price |
nextCursor | string | Cursor for pagination (null if finished) |
Asset Object
Field | Description |
---|---|
collectionId | NFT collection identifier |
itemId | NFT item identifier |
metadata | Flattened metadata map |
locked | Transfer lock status |
listing | Active marketplace listing, if any |
Request Example
{
"jsonrpc": "2.0",
"method": "gaming_getPlayerAssets",
"params": [
{
"account": "0x6f889bd1f2f17cf62f6be41996d0d33df7f8fa7a7f6a0c7003c965c4c068b0d5",
"limit": 50
}
],
"id": 11
}
Response Example
{
"jsonrpc": "2.0",
"result": {
"items": [
{
"collectionId": "0xfa",
"itemId": "0x02",
"metadata": {
"name": "Nitro Nation World Tour Crate",
"season": "S4"
},
"locked": false,
"listing": null
}
],
"nextCursor": null
},
"id": 11
}
The sample mirrors the Nitro Nation crate minted in block 2,611,955
, confirming the player’s inventory sync.
Best Practices
- Store
cursor
tokens to implement infinite scroll in-game UIs. - Combine with Beamable login flows so Unity/Unreal clients instantly reflect Mythos wallets.
- Filter by collection when cross-promoting events (e.g., Mythical Forest badges).