UNPKG

@azuro-org/toolkit

Version:

This framework-agnostic package provides essential utilities for building applications on the Azuro Protocol.

37 lines (36 loc) 1.09 kB
import type { ConditionState } from '../../global'; import type { ChainId } from '../../config'; export type GetConditionsStateParams = { chainId: ChainId; conditionIds: string[]; }; export type ConditionStateData = { conditionId: string; title: string; state: ConditionState; outcomes: { id: string; title: string; outcomeId: string; odds: string; }[]; }; type ConditionsStateResponse = { conditions: ConditionStateData[]; }; export type GetConditionsStateResult = ConditionsStateResponse['conditions']; /** * Fetches up-to-date condition states and outcome odds for a list of conditions. * * - Docs: https://gem.azuro.org/hub/apps/toolkit/feed/getConditionsState * * @example * import { getConditionsState } from '@azuro-org/toolkit' * * const conditions = await getConditionsState({ * chainId: 137, * conditionIds: ['300610060000000000635055340000000000000000387193'], * }) * */ export declare const getConditionsState: (props: GetConditionsStateParams) => Promise<GetConditionsStateResult>; export {};