Skip to Content
Developer Hub📦 Releases05/28/26 Toolkit v6.2 & SDK v7.3

Toolkit v6.2 & SDK v7.3 — May 28, 2026

This release introduces three sets of improvements: an opt-in flag to surface extended conditions and markets from the API, Sign-In with Ethereum (SIWE) authentication, and user-favorite countries and leagues.

Extended Conditions (new markets)

The Azuro API now exposes a broader set of conditions and markets via an opt-in extended flag. When enabled, the API returns additional condition and outcome IDs (e.g. IDs starting with 5...) that are not included in the default response. The flag defaults to false to preserve existing app behaviour.

useConditions

import { useConditions } from '@azuro-org/sdk' const { data, isFetching, error } = useConditions({ gameId, extended: true, // opt-in: include new conditions/markets })

useActiveConditions

import { useActiveConditions } from '@azuro-org/sdk' const { data, isFetching, error } = useActiveConditions({ gameId, extended: true, // opt-in: include new conditions/markets })

useActiveMarkets / useResolvedMarkets

import { useActiveMarkets, useResolvedMarkets } from '@azuro-org/sdk' const { data: markets } = useActiveMarkets({ gameId, extended: true, // forwarded to useActiveConditions; groupConditionsByMarket handles the new shape }) const { data: resolved } = useResolvedMarkets({ gameId, extended: true, // forwarded to useConditions })

getConditionsByGameIds

import { getConditionsByGameIds } from '@azuro-org/toolkit' const conditions = await getConditionsByGameIds({ chainId: 137, gameIds: ['1006000000000077484167'], extended: true, // opt-in: include new conditions/markets })
⚠️

When to enable extended

Optional, defaults to false. When true, the API additionally returns new-generation conditions and outcomes alongside the standard set. Detect a new condition by its first character: conditionId[0] === '5'.

Titles are returned directly in the response. Each condition exposes title (the market name), and each outcome exposes its own titleConditionDetailedData.title and OutcomeData.title. The toolkit and SDK already handle grouping, sorting, and rendering of new markets out of the box.

  • If your app reads market/outcome metadata only from these hooks’ / utility’s response (no direct use of @azuro-org/dictionaries), enabling the flag is safe — new markets will appear automatically.
  • If your app reads from @azuro-org/dictionaries directly, note that new IDs are not in the dictionaries package — their titles live only on the API. Use the title fields returned here, or fall back to the API when the dictionary lookup misses.

If you only have a conditionId later (e.g. in a betslip, history, or activity feed) and need its market title, call getConditionsState — its ConditionStateData now exposes title for the condition and each outcome. The SDK’s useConditionsState wraps that endpoint.

ConditionStateData (returned by getConditionsState / consumed by useConditionsState) was also extended with title on both the condition and each outcome — use it when you need to render a market by conditionId alone.

Reference pages: useConditions · useActiveConditions · useActiveMarkets · useResolvedMarkets · getConditionsByGameIds · getConditionsState

SIWE Auth

The Toolkit and SDK now support Sign-In with Ethereum  (SIWE), letting your dApp exchange a wallet signature for a 7-day JWT that authorizes Azuro API calls. Tokens are persisted in localStorage and synced across browser tabs.

Toolkit

Three new framework-agnostic utilities under @azuro-org/toolkit:

  • getSiweNonce — request a single-use nonce for the (address, affiliateId, chainId) tuple
  • buildSiweMessage — produce the EIP-4361 message string for signMessage
  • verifySiwe — submit the signed message and receive a JWT
import { getAddress } from 'viem' import { buildSiweMessage, getSiweNonce, verifySiwe } from '@azuro-org/toolkit' const { nonce, issuedAt, expiresAt } = await getSiweNonce({ address, affiliateId, chainId, domain, uri, }) const message = buildSiweMessage({ domain, address: getAddress(address), uri, chainId, nonce, issuedAt, expiresAt, statement: 'Sign in to Azuro', }) const signature = await walletClient.signMessage({ account: address, message }) const { token, expiresIn } = await verifySiwe({ chainId, message, signature })

SDK

A new useAuth hook wires the toolkit utilities to the connected wallet (regular or AA) and persists the resulting token under azuro:auth:<address>:<affiliate>.

import { useAuth } from '@azuro-org/sdk' const { token, isAuthenticated, signIn, signOut, error } = useAuth({ affiliate: '0x...', statement: 'Sign in to Azuro', })
ℹ️

The hook does not prompt the wallet automatically by default — call signIn() from a user gesture. Pass autoSignIn: true to fire the prompt as soon as the wallet is connected and no cached token is present.

Exported alongside the hook:

  • AuthError, AuthErrorCode — discriminated error class for branchable UX
  • getAuthStorageKey(address, affiliate) — read the cached token from non-hook contexts
  • StoredAuth, UseAuthProps, UseAuthResult — types

User Favorites

The Toolkit and SDK now let users pin countries and leagues as favorites. Favorites are stored server-side per (userId, affiliateId) pair and are accessible without authentication; creating and removing favorites requires a Bearer JWT from the existing SIWE auth flow.

Toolkit

Three new framework-agnostic utilities under @azuro-org/toolkit:

import { getUserFavorites, createUserFavorite, deleteUserFavorite } from '@azuro-org/toolkit' // Public — no token needed const { favorites } = await getUserFavorites({ userId: '0xabc...', affiliateId: '0xdef...', chainId: 137, }) // Create a favorite (token from verifySiwe / useAuth) const { favoritesId } = await createUserFavorite({ chainId: 137, token: 'eyJ...', country: 'England', league: 'Premier League', sportId: 1, }) // Remove by the server-assigned ID await deleteUserFavorite({ chainId: 137, token: 'eyJ...', favoritesId })

SDK

Three new hooks under @azuro-org/sdk:

import { useAuth, useUserFavorites, useCreateUserFavorite } from '@azuro-org/sdk' const AFFILIATE = '0x...' const { data } = useUserFavorites({ affiliate: AFFILIATE }) const { isAuthenticated, signIn } = useAuth({ affiliate: AFFILIATE }) const { create, isPending } = useCreateUserFavorite({ affiliate: AFFILIATE }) const onPin = async (country: string, sportId: number) => { if (!isAuthenticated) await signIn() create({ country, league: '', sportId }) }

Both mutation hooks automatically invalidate the useUserFavorites cache on success.

ℹ️

Mutation hooks (useCreateUserFavorite, useDeleteUserFavorite) read the JWT from localStorage and throw AuthError({ code: 'NotAuthenticated' }) if no valid token is cached. Always call useAuth().signIn() from a user gesture before mutating, then retry.

Last updated on