UNPKG

@azuro-org/toolkit

Version:

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

31 lines (30 loc) 948 B
import { type ChainId } from '../../config'; import { type CreateCashoutResponse } from './createCashout'; export type GetCashoutResponse = { txHash: string; } & CreateCashoutResponse; export type GetCashoutResult = GetCashoutResponse | null; export type GetCashoutParams = { chainId: ChainId; orderId: string; }; /** * Retrieves the status and details of a cashout order by its order ID. * Returns null if the cashout order is not found. * * - Docs: https://gem.azuro.org/hub/apps/toolkit/utils/cashout/getCashout * * @example * import { getCashout } from '@azuro-org/toolkit' * * const chainId = 100 * const orderId = 'abc123' * * const cashout = await getCashout({ chainId, orderId }) * * if (cashout) { * console.log(`State: ${cashout.state}`) * console.log(`Transaction hash: ${cashout.txHash}`) * } * */ export declare const getCashout: ({ chainId, orderId }: GetCashoutParams) => Promise<GetCashoutResult>;