SDK API
Every method currently exposed by the hosted Login with Aura browser SDK.
Aura Browser SDK API
Install
Script
Load the hosted SDK from https://auramaxx.gg/login-with-aura/sdk.js. It exposes a global Aura object in the browser.
<script src="https://auramaxx.gg/login-with-aura/sdk.js" data-aura-origin="https://auramaxx.gg"></script>
<script>
Aura.configure({
clientId: "your-app",
readToken: "aura_pk_..."
});
</script>Quick Login
Aura.SigninButton({
container: "#aura-login",
clientId: "your-app",
mode: "light",
onSuccess(result) {
console.log(result.walletAddress);
}
});Machine-Readable Manifest
Agents and tooling should read https://auramaxx.gg/login-with-aura/sdk.manifest.json or https://auramaxx.gg/docs/sdk-api.json before falling back to raw public API routes. For agent instructions, start with https://auramaxx.gg/agents/sdk/skill.md.
Types And Diagnostics
- TypeScript declarations: https://auramaxx.gg/login-with-aura/sdk.d.ts
- Browser diagnostics: https://auramaxx.gg/login-with-aura/diagnostics
Intent Map
Aura.getUser({ refresh: true })Aura.getUser({ walletAddress: '0x...' })Aura.getCurrentInventory({ collection?, limit? })Aura.getInventory({ userAddress: '0x...', collection?, limit? })Aura.getInventory({ userAddress, collection, condensed: true })Aura.getPack(slugOrAddress)Aura.getMarketplaceCatalog(options) and Aura.getMarketplaceOffers(options)Recipes
Use this in browser apps after loading the hosted SDK. It avoids raw user lookup and pack-cards calls.
Aura.configure({ clientId: "your-app", readToken: "aura_pk_..." });
const session = Aura.getSession() || await Aura.signIn({ clientId: "your-app" });
const user = await Aura.getUser({ refresh: true });
const inventory = await Aura.getCurrentInventory({ limit: 200 });
const items = inventory.items || inventory.data;
console.log(session.walletAddress, user.username, items);Use collection slugs or contract addresses; the SDK resolves pack ids and keeps pagination normalized.
const inventory = await Aura.getInventory({
userAddress: "0xUSER...",
collection: "aura-caps-test",
limit: 200
});
const caps = inventory.items.filter((item) => item.type === "LOOT");
console.log(caps[0]?.collectionName, caps[0]?.attributes, caps[0]?.traitList);Use SDK read helpers for pack detail, catalog, and offer state in browser apps.
const pack = await Aura.getPack("aura-caps-test");
const catalog = await Aura.getMarketplaceCatalog({ project: "auramaxxgg" });
const offers = await Aura.getMarketplaceOffers({ address: Aura.getWalletAddress() });
console.log(pack.pack?.name, catalog, offers);Use this when a partner has a wallet or current session and wants profile, X, and Discord state without a custom /api/aura-profile route.
Aura.configure({ clientId: "aura-caps", readToken: "aura_pk_..." });
const session = Aura.getSession() || await Aura.signIn({ clientId: "aura-caps" });
const profile = await Aura.getUser({ refresh: true });
const byWallet = await Aura.getUser({ walletAddress: session.walletAddress });
console.log({
username: profile.username || byWallet.username,
wallet: session.walletAddress,
x: profile.xConnected ? profile.xHandle : null,
discord: profile.discordConnected
? profile.discordGlobalName || profile.discordUsername
: null
});Use this when a game needs owned items for one wallet and one collection, plus the collection/back image fields.
const inventory = await Aura.getInventory({
userAddress: "0xUSER...",
collection: "aura-caps-test",
limit: 200
});
const items = inventory.items || inventory.data;
const first = items[0];
console.log({
collectionName: first?.collectionName,
collectionSlug: first?.collectionSlug,
collectionImage: first?.collectionImage,
packImage: first?.packImage,
itemImage: first?.image
});Use fields directly from condensed inventory rows; details is display copy, while traits and attributes are structured data.
const inventory = await Aura.getCurrentInventory({
collection: "aura-caps-test",
condensed: true,
limit: 200
});
const cap = inventory.items.find((item) => item.type === "LOOT");
const traits = cap?.traitList || Object.entries(cap?.traits || {}).map(([trait_type, value]) => ({
trait_type,
value
}));
console.log({
details: cap?.details,
traits,
rawAttributes: cap?.attributes,
backArt: cap?.packImage || cap?.collectionImage
});Response Shapes
Inventory
const inventory = await Aura.getCurrentInventory({ limit: 200 });
const items = inventory.items || inventory.data;
const pageInfo = inventory.meta || inventory.pagination;
const firstCap = items.find((item) => item.type === "LOOT");
console.log(pageInfo, firstCap?.collectionName, firstCap?.attributes, firstCap?.traitList);Methods
Aura.configureAura configAura.configure({ clientId?, readToken?, apiBaseUrl?, auraOrigin?, origin?, theme?, mode? })Aura.getConfig{ apiBaseUrl, auraOrigin, theme }Aura.getConfig()Aura.signInPromise<LoginResult>Aura.signIn({ clientId, auraOrigin?, uxMode?, closeOnSuccess?, keepOpen?, mode?, theme?, scopes?, allowGuest?, onSuccess?, onError?, onClose? })Aura.SigninButtonHTMLButtonElementAura.SigninButton({ container, clientId, uxMode?, mode?, text?, onSuccess?, onError?, onClose? })Aura.SignInButtonHTMLButtonElementAura.SignInButton(options)Aura.SigninWithAuraReact element<Aura.SigninWithAura clientId="your-app" uxMode="popup" mode="light" onSuccess={fn} />Aura.React.SigninWithAuraReact element<Aura.React.SigninWithAura clientId="your-app" />Aura.getCurrentUserUserSummary | nullAura.getCurrentUser()Aura.getSessionLoginResult | nullAura.getSession()Aura.getWalletAddressstring | nullAura.getWalletAddress()Aura.clearSessionvoidAura.clearSession()Aura.requestPromise<any>Aura.request(path, { apiBaseUrl?, method?, headers?, body?, raw?, signal? })Aura.getUserPromise<User>Aura.getUser(userRefOrOptions?, options?)Aura.getInventoryPromise<InventoryResponse>Aura.getInventory(userRefOrOptions?, { userAddress?, collection?, collections?, limit?, page?, packType?, ownedOnly?, condensed? })Aura.getCurrentUserInventoryPromise<InventoryResponse>Aura.getCurrentUserInventory({ collection?, collections?, limit?, page?, packType?, ownedOnly?, condensed? })Aura.getCurrentInventoryPromise<InventoryResponse>Aura.getCurrentInventory({ collection?, collections?, limit?, page?, packType?, ownedOnly?, condensed? })Aura.getCreatedPacksPromise<CreatedPacksResponse>Aura.getCreatedPacks(userRefOrOptions?, { limit?, page?, sort?, status? })Aura.getPackPromise<PackDetail>Aura.getPack(slugOrAddress, options?)Aura.getPackStaticPromise<PackStatic>Aura.getPackStatic(slugOrAddress, options?)Aura.getPackLivePromise<PackLive>Aura.getPackLive(slugOrAddress, options?)Aura.getMarketplaceCatalogPromise<CatalogResponse>Aura.getMarketplaceCatalog({ project?, limit?, cursor?, ...query })Aura.getMarketplaceOffersPromise<OffersResponse>Aura.getMarketplaceOffers(optionsOrAgentId?)Aura.getMarketplaceSkuOffersPromise<SkuOffersResponse>Aura.getMarketplaceSkuOffers(agentId, options?)Aura.getMarketplaceV2OffersPromise<V2OffersResponse>Aura.getMarketplaceV2Offers(options?)Aura.getCapabilitiesPromise<TempoCapabilities>Aura.getCapabilities(options?)Aura.getDeveloperCapabilitiesPromise<DeveloperCapabilities>Aura.getDeveloperCapabilities(options?)Aura.getProfilePromise<User>Aura.getProfile(input?, options?)Aura.getPackDetailPromise<PackDetail>Aura.getPackDetail(slugOrAddress, options?)Aura.getCatalogPromise<CatalogResponse>Aura.getCatalog(options?)Aura.getOffersPromise<OffersResponse>Aura.getOffers(options?)Aura.api.requestPromise<any>Aura.api.request(path, options?)Aura.api.getUserPromise<User>Aura.api.getUser(input?, options?)Aura.api.getInventoryPromise<InventoryResponse>Aura.api.getInventory(input?, options?)Aura.api.getCurrentUserInventoryPromise<InventoryResponse>Aura.api.getCurrentUserInventory(options?)Aura.api.getCurrentInventoryPromise<InventoryResponse>Aura.api.getCurrentInventory(options?)Aura.api.getCreatedPacksPromise<CreatedPacksResponse>Aura.api.getCreatedPacks(input?, options?)Aura.api.getPackPromise<PackDetail>Aura.api.getPack(slugOrAddress, options?)Aura.api.getPackStaticPromise<PackStatic>Aura.api.getPackStatic(slugOrAddress, options?)Aura.api.getPackLivePromise<PackLive>Aura.api.getPackLive(slugOrAddress, options?)Aura.api.getMarketplaceCatalogPromise<CatalogResponse>Aura.api.getMarketplaceCatalog(options?)Aura.api.getMarketplaceOffersPromise<OffersResponse>Aura.api.getMarketplaceOffers(options?)Aura.api.getMarketplaceSkuOffersPromise<SkuOffersResponse>Aura.api.getMarketplaceSkuOffers(agentId, options?)Aura.api.getMarketplaceV2OffersPromise<V2OffersResponse>Aura.api.getMarketplaceV2Offers(options?)Aura.api.getCapabilitiesPromise<TempoCapabilities>Aura.api.getCapabilities(options?)Aura.api.getDeveloperCapabilitiesPromise<DeveloperCapabilities>Aura.api.getDeveloperCapabilities(options?)