import type { Network, WalletType } from '@arthur2079/wallets-shared'; import type { BlockchainMeta, ConfirmRouteResponse, MetaResponse, SwapResult, Token } from 'rango-sdk'; import type { PendingSwap, PendingSwapStep, SwapSavedSettings, WalletTypeAndAddress } from 'rango-types'; import { type NamespaceInputForConnect } from '@arthur2079/wallets-core/dist/legacy/types'; import BigNumber from 'bignumber.js'; export interface PendingSwapWithQueueID { id: string; swap: PendingSwap; } export type WalletBalance = { chain: Network; symbol: string; ticker: string; address: string | null; rawAmount: string; decimal: number | null; amount: string; logo: string | null; usdPrice: number | null; }; export type Account = { address: string; loading: boolean; walletType: WalletType; error: boolean; explorerUrl: string | null; isConnected?: boolean; }; export type Blockchain = { name: string; accounts: Account[]; }; export type Wallet = { blockchains: Blockchain[]; }; export type EventType = 'swap_started' | 'confirm_contract' | 'confirm_transfer' | 'task_failed' | 'task_completed' | 'task_canceled' | 'task_paused' | 'contract_confirmed' | 'confirm_approve_contract' | 'contract_rejected' | 'check_tx_status' | 'check_approve_tx_status' | 'transfer_rejected' | 'transfer_failed' | 'calling_smart_contract' | 'smart_contract_called' | 'smart_contract_call_failed' | 'step_completed_with_output' | 'waiting_for_network_change' | 'waiting_for_connecting_wallet' | 'waiting_for_change_wallet_account' | 'network_changed' | 'not_enough_balance' | 'not_enough_approval' | 'waiting_for_queue' | 'check_fee_failed' | 'route_failed_to_find' | 'transaction_expired'; export declare enum MessageSeverity { error = "error", warning = "warning", info = "info", success = "success" } export type SwapStatus = 'running' | 'failed' | 'success'; export interface TargetNamespace { namespace: NamespaceInputForConnect['namespace']; network: string; } export declare const getCurrentNamespaceOfOrNull: (swap: PendingSwap, step: PendingSwapStep) => TargetNamespace | null; export declare const getCurrentNamespaceOf: (swap: PendingSwap, step: PendingSwapStep) => TargetNamespace; export declare const getScannerUrl: (txHash: string, network: Network, blockchainMetaMap: { [key: string]: BlockchainMeta; }) => string | undefined; export declare function getNextStep(swap: PendingSwap, currentStep: PendingSwapStep): PendingSwapStep | null; /** * Returns the wallet type and address, based on the current step of `PendingSwap`. * * @param {PendingSwap} swap - The swap. * @param {PendingSwapStep} step - The current step. * @returns {WalletTypeAndAddress} Type and address related to the current step of the swap. */ export declare const getCurrentWalletTypeAndAddress: (swap: PendingSwap, step: PendingSwapStep) => WalletTypeAndAddress; /** * Returns the wallet address, based on the current step of `PendingSwap`. */ export declare const getCurrentAddressOf: (swap: PendingSwap, step: PendingSwapStep) => string; export declare function getRelatedWallet(swap: PendingSwap, currentStep: PendingSwapStep): WalletTypeAndAddress; export declare function getRelatedWalletOrNull(swap: PendingSwap, currentStep: PendingSwapStep | null): WalletTypeAndAddress | null; export declare const getUsdPrice: (blockchain: string, symbol: string, address: string | null, allTokens: Token[]) => number | null; export declare function getUsdFeeOfStep(step: SwapResult, allTokens: Token[]): BigNumber; export declare function calculatePendingSwap(params: { inputAmount: string; bestRoute: NonNullable; wallets: { [p: string]: WalletTypeAndAddress; }; settings: SwapSavedSettings; validateBalanceOrFee: boolean; meta: Pick | null; swapMode?: 'swap' | 'refuel'; }): PendingSwap; //# sourceMappingURL=shared.d.ts.map