Skip to Content

getBetTypedData

Generates EIP-712 typed data for signing a single (ordinary) bet. This typed data is used with wallet signing methods to create a bet signature.

Usage

import { getBetTypedData } from '@azuro-org/toolkit' const typedData = getBetTypedData({ account: '0xlkns...', clientData: {...}, bet: {...}, }) const signature = await walletClient.data.signTypedData(typedData)

Props

{ account: Address clientData: BetClientData bet: { conditionId: string | bigint outcomeId: string | bigint minOdds: string | bigint amount: string | bigint nonce: string | bigint } }
type BetClientData = { attention: string affiliate: Address core: Address expiresAt: number chainId: ChainId relayerFeeAmount: string isBetSponsored: boolean isFeeSponsored: boolean isSponsoredBetReturnable: boolean }

Return Value

SignTypedDataParameters<typeof BET_DATA_TYPES>

Last updated on