UNPKG

@shogun-sdk/one-shot

Version:

Shogun SDK - One Shot: React Components and hooks for cross-chain swaps

61 lines 2.02 kB
import { BaseQuoteContextValue, ICollectedFees, QuoteParams, QuoteTypes, Token } from '@shogun-sdk/money-legos'; import { QueryClient } from '@tanstack/react-query'; import { type ReactNode } from 'react'; interface QuoteContextValue extends BaseQuoteContextValue { quotes: QuoteTypes | undefined; errors: { feeValidationError: string | null; balanceError: string | null; slippageError: string | null; quoteError: string | null; }; quoteRefetch: () => any; fees: ICollectedFees | undefined; handleMaxBalanceInput: (quote: QuoteTypes | undefined) => void; inputValue: string; setInputValue: (inputValue: string) => void; isLoading: boolean; isRefetching: boolean; userInputAddress: string; userOutputAddress: string; isEoaAccount: boolean; confirmSlippage: () => void; gasRefuelAmount: bigint | undefined; quoteParams: QuoteParams | null; } interface WalletAddresses { solana: string; evm: string; } interface ApiConfig { key: string; url: string; } interface ProviderProps { queryClient?: QueryClient; children: ReactNode; swap: { tokenIn: Token; tokenOut: Token; setLatestSuggestedAutoSlippageValue: (slippage: number) => void; inputAmount: string; setInputAmount: (inputAmount: string) => void; recipientAddress: string; slippage: number; dynamicSlippage?: boolean; }; system: { api: ApiConfig; systemFeePercent: number; externalServiceTxCostUsd: number; userEVMAddress: string; userSolanaAddress: string; affiliateWallets: WalletAddresses; notifyAboutError: (error: Error) => void; }; isEoaAccount: boolean; } export declare function ShogunQuoteProvider({ queryClient: externalQueryClient, ...props }: Readonly<ProviderProps>): JSX.Element; export declare const useShogunQuote: () => QuoteContextValue; export {}; //# sourceMappingURL=ShogunQuoteContext.d.ts.map