UNPKG

@azuro-org/sdk

Version:

One-stop solution for building betting dApps on the Azuro Protocol.

23 lines (22 loc) 909 B
import { type Selection, type ChainId } from '@azuro-org/toolkit'; import { type UseQueryResult } from '@tanstack/react-query'; import { type QueryParameter, type Bet } from '../../global'; export type PrecalculatedCashout = { isAvailable: boolean; odds: string; } & Selection; export type PrecalculatedCashoutsQueryData = { margin: string; minMargin: string; cashouts: Record<string, PrecalculatedCashout>; } | undefined; export type UsePrecalculatedCashoutsProps = { bet: Pick<Bet, 'tokenId' | 'amount' | 'outcomes' | 'status' | 'totalOdds' | 'freebetId'>; chainId?: ChainId; query?: QueryParameter<PrecalculatedCashoutsQueryData>; }; export type UsePrecalculatedCashouts = (props: UsePrecalculatedCashoutsProps) => UseQueryResult<{ isAvailable: boolean; cashoutAmount: number | undefined; }>; export declare const usePrecalculatedCashouts: UsePrecalculatedCashouts;