tempaitown/backend/controllers/pack-reads/inventory.js
Get User Inventory
Read grouped or card-level inventory for a user profile, then filter it the way the app does.
BUILD ON AURA
Get User Inventory
Browser SDK First
const inventory = await Aura.getCurrentInventory({
collection: "slug-or-address",
limit: 200,
});In browser apps, prefer the hosted SDK so inventory reads use the current Aura session and avoid hand-rolled profile lookup code.
Route
Default Read
Use this raw route from servers, bridges, non-browser agents, or integrations where the hosted SDK cannot run. https://api.auramaxx.gg/api/users/:userId/pack-cards is the main public inventory read.
GET /api/users/:userId/pack-cards?condensed=true&ownedOnly=true&packType=all&limit=200&page=1Useful Query Params
Grouping And Filtering
condensed=truefor grouped inventory rows.filter,rarity,search,packTypefor UX filtering.condensedSort=recent|name|ownedwhen you want grouped cards.
Condensed Item Fields
collectionName,collectionSlug,collectionAddress, andcollectionImageidentify the collection/pack the row came from.attributesandtraitsexpose the raw metadata attributes object.traitListexposes the same attributes as OpenSea-style{ trait_type, value }rows.detailsis a backend-built summary such asSlammer • Rarity 1 • Weight 1.35x.
SDK Examples
Current User Inventory By Collection
Aura.configure({
clientId: "your-app",
readToken: "aura_pk_..."
});
await Aura.signIn({ clientId: "your-app" });
const inventory = await Aura.getCurrentInventory({
collection: "slug-or-address",
limit: 200,
});
const items = inventory.items || inventory.data;
const firstCap = items.find((item) => item.type === "LOOT");
console.log(firstCap?.collectionName, firstCap?.attributes, firstCap?.traitList);Another User By Wallet
const inventory = await Aura.getInventory({
userAddress: "0xUSER...",
collection: "slug-or-address",
limit: 200,
});Multiple Collections
const inventory = await Aura.getInventory({
userAddress: "0xUSER...",
collections: ["slug-one", "0xCOLLECTION..."],
limit: 200,
});Need Higher Rate Limits?
Register your app and use its browser-safe read token with the SDK. Unregistered calls fall back to dev-mode attribution.
Document Reference
tempaitown/backend/controllers/pack-reads/inventory.js
