@reservoir0x/relay-kit-hooks
Version:
Relay is the Fastest and Cheapest Way to Bridge and Transact Across Chains.
32 lines • 1.85 kB
TypeScript
import { RelayClient, type Execute, type paths, type ProgressData } from '@reservoir0x/relay-sdk';
import { useQuery, type DefaultError, type QueryKey } from '@tanstack/react-query';
type ExecutionStatusParams = paths['/intents/status/v2']['get']['parameters']['query'] & {
referrer?: string;
};
export type ExecutionStatusResponse = paths['/intents/status/v2']['get']['responses']['200']['content']['application/json'];
type QueryType = typeof useQuery<ExecutionStatusResponse, DefaultError, ExecutionStatusResponse, QueryKey>;
type QueryOptions = Parameters<QueryType>['0'];
export declare const queryExecutionStatus: (baseApiUrl?: string, options?: ExecutionStatusParams, headers?: HeadersInit) => Promise<ExecutionStatusResponse>;
export type onProgress = (data: ProgressData) => void;
export default function (client?: RelayClient, options?: ExecutionStatusParams, onRequest?: () => void, onResponse?: (data: Execute) => void, queryOptions?: Partial<QueryOptions>): Omit<import("@tanstack/react-query").UseQueryResult<{
status?: "refund" | "delayed" | "waiting" | "failure" | "pending" | "success" | undefined;
details?: string | undefined;
inTxHashes?: string[] | undefined;
txHashes?: string[] | undefined;
time?: number | undefined;
originChainId?: number | undefined;
destinationChainId?: number | undefined;
}, Error>, "data"> & {
data?: {
status?: "refund" | "delayed" | "waiting" | "failure" | "pending" | "success" | undefined;
details?: string | undefined;
inTxHashes?: string[] | undefined;
txHashes?: string[] | undefined;
time?: number | undefined;
originChainId?: number | undefined;
destinationChainId?: number | undefined;
} | undefined;
queryKey: readonly unknown[];
};
export {};
//# sourceMappingURL=useExecutionStatus.d.ts.map