import { type AdaptedWallet, type ProgressData } from '@relayprotocol/relay-sdk'; import type { Address, Hex, WalletClient } from 'viem'; import type { BitcoinAddress, BitcoinTxHash, BitcoinWallet } from './bitcoin'; import type { RELAY_BITCOIN_CHAIN_ID, RELAY_LIGHTER_CHAIN_ID, RELAY_SOLANA_CHAIN_ID, RELAY_TRON_CHAIN_ID } from './constants'; import type { LighterAccountIndex, LighterWallet } from './lighter'; import type { RelayQuoteResult } from './quote'; import type { SolanaAddress, SolanaTxHash, SolanaWallet } from './solana'; import type { TronAddress, TronTxHash, TronWallet } from './tron'; import type { Logger, RelayExecutionInfo } from './types'; export type RelayExecutionStep = ProgressData['currentStep'] & {}; export declare const RELAY_VM_TYPES: readonly ["bvm", "evm", "hypevm", "svm", "lvm", "tvm"]; export type RelayVmType = (typeof RELAY_VM_TYPES)[number]; export type RelayAddress = { bvm: BitcoinAddress; evm: Address; hypevm: Address; svm: SolanaAddress; lvm: LighterAccountIndex; tvm: TronAddress; }[VmType]; export type RelayChainId = { bvm: typeof RELAY_BITCOIN_CHAIN_ID; evm: string; hypevm: string; svm: typeof RELAY_SOLANA_CHAIN_ID; lvm: typeof RELAY_LIGHTER_CHAIN_ID; tvm: typeof RELAY_TRON_CHAIN_ID; }[VmType]; export type RelayTxHash = { bvm: BitcoinTxHash; evm: Hex; hypevm: Hex; svm: SolanaTxHash; lvm: Hex; tvm: TronTxHash; }[VmType]; export type RelayWallet = { bvm: BitcoinWallet; evm: WalletClient | (AdaptedWallet & { vmType: 'evm'; }); hypevm: AdaptedWallet & { vmType: 'hypevm'; }; svm: SolanaWallet; lvm: LighterWallet; tvm: TronWallet; }[VmType]; export interface ExecuteRelayQuoteParams { logger: Logger; onError: (error: Error) => Promise; onProgress?: (step: RelayExecutionStep | null) => void; /** * Fired when all *input* transactions are confirmed on-chain. */ onTransactionConfirmed?: (txHash: RelayTxHash) => Promise; /** * Fired as soon as user has *signed* all input transactions, but before they are confirmed on-chain. * * After this event, no more action should be needed from the user. * However, it is possible that the transactions will be rejected and the execution will NOT continue. */ onUserActionsCompleted?: (txHash: RelayTxHash) => Promise; relayQuote: RelayQuoteResult; walletClient: RelayWallet; /** * Type of transaction being executed * * - `'standard'` - regular transaction (default) * - `'erc4337'` - ERC-4337 smart wallet transaction */ transactionType?: 'standard' | 'erc4337'; } export declare function executeRelayQuote({ logger, onError, onProgress, onTransactionConfirmed, onUserActionsCompleted, relayQuote, walletClient, transactionType, }: ExecuteRelayQuoteParams): Promise; export declare function getRelayExecutionInfo(requestId: string, apiKey: string): Promise; //# sourceMappingURL=execution.d.ts.map