import BN from "bn.js"; import { EVMVM } from "./evm"; import { SVMVM } from "./svm"; import type { EntryPointVersion } from "./evm/aa-service/lib/type"; export interface ChainWalletConfig { chainId: number; name: string; rpcUrl: string; explorerUrl: string; nativeToken: { name: string; symbol: string; decimals: number; }; logoUrl: string; confirmationNo?: number; testnet?: boolean; vmType: vmTypes; savings?: ChainSavingConfig; aaSupport?: AA_SupportConfig; } export interface ChainSavingConfig { supported: boolean; tokens: TokenInfo[]; } export interface AA_SupportConfig { enabled: boolean; entryPoints: { address: string; version: EntryPointVersion; }[]; bundlerUrl: string; paymasterUrl: string; kernelImplementations: { address: string; version: number; }[]; } export interface TokenInfo { address: string; name: string; symbol: string; decimals: number; logoUrl?: string; description?: string; website?: string; social?: { twitter?: string; discord?: string; telegram?: string; [key: string]: string | undefined; }; } export interface UserTokenBalance extends TokenInfo { balance: number; owner: AddressType; } export interface NFTInfo { tokenId: string; contractAddress: string; name?: string; description?: string; image?: string; } export interface NFT { id: string; name: string; symbol?: string; description: string; image?: string; uri: string; collection: { address: string; name: string; verified?: boolean; }; chainType: 'SVM' | 'EVM'; balance?: string; attributes?: Array<{ trait_type: string; value: string | number; display_type?: string; }>; creators?: Array<{ address: string; verified: boolean; share: number; }>; sellerFeeBasisPoints?: number; tokenStandard?: string; isSpam?: boolean; raw?: { svm?: SolanaNFT; evm?: EVMNFT; }; } export interface NFTCollection { address: string; name: string; symbol?: string; description?: string; image?: string; verified?: boolean; chainType: 'SVM' | 'EVM'; nfts: NFT[]; totalOwned: number; contractMetadata?: { tokenType?: string; totalSupply?: string; contractDeployer?: string; deployedBlockNumber?: number; }; collectionMetadata?: { updateAuthority?: string; sellerFeeBasisPoints?: number; creators?: Array<{ address: string; verified: boolean; share: number; }>; }; openSeaMetadata?: { collectionSlug?: string; floorPrice?: number; safelistRequestStatus?: string; }; } export interface SolanaNFT { mint: string; name: string; symbol: string; uri: string; updateAuthority: string; sellerFeeBasisPoints: number; creators?: Array<{ address: string; verified: boolean; share: number; }>; } export interface EVMNFTContract { address: string; name: string; symbol: string; totalSupply: string; tokenType: string; contractDeployer: string; deployedBlockNumber: number; isSpam: boolean; spamClassifications?: string[]; } export interface EVMNFTOpenSeaMetadata { collectionName: string; collectionSlug: string; floorPrice?: number; safelistRequestStatus: string; imageUrl?: string; lastIngestedAt: string; } export interface EVMNFTImage { cachedUrl?: string; thumbnailUrl?: string; pngUrl?: string; contentType?: string; size?: number; originalUrl?: string; } export interface EVMNFTAttribute { trait_type: string; value: string | number; display_type?: string; } export interface EVMNFTRawMetadata { tokenUri?: string; metadata?: { name?: string; description?: string; image?: string; attributes?: EVMNFTAttribute[]; [key: string]: any; }; } export interface EVMNFTMint { mintAddress?: string; blockNumber?: number; timestamp?: string; transactionHash?: string; } export interface EVMNFT { contract: EVMNFTContract; openSeaMetadata?: EVMNFTOpenSeaMetadata; tokenId: string; tokenType: string; name: string; description: string; balance: string; image?: EVMNFTImage; raw?: EVMNFTRawMetadata; mint?: EVMNFTMint; timeLastUpdated: string; acquiredAt?: string; } export interface EVMNFTResponse { data: EVMNFT[]; } export interface TransactionResult { hash: string; success: boolean; error?: string; } export interface Balance { balance: BN; formatted: number; decimal: number; } export interface DiscoveredWallet { index: number; address: string; derivationPath: string; nativeBalance: { amount: bigint; formatted: number; symbol: string; }; privateKey?: string; } export interface WalletDiscoveryOptions { startIndex?: number; maxIndex?: number; gapLimit?: number; minBalance?: bigint; includeZeroBalance?: boolean; includePrivateKeys?: boolean; checkInParallel?: boolean; batchSize?: number; checkDelay?: number; onProgress?: (current: number, total: number, found: number) => void; onDiscovered?: (wallet: DiscoveredWallet) => void; } export interface PocketDiscoveryOptions extends Omit { walletIndex?: number; onDiscovered?: (pocket: DiscoveredWallet) => void; } export interface WalletDiscoveryResult { discovered: DiscoveredWallet[]; scannedIndices: number; highestIndex: number; totalBalance: bigint; stoppedByGapLimit: boolean; duration: number; } export declare const SUPPORTED_VM: { readonly EVM: typeof EVMVM; readonly SVM: typeof SVMVM; }; export type vmTypes = keyof typeof SUPPORTED_VM;