Developer Hub
🔮 For applications
SDK
Data Hooks
useFreeBets

Returns the FreeBets list.

ℹ️

This hook is a wrapper around getFreeBets function.

Usage

import { useFreeBets } from '@azuro-org/sdk'
 
const { data, isFetching } = useFreeBets({
  account: '...',
  affiliate: '...'
})

Props

{
  account: Address
  affiliate: Address
  enabled?: boolean
}

Return Value

UseQueryResult<FreeBet[]>
import { type UseQueryResult } from '@tanstack/react-query'
 
type FreeBet = {
  id: number
  contractAddress: Address
  signature: Hex
  expiresAt: number
  amount: string
  rawAmount: bigint
  minOdds: string
  rawMinOdds: bigint
  campaign: string
  chainId: ChainId
}