import { BlockaidAddressScanRequest, BlockaidAddressScanResponse, BlockaidBulkTokenScanRequest, BlockaidBulkTokenScanResponse, BlockaidScanEvmTxRequest, BlockaidScanEvmTxResponse, BlockaidScanSolanaTxRequest, BlockaidScanSolanaTxResponse, BlockaidSiteScanRequest, BlockaidSiteScanResponse, Build7702UpgradeTxRequest, Build7702UpgradeTxResponse, BuildAuthorizationListRequest, BuildAuthorizationListResponse, BuildBatchedUserOpRequest, BuildBatchedUserOpResponse, BroadcastBatchedUserOpRequest, BroadcastBatchedUserOpResponse, BuiltEip155Transaction, EvmAccountTypeGetStatusRequest, EvmAccountTypeGetStatusResponse, GetAddressesResponse, SendBatchUserOpRequest, UpgradeTo7702Request, UpgradeTo7702Response, } from 'src/shared/types' import type { ClientResponse } from '../../types' import { BackupMethods, PortalCurve, ChainNamespace } from '../index' export const mockRpcUrl = 'https://test' export const mockEthRpcUrl = 'https://test-eth-rpc' export const mockSolRpcUrl = 'https://test-sol-rpc' export const mockRpcConfig = { 'eip155:1': mockEthRpcUrl, 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp': mockSolRpcUrl, } export const mockHost = 'portal.app.test.com' export const mockSignedHash = 'test' export const mockAddress = 'test-address' export const mockBackupConfig = { passwordStorage: { password: 'test' } } export const mockCipherText = 'test' export const mockMpcBackupResponse = { cipherText: mockCipherText, storageCallback: jest.fn(), } export const mockEip155Address = 'test-eip155-address' export const mockSolanaAddress = 'CqQMFUCEMbK9Cp9yMonmthKqzc59Ta48JpZMZsh1bDqf' export const mockTronAddress = 'TQvGkCH57KBBgGRiMpKNbZnqMHRb1x9p9X' export const mockClientResponse = { createdAt: '2023-02-20T00:00:00.000Z', custodian: { id: 'test', name: 'test', }, ejectedAt: null, environment: { id: 'test', backupWithPortalEnabled: true, isMultiBackupEnabled: true, name: 'test', }, id: 'test', isAccountAbstracted: false, metadata: { namespaces: { eip155: { address: mockEip155Address, curve: 'SECP256K1', }, solana: { address: mockSolanaAddress, curve: 'ED25519', }, tron: { address: mockTronAddress, curve: 'SECP256K1', }, }, }, wallets: [ { id: 'test', publicKey: 'test', curve: 'SECP256K1', backupSharePairs: [ { backupMethod: BackupMethods.password, id: 'test', status: 'completed', createdAt: '2023-02-20T00:00:00.000Z', }, ], }, { id: 'test', publicKey: 'test', curve: 'ED25519', backupSharePairs: [ { backupMethod: BackupMethods.password, id: 'test', status: 'incomplete', createdAt: '2023-02-20T00:00:00.000Z', }, ], }, ], } export const mockEjectResult = { SECP256K1: 'test', } export const mockEjectPrivateKeysResult = { SECP256K1: 'test-SECP256K1', ED25519: 'test-ED25519', } export const mockOrgBackupShare = 'test-org-share' export const mockOrgBackupShares = { SECP256K1: 'test-SECP256K1-org-share', ED25519: 'test-ED25519-org-share', } export const mockSharesOnDevice = { SECP256K1: true, ED25519: false, } export const mockBlockHashResponse = { value: { blockhash: 'test' } } export const mockEthTransaction = { to: mockAddress, data: '0x095ea7b3000000000000000000000000ecd4bd3121f9fd604ffac631bf6d41ec12f1fafb0000000000000000000000000000000000000000000000000000000000000000', value: '0x0', from: mockEip155Address, gas: '0x1e687', } export const mockQuoteArgs = { address: '0x67aD8DCb5a4e8d6711C87D553C9325c3e85A1Da6', affiliateAddress: '0x67aD8DCb5a4e8d6711C87D553C9325c3e85A1Da6', apiKey: '36c25bdc-aebf-4fbe-be34-298b4df13aa1', buyToken: 'UNI', chainId: 'eip155:11155111', sellAmount: 100, sellToken: 'WETH', } export const mockSigningIds = ['test-id-1', 'test-id-2'] export const mockGenerateResponse = { [PortalCurve.SECP256K1]: { id: mockSigningIds[0], share: { backupSharePairId: 'test-backup-share-pair-id', share: 'test-share', signingSharePairId: 'test-signing-share-pair-id', }, }, [PortalCurve.ED25519]: { id: mockSigningIds[1], share: { backupSharePairId: 'test-backup-share-pair-id', share: 'test-share', signingSharePairId: 'test-signing-share-pair-id', }, }, } export const mockBackupResponse = { cipherText: mockCipherText, } export const mockContent = 'test-content' export const mockFileId = 'test-file-id' export const mockFilename = 'test-filename' export const mockFolderId = 'test-folder-id' export const mockBaseUrl = `https://${mockHost}` export const mockParentOrigin = 'https://app.test.com' export const mockApikey = 'test-api-key' export const mockMpcHost = 'test-mpc-host' export const mockVersion = 'v6' export const mockBackupIds = mockSigningIds export const mockShares = mockGenerateResponse export const mockPortalError = { code: 42, message: 'test' } export const mockSignResult = { data: 'test-sign-hash', } export const mockEncryptedData = { cipherText: mockCipherText, key: 'test-key', } export const mockClient: ClientResponse = { id: 'test-client', address: mockAddress, custodian: { id: 'test-custodian-id', name: 'test-custodian', }, environment: { id: 'test-environment-id', name: 'test-environment', backupWithPortalEnabled: false, }, ejectedAt: 'test-ejected-at', isAccountAbstracted: false, metadata: { namespaces: { [ChainNamespace.EIP155]: { curve: PortalCurve.SECP256K1, address: mockAddress, }, [ChainNamespace.SOLANA]: { curve: PortalCurve.ED25519, address: mockAddress, }, [ChainNamespace.TRON]: { curve: PortalCurve.SECP256K1, address: mockAddress, }, }, }, wallets: [ { id: 'test-wallet-id', createdAt: 'test-created-at', curve: PortalCurve.SECP256K1, publicKey: 'test-wallet-public-key', backupSharePairs: [ { id: 'test-backup-share-pair-id', backupMethod: BackupMethods.password, createdAt: 'test-created-at', status: 'completed', }, ], signingSharePairs: [ { id: 'test-signing-share-pair-id', createdAt: 'test-created-at', status: 'completed', }, ], }, { id: 'test-wallet-id', createdAt: 'test-created-at', curve: PortalCurve.ED25519, publicKey: 'test-wallet-public-key', backupSharePairs: [ { id: 'test-backup-share-pair-id', backupMethod: BackupMethods.password, createdAt: 'test-created-at', status: 'completed', }, ], signingSharePairs: [ { id: 'test-signing-share-pair-id', createdAt: 'test-created-at', status: 'completed', }, ], }, ], } export const mockBalances = [ { contractAddress: 'test', balance: 'test', }, { contractAddress: 'test', balance: 'test', }, ] export const mockNFTAssets = [ { nftId: 'ethereum.0x123abc...def456.1234', name: 'Cosmic Kitty #1234', description: 'A rare, interstellar feline NFT from the Cosmic Kitties collection.', imageUrl: 'https://example.com/images/cosmic-kitty-1234.png', chainId: 'eip155:1', contractAddress: '0x123abc...def456', tokenId: '1234', collection: { name: 'Cosmic Kitties', description: 'A collection of 10,000 unique space-faring felines.', imageUrl: 'https://example.com/images/cosmic-kitties-logo.png', }, lastSale: { price: 1500000000000000000, currency: 'ETH', date: '2024-07-15T14:30:00Z', }, rarity: { rank: 42, score: 0.95, }, floorPrice: { price: 1200000000000000000, currency: 'ETH', }, detailedInfo: { ownerCount: 1, tokenCount: 1, createdDate: '2024-01-01T00:00:00Z', attributes: [ { traitType: 'Fur Color', value: 'Nebula Purple', displayType: null, }, { traitType: 'Eye Color', value: 'Starlight Blue', displayType: null, }, { traitType: 'Accessory', value: 'Jetpack', displayType: null, }, ], owners: [ { ownerAddress: '0xabcdef...123456', quantity: 1, firstAcquiredDate: '2024-07-15T14:30:00Z', lastAcquiredDate: '2024-07-15T14:30:00Z', }, ], extendedCollectionInfo: { bannerImageUrl: 'https://example.com/images/cosmic-kitties-banner.png', externalUrl: 'https://cosmickitties.io', twitterUsername: '@CosmicKitties', discordUrl: 'https://discord.gg/cosmickitties', instagramUsername: '@cosmic.kitties', mediumUsername: '@CosmicKittiesNFT', telegramUrl: 'https://t.me/cosmickitties', distinctOwnerCount: 8500, distinctNftCount: 10000, totalQuantity: 10000, }, extendedSaleInfo: { fromAddress: '0x98765...fedcba', toAddress: '0xabcdef...123456', priceUsdCents: 270000, transaction: '0xfedcba...987654', marketplaceId: 'opensea', marketplaceName: 'OpenSea', }, marketplaceInfo: [ { marketplaceId: 'opensea', marketplaceName: 'OpenSea', marketplaceCollectionId: 'cosmic-kitties', nftUrl: 'https://opensea.io/assets/ethereum/0x123abc...def456/1234', collectionUrl: 'https://opensea.io/collection/cosmic-kitties', verified: true, floorPrice: { value: 1200000000000000000, paymentToken: { paymentTokenId: 'ethereum', name: 'Ethereum', symbol: 'ETH', address: null, decimals: 18, }, valueUsdCents: 270000, }, }, ], mediaInfo: { previews: { imageSmallUrl: 'https://example.com/images/cosmic-kitty-1234-small.png', imageMediumUrl: 'https://example.com/images/cosmic-kitty-1234-medium.png', imageLargeUrl: 'https://example.com/images/cosmic-kitty-1234-large.png', imageOpengraphUrl: 'https://example.com/images/cosmic-kitty-1234-og.png', blurhash: 'L9B4IwofV@of~qofM{of00WB%Mj[', predominantColor: '#8A2BE2', }, animationUrl: 'https://example.com/animations/cosmic-kitty-1234.mp4', backgroundColor: '#000000', }, }, }, ] export const mockAssets = { nativeBalance: { balance: '0.10991767582513721', decimals: 18, name: 'Ether', rawBalance: '109917675825137210', symbol: 'ETH', metadata: { logo: 'https://cdn.moralis.io/eth/0x.png', thumbnail: 'https://cdn.moralis.io/eth/0x_thumb.png', }, }, tokenBalances: [ { balance: '0.0199', decimals: 18, name: 'Wrapped Ether', rawBalance: '19900000000000000', symbol: 'WETH', metadata: { tokenAddress: '0xfff9976782d46cc05630d1f6ebab18b2324d6b14', verifiedContract: false, totalSupply: '48148.648311179713152621', rawTotalSupply: '48148648311179713152621', percentageRelativeToTotalSupply: 0.00004133033989114, }, }, ], nfts: mockNFTAssets, } export const mockBuiltTransaction = { transaction: { from: '0x54968898742c08da211a1cd355447cd1f37f0649', to: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', data: '0xa9059cbb000000000000000000000000dfd8302f44727a6348f702ff7b594f127de3a9020000000000000000000000000000000000000000000000000000000000002710', }, metadata: { amount: '0.01', fromAddress: '0x54968898742c08da211a1cd355447cd1f37f0649', toAddress: '0xdFd8302f44727A6348F702fF7B594f127dE3A902', tokenAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', tokenDecimals: 6, rawAmount: '10000', }, } export const mockBuiltTronTransaction = { transaction: { id: 'mock-tron-tx-id-abc123', network: 'nile', }, metadata: { amount: '1', fromAddress: mockTronAddress, toAddress: 'TAKAgsfLknBjAupezWMPosnjruGnjAnhin', tokenSymbol: 'TRX', contractAddress: null, }, } export const mockNFTs = [ { contract: { address: '0x0000000000cf80e7cf8fa4480907f692177f8e06', }, id: { tokenId: '0xa36591d4875019bf11c42964e825968e43ffe4f87ac936b64f3920310d66dde7', tokenMetadata: { tokenType: 'ERC721', }, }, balance: '1', title: 'vitalik.cloud', description: 'vitalik.cloud - Namefi™️ NFT representing the beneficiary-ship of vitalik.cloud domain. vitalik.cloud is valuable because "Vitalik" resonates with Vitalik Buterin, co-founder of Ethereum, linking to technology and innovation. The ".cloud" TLD emphasizes modern tech, cloud computing, and online solutions, relevant to tech startups or services. This combination could attract businesses in the tech sector or enthusiasts of blockchain technology, increasing its potential for branding and marketability as a domain associated with leading-edge technological solutions and thought leadership in the cloud computing space.', tokenUri: { gateway: 'https://md.namefi.io/vitalik.cloud', raw: 'https://md.namefi.io/vitalik.cloud', }, media: [ { gateway: 'https://nft-cdn.alchemy.com/eth-mainnet/a91d6d9cffbe5426ba8b50de8ced5868', thumbnail: 'https://res.cloudinary.com/alchemyapi/image/upload/thumbnailv2/eth-mainnet/a91d6d9cffbe5426ba8b50de8ced5868', raw: 'https://md.namefi.io/ethereum/svg/vitalik.cloud/image.svg', format: 'svg+xml; charset=utf-8', bytes: 15232, }, ], metadata: { background_image: 'https://md.namefi.io/ethereum/svg/vitalik.cloud/image.svg', image: 'https://md.namefi.io/ethereum/svg/vitalik.cloud/image.svg', external_url: 'https://vitalik.cloud', is_normalized: true, image_url: 'https://md.namefi.io/ethereum/svg/vitalik.cloud/image.svg', name: 'vitalik.cloud', description: 'vitalik.cloud - Namefi™️ NFT representing the beneficiary-ship of vitalik.cloud domain. vitalik.cloud is valuable because "Vitalik" resonates with Vitalik Buterin, co-founder of Ethereum, linking to technology and innovation. The ".cloud" TLD emphasizes modern tech, cloud computing, and online solutions, relevant to tech startups or services. This combination could attract businesses in the tech sector or enthusiasts of blockchain technology, increasing its potential for branding and marketability as a domain associated with leading-edge technological solutions and thought leadership in the cloud computing space.', attributes: [ { value: '🔒 Locked', trait_type: 'Is Locked', }, { value: true, trait_type: 'Is Frozen', }, { value: 'cloud', trait_type: 'Top Level Domain (TLD)', }, { display_type: 'number', value: 5, trait_type: 'TLD Length', }, { value: 'vitalik', trait_type: 'Second Level Domain (TLD)', }, { display_type: 'number', value: 7, trait_type: 'SLD Length', }, { display_type: 'date', value: '2024-10-11', trait_type: 'Expiration Date', }, ], version: 0, url: 'https://md.namefi.io/ethereum/vitalik.cloud', }, timeLastUpdated: '2024-08-26T09:41:05.710Z', contractMetadata: { name: 'NamefiNFT', symbol: 'NFNFT', tokenType: 'ERC721', contractDeployer: '0x1b0f291c8ffebe891886351cdff8a304a840c8ad', deployedBlockNumber: 19059948, openSea: { floorPrice: 0.0009, collectionName: 'NamefiNFT', collectionSlug: 'namefinft', safelistRequestStatus: 'not_requested', imageUrl: 'https://i.seadn.io/s/raw/files/10a6796a32c3dd4aa3cd884d3f48c610.png?w=500&auto=format', description: 'Namefi.io tokenize DNS domain name ownership on Ethereum.', lastIngestedAt: '2024-08-23T22:08:59.000Z', }, }, }, { contract: { address: '0x000386e3f7559d9b6a2f5c46b4ad1a9587d59dc3', }, id: { tokenId: '0x0000000000000000000000000000000000000000000000000000000000000001', tokenMetadata: { tokenType: 'ERC721', }, }, balance: '26', title: '', description: '', tokenUri: { gateway: 'http://api.nikeapenft.xyz/ipfs/1', raw: 'http://api.nikeapenft.xyz/ipfs/1', }, media: [ { gateway: '', raw: '', }, ], metadata: {}, timeLastUpdated: '2024-08-27T08:06:39.172Z', contractMetadata: { name: 'Bored Ape Nike Club', symbol: 'BANC', tokenType: 'ERC721', contractDeployer: '0x51d7d428041e23ef51422e110dfeff906e821cfe', deployedBlockNumber: 14276343, openSea: { floorPrice: 0, collectionName: 'BoredApeNikeClub', collectionSlug: 'bored-ape-nike-club-v2', safelistRequestStatus: 'not_requested', imageUrl: 'https://i.seadn.io/gae/yJ9DgXqjRwgdCkrQmHj7krCbixM8fPVAyYJWJ5NHXap1L0c3QL5MPvrNT0QDINIStGOK857lOvab8MpNQS9X4pkHPktmhVmN82qoVw?w=500&auto=format', description: 'COUNTDOWN OVER. MINTING LIVE.\n\n[Mint on the website.](https://nikemetaverse.xyz)\n', bannerImageUrl: 'https://i.seadn.io/gae/i84LsC2dtbF5I3YiuaXzzfvSijlBI-ZJ8UEta04Ukl4V57Uoj0ZGw8tNyuPdwrF7N5pclyzdqSJjxHZ65z4G5jQrVRK_DHUMVrzTYQ?w=500&auto=format', lastIngestedAt: '2024-08-25T06:22:16.000Z', }, }, spamInfo: { isSpam: 'true', classifications: [ 'OwnedByMostHoneyPots', 'Erc721TooManyOwners', 'Erc721TooManyTokens', 'NoSalesActivity', 'HighAirdropPercent', 'HighHoneyPotPercent', 'HoneyPotsOwnMultipleTokens', ], }, }, ] export const mockTransactions = [ { blockNum: '0xb0eadc', uniqueId: '0x3847245c01829b043431067fb2bfa95f7b5bdc7e4246c843e7a573ab6f26f5ff:external', hash: '0x3847245c01829b043431067fb2bfa95f7b5bdc7e4246c843e7a573ab6f26f5ff', from: '0xef4396d9ff8107086d215a1c9f8866c54795d7c7', to: '0x5c43b1ed97e52d009611d89b74fa829fe4ac56b1', value: 0.5, erc721TokenId: null, erc1155Metadata: null, tokenId: null, asset: 'ETH', category: 'external', rawContract: { value: '0x6f05b59d3b20000', address: null, decimal: '0x12', }, }, { blockNum: '0xb96042', uniqueId: '0x5c88806ce2e4a42c5fbd5804f340ed887995914546cf92ec39eb5472cf22c88c:external', hash: '0x5c88806ce2e4a42c5fbd5804f340ed887995914546cf92ec39eb5472cf22c88c', from: '0xef4396d9ff8107086d215a1c9f8866c54795d7c7', to: '0x5c43b1ed97e52d009611d89b74fa829fe4ac56b1', value: 0.27, erc721TokenId: null, erc1155Metadata: null, tokenId: null, asset: 'ETH', category: 'external', rawContract: { value: '0x3bf3b91c95b0000', address: null, decimal: '0x12', }, }, ] export const mockTransactionToSimulate = { from: '0xef4396d9ff8107086d215a1c9f8866c54795d7c7', to: '0x5c43b1ed97e52d009611d89b74fa829fe4ac56b1', value: '0.5', } export const mockTransactionToEvaluate = mockTransactionToSimulate export const mockSimulationResult = { changes: [], } export const mockEvaluationResult = { validation: { status: 'Success', resultType: 'Benign', description: '', reason: '', classification: '', features: [], }, simulation: { status: 'Success', assetsDiffs: { '0xcAE0D97d201aD54275b6e8a6b547C7611aD47963': [ { asset: { type: 'NATIVE', chainName: 'sepolia', decimals: 18, chainId: 11155111, logoUrl: 'https://cdn.blockaid.io/chain/ethereum-sepolia', name: 'Sepolia Ether', symbol: 'ETH', }, in: [ { summary: 'Received 0 ETH', value: '0.000000001', rawValue: '0x3b9aca00', }, ], out: [], }, ], '0xF16Ef9918f6d3A5D3f07c3b9d51088Cc552a2f6E': [ { asset: { type: 'NATIVE', chainName: 'sepolia', decimals: 18, chainId: 11155111, logoUrl: 'https://cdn.blockaid.io/chain/ethereum-sepolia', name: 'Sepolia Ether', symbol: 'ETH', }, in: [], out: [ { summary: 'Sent 0 ETH', value: '0.000000001', rawValue: '0x3b9aca00', }, ], }, ], }, params: { from: '0xf16ef9918f6d3a5d3f07c3b9d51088cc552a2f6e', to: '0xcae0d97d201ad54275b6e8a6b547c7611ad47963', value: '0x3b9aca00', data: '0x', blockTag: 'latest', chain: 'ethereum-sepolia', }, totalUsdDiff: {}, exposures: {}, totalUsdExposure: {}, addressDetails: {}, accountSummary: { assetsDiffs: [ { asset: { type: 'NATIVE', chainName: 'sepolia', decimals: 18, chainId: 11155111, logoUrl: 'https://cdn.blockaid.io/chain/ethereum-sepolia', name: 'Sepolia Ether', symbol: 'ETH', }, in: [], out: [ { summary: 'Sent 0 ETH', value: '0.000000001', rawValue: '0x3b9aca00', }, ], }, ], exposures: [], totalUsdExposure: {}, }, }, } export const mockQuoteRes = { allowanceTarget: 'test', cost: 'test', transaction: { to: 'test', }, } export const mockSourcesRes = { data: { rawResponse: { sources: ['0x', 'SushiSwap', 'Uniswap', 'Uniswap_V2', 'Uniswap_V3'], zid: 'test-zid', }, }, metadata: { chainId: 'eip155:1', clientId: 'test', clientEip155Address: '0x1234567890123456789012345678901234567890', }, } export const mockZeroXQuoteResponse = { allowanceTarget: '0x1234567890123456789012345678901234567890', cost: '1000000000000000', transaction: { from: '0x67aD8DCb5a4e8d6711C87D553C9325c3e85A1Da6', to: '0x1234567890123456789012345678901234567890', data: '0xabcdef', gasLimit: '21000', maxFeePerGas: '2000000000', maxPriorityFeePerGas: '1000000000', nonce: '1', value: '1000000000000000000', }, } export const mockOrganizationShare = 'test-org-share' export const mockDecryptedData = JSON.stringify({ [PortalCurve.SECP256K1]: { share: Buffer.from('test-share').toString('base64'), }, [PortalCurve.ED25519]: { share: 'test-share', }, }) export const mockEjectResponse = { SECP256K1: 'test', ED25519: 'test', } export const mockBackupPrivateKey = 'test-backup-key' export const mockSessionToken = 'test-session-token' export const mockAuthToken = 'test-auth-token' export const mockClientMetadata = { id: 'test', addresses: { [ChainNamespace.EIP155]: 'test', [ChainNamespace.SOLANA]: 'test', [ChainNamespace.TRON]: 'test', }, custodian: { id: 'test', name: 'test', }, wallets: { [ChainNamespace.EIP155]: { ...mockClient.wallets[0], publicKey: { X: 'test', Y: 'test' }, }, [ChainNamespace.SOLANA]: { ...mockClient.wallets[1], publicKey: { X: 'test', Y: 'test' }, }, [ChainNamespace.TRON]: { ...mockClient.wallets[0], publicKey: { X: 'test', Y: 'test' }, }, }, } // YieldXyz mock data export const mockYieldXyzGetYieldsRequest = { network: 'ethereum', limit: 10, offset: 0, } export const mockYieldXyzGetYieldsResponse = { data: { rawResponse: { items: [ { id: 'test-yield-id', network: 'ethereum', inputTokens: [ { symbol: 'ETH', name: 'Ethereum', decimals: 18, network: 'ethereum', address: '0x0000000000000000000000000000000000000000', logoURI: 'https://example.com/eth.png', }, ], outputToken: { symbol: 'stETH', name: 'Staked Ethereum', decimals: 18, network: 'ethereum', address: '0x0000000000000000000000000000000000000001', logoURI: 'https://example.com/steth.png', }, token: { symbol: 'ETH', name: 'Ethereum', decimals: 18, network: 'ethereum', address: '0x0000000000000000000000000000000000000000', logoURI: 'https://example.com/eth.png', }, rewardRate: { total: 5.5, rateType: 'APR' as const, components: [], }, status: { enter: true, exit: true, }, metadata: { name: 'Test Yield', logoURI: 'https://example.com/logo.png', description: 'Test yield opportunity', documentation: 'https://example.com/docs', underMaintenance: false, deprecated: false, supportedStandards: ['ERC20'], }, mechanics: { type: 'staking' as const, requiresValidatorSelection: false, rewardSchedule: 'block' as const, rewardClaiming: 'auto' as const, gasFeeToken: { symbol: 'ETH', name: 'Ethereum', decimals: 18, }, entryLimits: { minimum: '0.01', }, supportsLedgerWalletApi: true, arguments: { enter: { fields: [] }, exit: { fields: [] }, }, possibleFeeTakingMechanisms: { depositFee: false, managementFee: false, performanceFee: false, validatorRebates: false, }, }, providerId: 'test-provider', tags: ['defi', 'staking'], }, ], limit: 10, offset: 0, total: 1, }, }, } export const mockYieldXyzEnterRequest = { yieldId: 'test-yield-id', address: mockAddress, arguments: { amount: '1.0', }, } export const mockYieldXyzEnterResponse = { data: { rawResponse: { id: 'test-action-id', intent: 'enter' as const, type: 'STAKE' as const, yieldId: 'test-yield-id', address: mockAddress, amount: '1.0', amountRaw: '1000000000000000000', amountUsd: '3000', transactions: [ { id: 'test-tx-id', title: 'Stake ETH', network: 'ethereum', status: 'WAITING_FOR_SIGNATURE' as const, type: 'STAKE' as const, createdAt: '2024-01-01T00:00:00Z', stepIndex: 0, }, ], executionPattern: 'synchronous' as const, createdAt: '2024-01-01T00:00:00Z', status: 'CREATED' as const, }, }, } export const mockYieldXyzExitRequest = { yieldId: 'test-yield-id', address: mockAddress, arguments: { amount: '1.0', }, } export const mockYieldXyzExitResponse = { data: { rawResponse: { id: 'test-action-id', intent: 'exit' as const, type: 'UNSTAKE' as const, yieldId: 'test-yield-id', address: mockAddress, amount: '1.0', amountRaw: '1000000000000000000', amountUsd: '3000', transactions: [ { id: 'test-tx-id', title: 'Unstake ETH', network: 'ethereum', status: 'WAITING_FOR_SIGNATURE' as const, type: 'UNSTAKE' as const, createdAt: '2024-01-01T00:00:00Z', stepIndex: 0, }, ], executionPattern: 'synchronous' as const, createdAt: '2024-01-01T00:00:00Z', status: 'CREATED' as const, }, }, } export const mockYieldXyzGetBalancesRequest = { queries: [ { address: mockAddress, network: 'ethereum', yieldId: 'test-yield-id', }, ], } export const mockYieldXyzGetBalancesResponse = { data: { rawResponse: { items: [ { yieldId: 'test-yield-id', balances: [ { address: mockAddress, amount: '1.5', amountRaw: '1500000000000000000', type: 'staked', token: { address: '0x0000000000000000000000000000000000000001', symbol: 'stETH', name: 'Staked Ethereum', decimals: 18, network: 'ethereum', }, amountUsd: '4500', isEarning: true, }, ], }, ], }, }, } export const mockYieldXyzGetHistoricalActionsRequest = { address: mockAddress, limit: 10, offset: 0, } export const mockYieldXyzGetHistoricalActionsResponse = { data: { rawResponse: { items: [ { id: 'test-action-id-1', intent: 'enter' as const, type: 'STAKE' as const, yieldId: 'test-yield-id', address: mockAddress, amount: '1.0', amountRaw: '1000000000000000000', amountUsd: '3000', transactions: [], executionPattern: 'synchronous' as const, createdAt: '2024-01-01T00:00:00Z', completedAt: '2024-01-01T00:05:00Z', status: 'SUCCESS' as const, }, ], total: 1, offset: 0, limit: 10, }, }, } export const mockYieldXyzManageYieldRequest = { yieldId: 'test-yield-id', address: mockAddress, action: 'CLAIM_REWARDS' as const, passthrough: 'test-passthrough', } export const mockYieldXyzManageYieldResponse = { data: { rawResponse: { id: 'test-action-id', intent: 'manage' as const, type: 'CLAIM_REWARDS' as const, yieldId: 'test-yield-id', address: mockAddress, amount: '0.1', amountRaw: '100000000000000000', amountUsd: '300', transactions: [ { id: 'test-tx-id', title: 'Claim Rewards', network: 'ethereum', status: 'WAITING_FOR_SIGNATURE' as const, type: 'CLAIM_REWARDS' as const, createdAt: '2024-01-01T00:00:00Z', stepIndex: 0, }, ], executionPattern: 'synchronous' as const, createdAt: '2024-01-01T00:00:00Z', status: 'CREATED' as const, }, }, } export const mockYieldXyzTrackTransactionRequest = { transactionId: 'test-tx-id', hash: '0x1234567890abcdef', } export const mockYieldXyzTrackTransactionResponse = { data: { rawResponse: { id: 'test-tx-id', title: 'Stake ETH', network: 'ethereum', status: 'BROADCASTED' as const, type: 'STAKE' as const, hash: '0x1234567890abcdef', createdAt: '2024-01-01T00:00:00Z', broadcastedAt: '2024-01-01T00:01:00Z', stepIndex: 0, gasEstimate: '21000', }, }, } export const mockYieldXyzGetTransactionResponse = { data: { rawResponse: { id: 'test-tx-id', title: 'Stake ETH', network: 'ethereum', status: 'CONFIRMED' as const, type: 'STAKE' as const, hash: '0x1234567890abcdef', createdAt: '2024-01-01T00:00:00Z', broadcastedAt: '2024-01-01T00:01:00Z', stepIndex: 0, gasEstimate: '21000', }, }, metadata: { clientId: 'test-client-id', transactionId: 'test-tx-id', }, } // LiFi mock data export const mockLifiToken = { address: '0x0000000000000000000000000000000000000000', symbol: 'ETH', decimals: 18, chainId: 'eip155:8453', name: 'Ethereum', logoURI: 'https://example.com/eth.png', priceUSD: '3000', } export const mockLifiToToken = { address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', symbol: 'USDC', decimals: 6, chainId: 'eip155:42161', name: 'USD Coin', logoURI: 'https://example.com/usdc.png', priceUSD: '1', } export const mockLifiAction = { fromChainId: 'eip155:8453', fromAmount: '1000000000000', fromToken: mockLifiToken, toChainId: 'eip155:42161', toToken: mockLifiToToken, slippage: 0.005, fromAddress: mockEip155Address, toAddress: mockEip155Address, } export const mockLifiEstimate = { tool: 'relay', fromAmount: '1000000000000', toAmount: '2990000000', toAmountMin: '2975050000', approvalAddress: '0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE', executionDuration: 120, fromAmountUSD: '3000', toAmountUSD: '2990', feeCosts: [], gasCosts: [ { type: 'SEND' as const, amount: '21000000000000', token: mockLifiToken, estimate: '21000', limit: '25000', amountUSD: '0.063', }, ], } export const mockLifiStep = { id: 'test-step-id', type: 'cross' as const, tool: 'relay', action: mockLifiAction, toolDetails: { key: 'relay', name: 'Relay', logoURI: 'https://example.com/relay.png', }, estimate: mockLifiEstimate, integrator: 'portal', transactionRequest: { to: '0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE', from: mockEip155Address, data: '0x123456', value: '0x0de0b6b3a7640000', gasLimit: '0x61a8', chainId: 'eip155:1', }, } export const mockLifiRoute = { id: 'test-route-id', fromChainId: 'eip155:8453', fromAmountUSD: '3000', fromAmount: '1000000000000', fromToken: mockLifiToken, toChainId: 'eip155:42161', toAmountUSD: '2990', toAmount: '2990000000', toAmountMin: '2975050000', toToken: mockLifiToToken, steps: [mockLifiStep], gasCostUSD: '0.063', fromAddress: mockEip155Address, toAddress: mockEip155Address, tags: ['RECOMMENDED', 'FASTEST'], } export const mockLifiGetRoutesRequest = { fromChainId: 'eip155:8453', fromAmount: '1000000000000', fromTokenAddress: 'ETH', toChainId: 'eip155:42161', toTokenAddress: 'USDC', fromAddress: mockEip155Address, toAddress: mockEip155Address, options: { slippage: 0.005, integrator: 'portal', }, } export const mockLifiGetRoutesResponse = { data: { rawResponse: { routes: [mockLifiRoute], unavailableRoutes: { filteredOut: [], failed: [], }, }, }, } export const mockLifiGetQuoteRequest = { fromChain: 'eip155:8453', toChain: 'eip155:42161', fromToken: 'ETH', toToken: 'USDC', fromAddress: mockEip155Address, fromAmount: '1000000000000', toAddress: mockEip155Address, order: 'FASTEST' as const, slippage: 0.005, integrator: 'portal', } export const mockLifiGetQuoteResponse = { data: { rawResponse: mockLifiStep, }, } export const mockLifiGetStatusRequest = { txHash: '0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890', bridge: 'relay' as const, fromChain: '1', toChain: '137', } export const mockLifiGetStatusResponse = { data: { rawResponse: { sending: { txHash: '0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890', txLink: 'https://etherscan.io/tx/0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890', amount: '1000000000000000000', token: mockLifiToken, chainId: '1', gasAmount: '21000000000000', gasAmountUSD: '0.063', timestamp: 1704067200, }, receiving: { chainId: '137', txHash: '0x0987654321fedcba0987654321fedcba0987654321fedcba0987654321fedcba', txLink: 'https://polygonscan.com/tx/0x0987654321fedcba0987654321fedcba0987654321fedcba0987654321fedcba', token: mockLifiToToken, amount: '2990000000', timestamp: 1704067320, }, status: 'DONE' as const, substatus: 'COMPLETED' as const, substatusMessage: 'Transfer completed successfully', tool: 'relay', transactionId: 'test-lifi-tx-id', fromAddress: mockEip155Address, toAddress: mockEip155Address, lifiExplorerLink: 'https://explorer.li.fi/tx/test-lifi-tx-id', }, }, } export const mockLifiGetRouteStepRequest = mockLifiStep export const mockLifiGetRouteStepResponse = { data: { rawResponse: { ...mockLifiStep, transactionRequest: { to: '0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE', from: mockEip155Address, data: '0x123456789abcdef', value: '0x0de0b6b3a7640000', gasLimit: '0x61a8', chainId: 'eip155:1', }, }, }, } // ZeroEx v2 mock data export const mockZeroExQuoteV2Request = { chainId: 'eip155:1', buyToken: 'UNI', sellToken: 'WETH', sellAmount: '1000000000000000000', } export const mockZeroExQuoteV2Response = { data: { rawResponse: { blockNumber: '18500000', buyAmount: '100000000000000000000', buyToken: '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', fees: { integratorFee: null, zeroExFee: null, gasFee: { amount: '21000000000000', token: '0x0000000000000000000000000000000000000000', type: 'gas', }, }, issues: { allowance: { actual: '0', spender: '0x1234567890123456789012345678901234567890', }, balance: { token: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', actual: '1000000000000000000', expected: '1000000000000000000', }, simulationIncomplete: false, invalidSourcesPassed: [], }, liquidityAvailable: true, minBuyAmount: '99000000000000000000', route: { fills: [ { from: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', to: '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', source: 'Uniswap_V3', proportionBps: '10000', }, ], tokens: [ { address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', symbol: 'WETH', }, { address: '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', symbol: 'UNI', }, ], }, sellAmount: '1000000000000000000', sellToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', tokenMetadata: { buyToken: { buyTaxBps: '0', sellTaxBps: '0', }, sellToken: { buyTaxBps: '0', sellTaxBps: '0', }, }, totalNetworkFee: '21000000000000', transaction: { to: '0x1234567890123456789012345678901234567890', data: '0xabcdef', gas: '200000', gasPrice: '30000000000', value: '0', }, }, }, metadata: { buyToken: '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', sellToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', sellAmount: '1000000000000000000', chainId: 'eip155:1', clientId: 'test-client-id', clientEip155Address: mockEip155Address, }, } export const mockZeroExSourcesV2Request = { chainId: 'eip155:1', } export const mockZeroExSourcesV2Response = { data: { rawResponse: { sources: ['Uniswap_V2', 'Uniswap_V3', 'SushiSwap', '0x'], zid: 'test-zid', }, }, metadata: { chainId: 'eip155:1', clientId: 'test-client-id', }, } export const mockZeroExPriceRequest = { chainId: 'eip155:1', buyToken: 'UNI', sellToken: 'WETH', sellAmount: '1000000000000000000', } export const mockZeroExPriceResponse = { data: { rawResponse: { blockNumber: '18500000', buyAmount: '100000000000000000000', buyToken: '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', fees: { integratorFee: null, zeroExFee: null, gasFee: { amount: '21000000000000', token: '0x0000000000000000000000000000000000000000', type: 'gas', }, }, gas: '200000', gasPrice: '30000000000', issues: { allowance: { actual: '0', spender: '0x1234567890123456789012345678901234567890', }, balance: { token: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', actual: '1000000000000000000', expected: '1000000000000000000', }, simulationIncomplete: false, invalidSourcesPassed: [], }, liquidityAvailable: true, minBuyAmount: '99000000000000000000', route: { fills: [ { from: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', to: '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', source: 'Uniswap_V3', proportionBps: '10000', }, ], tokens: [ { address: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', symbol: 'WETH', }, { address: '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', symbol: 'UNI', }, ], }, sellAmount: '1000000000000000000', sellToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', tokenMetadata: { buyToken: { buyTaxBps: '0', sellTaxBps: '0', }, sellToken: { buyTaxBps: '0', sellTaxBps: '0', }, }, totalNetworkFee: '21000000000000', }, }, metadata: { buyToken: '0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984', sellToken: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', sellAmount: '1000000000000000000', chainId: 'eip155:1', clientId: 'test-client-id', clientEip155Address: mockEip155Address, }, } export const mockZeroExOptions = { zeroXApiKey: 'test-0x-api-key', } // Hypernative Security mock data export const mockScanAddressesRequest = { addresses: ['0x1234567890123456789012345678901234567890'], screenerPolicyId: 'test-policy-id', } export const mockScanAddressesResponse = { data: { rawResponse: [ { address: '0x1234567890123456789012345678901234567890', recommendation: 'accept', severity: 'low', totalIncomingUsd: 1000, policyId: 'test-policy-id', timestamp: '2024-01-01T00:00:00Z', flags: [], }, ], }, } export const mockScanEVMTxRequest = { transaction: { chain: 'ethereum', fromAddress: '0x1234567890123456789012345678901234567890', toAddress: '0x0987654321098765432109876543210987654321', input: '0xabcdef', value: '1000000000000000000', }, url: 'https://example.com', validateNonce: true, showFullFindings: true, } export const mockScanEVMTxResponse = { data: { rawResponse: { success: true, data: { assessmentId: 'test-assessment-id', assessmentTimestamp: '2024-01-01T00:00:00Z', recommendation: 'accept' as const, expectedStatus: 'success' as const, findings: [], involvedAssets: [], balanceChanges: null, }, error: null, version: '1.0.0', service: 'hypernative', }, }, } export const mockScanEip712TxRequest = { walletAddress: '0x1234567890123456789012345678901234567890', chainId: '1', eip712Message: { primaryType: 'Transfer', types: { Transfer: [ { name: 'to', type: 'address' }, { name: 'amount', type: 'uint256' }, ], }, domain: { name: 'Test', version: '1', chainId: 1, }, message: { to: '0x0987654321098765432109876543210987654321', amount: '1000000000000000000', }, }, showFullFindings: true, } export const mockScanEip712TxResponse = { data: { rawResponse: { success: true, data: { assessmentId: 'test-assessment-id', assessmentTimestamp: '2024-01-01T00:00:00Z', recommendation: 'accept' as const, findings: [], involvedAssets: [], }, error: null, version: '1.0.0', service: 'hypernative', }, }, } export const mockScanSolanaTxRequest = { transaction: { message: { accountKeys: ['test-account-key'], header: { numRequiredSignatures: 1, numReadonlySignedAccounts: 0, numReadonlyUnsignedAccounts: 0, }, instructions: [ { accounts: [0], data: 'test-data', programIdIndex: 0, }, ], recentBlockhash: 'test-blockhash', }, signatures: ['test-signature'], }, url: 'https://example.com', validateRecentBlockHash: true, showFullFindings: true, } export const mockScanSolanaTxResponse = { data: { rawResponse: { success: true, data: { recommendation: 'accept' as const, expectedStatus: 'success' as const, findings: [], involvedAssets: [], balanceChanges: null, }, error: null, version: '1.0.0', service: 'hypernative', }, }, } export const mockScanNftRequest = [ { address: '0x1234567890123456789012345678901234567890', chain: 'ethereum', evmChainId: 1, }, ] export const mockScanNftResponse = { data: { rawResponse: { success: true, data: { nfts: [ { address: '0x1234567890123456789012345678901234567890', chain: 'ethereum', evmChainId: '1', accept: true, }, ], }, error: null, version: '1.0.0', service: 'hypernative', }, }, } export const mockScanTokenRequest = [ { address: '0x1234567890123456789012345678901234567890', chain: 'ethereum', evmChainId: 1, }, ] export const mockScanTokenResponse = { data: { rawResponse: { success: true, data: { tokens: [ { address: '0x1234567890123456789012345678901234567890', chain: 'ethereum', reputation: { recommendation: 'accept' as const, }, }, ], }, error: null, version: '1.0.0', service: 'hypernative', }, }, } export const mockScanUrlRequest = 'https://example.com' export const mockScanUrlResponse = { data: { rawResponse: { success: true, data: { isMalicious: false, deepScanTriggered: false, }, error: null, version: '1.0.0', service: 'hypernative', }, }, } // Blockaid mock data export const mockBlockaidScanEvmTxRequest = { chain: 'ethereum', data: { from: '0x1234567890123456789012345678901234567890', to: '0x0987654321098765432109876543210987654321', data: '0xabcdef', value: '1000000000000000000', }, metadata: { domain: 'https://example.com', }, account_address: '0x1234567890123456789012345678901234567890', options: ['validation', 'simulation'], } as BlockaidScanEvmTxRequest export const mockBlockaidScanEvmTxResponse = { data: { rawResponse: { validation: { classification: 'benign', description: 'This transaction appears safe', features: [ { type: 'Benign', feature_id: 'safe_transfer', description: 'Standard ETH transfer', }, ], reason: 'Standard transfer', result_type: 'Benign', status: 'Success', }, simulation: { account_address: '0x1234567890123456789012345678901234567890', account_summary: {}, address_details: {}, assets_diffs: {}, block: 18500000, chain: 'ethereum', exposures: {}, status: 'Success', total_usd_diff: {}, total_usd_exposure: {}, transaction_action: 'transfer', session_key: {}, }, block: '18500000', chain: 'ethereum', account_address: '0x1234567890123456789012345678901234567890', }, }, } as BlockaidScanEvmTxResponse export const mockBlockaidScanSolanaTxRequest = { account_address: 'CqQMFUCEMbK9Cp9yMonmthKqzc59Ta48JpZMZsh1bDqf', transactions: ['base64encodedtransaction'], metadata: { url: 'https://example.com', }, chain: 'mainnet', options: ['validation', 'simulation'], } as BlockaidScanSolanaTxRequest export const mockBlockaidScanSolanaTxResponse = { data: { rawResponse: { encoding: 'base64', status: 'Success', request_id: 'test-request-id', result: { validation: { features: [], reason: 'Standard transaction', result_type: 'Benign', }, simulation: { account_summary: { account_assets_diff: [], }, accounts_details: [], assets_diff: {}, assets_ownership_diff: {}, delegations: {}, }, }, }, }, } as BlockaidScanSolanaTxResponse export const mockBlockaidScanAddressRequest = { chain: 'ethereum', address: '0x1234567890123456789012345678901234567890', metadata: { domain: 'https://example.com', }, } as BlockaidAddressScanRequest export const mockBlockaidScanAddressResponse = { data: { rawResponse: { result_type: 'Benign', features: [ { type: 'Benign', feature_id: 'verified_contract', description: 'Verified contract on Etherscan', }, ], }, }, } as BlockaidAddressScanResponse export const mockBlockaidScanTokensRequest = { chain: 'ethereum', tokens: [ '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', '0xdac17f958d2ee523a2206206994597c13d831ec7', ], metadata: { domain: 'https://example.com', }, } as BlockaidBulkTokenScanRequest export const mockBlockaidScanTokensResponse = { data: { rawResponse: { results: { '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48': { result_type: 'Benign', malicious_score: '0', attack_types: {}, chain: 'ethereum', address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', metadata: { type: 'ERC20', name: 'USD Coin', symbol: 'USDC', decimals: 6, }, fees: {}, trading_limits: {}, financial_stats: { holders_count: 1000000, }, }, '0xdac17f958d2ee523a2206206994597c13d831ec7': { result_type: 'Benign', malicious_score: '0', attack_types: {}, chain: 'ethereum', address: '0xdac17f958d2ee523a2206206994597c13d831ec7', metadata: { type: 'ERC20', name: 'Tether USD', symbol: 'USDT', decimals: 6, }, fees: {}, trading_limits: {}, financial_stats: { holders_count: 2000000, }, }, }, }, }, } as BlockaidBulkTokenScanResponse export const mockBlockaidScanUrlRequest = { url: 'https://example.com', metadata: { type: 'catalog', }, } as BlockaidSiteScanRequest export const mockBlockaidScanUrlResponse = { data: { rawResponse: { status: 'hit', url: 'https://example.com', scan_start_time: '2024-01-01T00:00:00Z', scan_end_time: '2024-01-01T00:00:01Z', malicious_score: 0, is_reachable: true, is_web3_site: true, is_malicious: false, attack_types: {}, network_operations: [], json_rpc_operations: [], contract_write: { contract_addresses: [], functions: {}, }, contract_read: { contract_addresses: [], functions: {}, }, }, }, } as BlockaidSiteScanResponse // EvmAccountType mock data export const mockEvmAccountTypeChain = 'eip155:1' export const mockGetStatusRequest = { chain: mockEvmAccountTypeChain, } as EvmAccountTypeGetStatusRequest export const mockGetStatusResponse = { data: { status: 'EIP_155_EOA' as const, }, metadata: { chainId: mockEvmAccountTypeChain, eoaAddress: '0x1234567890abcdef1234567890abcdef12345678', smartContractAddress: '0xabcdef1234567890abcdef1234567890abcdef12', }, } as EvmAccountTypeGetStatusResponse export const mockGetAddressesRequest = { chain: mockEvmAccountTypeChain, } as EvmAccountTypeGetStatusRequest export const mockGetAddressesResponse: GetAddressesResponse = { eoaAddress: '0x1234567890abcdef1234567890abcdef12345678', smartContractAddress: '0xabcdef1234567890abcdef1234567890abcdef12', } export const mockBuildAuthorizationListRequest = { chain: mockEvmAccountTypeChain, subsidize: true, } as BuildAuthorizationListRequest export const mockBuildAuthorizationListResponse = { data: { hash: '0xabcd1234ef567890', }, metadata: { authorization: { contractAddress: '0xabcdef1234567890abcdef1234567890abcdef12', chainId: mockEvmAccountTypeChain, nonce: '0', }, chainId: mockEvmAccountTypeChain, subsidize: true, }, } as BuildAuthorizationListResponse export const mockBuild7702UpgradeTxRequest = { chain: mockEvmAccountTypeChain, signature: '0x1234567890abcdef', subsidize: true, } as Build7702UpgradeTxRequest export const mockBuild7702UpgradeTxResponse = { data: { transaction: { type: 'eip7702' as const, from: '0x1234567890abcdef1234567890abcdef12345678', to: '0xabcdef1234567890abcdef1234567890abcdef12', value: '0', data: '0x', nonce: '0', chainId: mockEvmAccountTypeChain, authorizationList: [ { address: '0xabcdef1234567890abcdef1234567890abcdef12', chainId: mockEvmAccountTypeChain, nonce: '0', r: '0xr', s: '0xs', yParity: '0x0', }, ], gasLimit: '21000', maxFeePerGas: '1000000000', maxPriorityFeePerGas: '1000000000', }, transactionHash: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef', }, metadata: { authorization: { contractAddress: '0xabcdef1234567890abcdef1234567890abcdef12', chainId: mockEvmAccountTypeChain, nonce: '0', }, chainId: mockEvmAccountTypeChain, hash: '0xabcd1234ef567890', signature: { r: '0xr', s: '0xs', yParity: '0x0', }, subsidize: true, }, } as Build7702UpgradeTxResponse export const mockUpgradeTo7702Request = { chain: mockEvmAccountTypeChain, } as UpgradeTo7702Request export const mockUpgradeTo7702Response = { txHash: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef', } as UpgradeTo7702Response export const mockBuildBatchedUserOpRequest = { chain: 'eip155:1', calls: [ { to: '0xcae0d97d201ad54275b6e8a6b547c7611ad47963', value: '0', data: '0x', }, ], } as BuildBatchedUserOpRequest export const mockBuildBatchedUserOpResponse = { data: { userOperation: '{"sender":"0xabc","nonce":"0x0","initCode":"0x","callData":"0x","callGasLimit":"0x5208","verificationGasLimit":"0x0186A0","preVerificationGas":"0xC350","maxFeePerGas":"0x3B9ACA00","maxPriorityFeePerGas":"0x3B9ACA00","paymasterAndData":"0x","signature":"0x"}', userOpHash: '0xdeadbeef1234567890abcdef1234567890abcdef1234567890abcdef12345678', }, metadata: { chainId: 'eip155:1', // Gas info as decimal strings (matching connect-api): totalGas (units), // maxFeePerGas (wei/gas), estimatedGasCostWei = totalGas * maxFeePerGas. totalGas: '100000', maxFeePerGas: '1000000000', estimatedGasCostWei: '100000000000000', }, } as BuildBatchedUserOpResponse export const mockBroadcastBatchedUserOpRequest = { chain: 'eip155:1', userOperation: '{"sender":"0xabc","nonce":"0x0","initCode":"0x","callData":"0x","callGasLimit":"0x5208","verificationGasLimit":"0x0186A0","preVerificationGas":"0xC350","maxFeePerGas":"0x3B9ACA00","maxPriorityFeePerGas":"0x3B9ACA00","paymasterAndData":"0x","signature":"0x1234"}', signature: '0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab', } as BroadcastBatchedUserOpRequest export const mockBroadcastBatchedUserOpResponse = { data: { userOpHash: '0xfeedface1234567890abcdef1234567890abcdef1234567890abcdef12345678', }, metadata: { chainId: 'eip155:1', }, } as BroadcastBatchedUserOpResponse // ERC-20 token transfer (data contains calldata, no native ETH value) export const mockBuiltEip155Transaction = { transaction: { from: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', to: '0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb', data: '0xa9059cbb000000000000000000000000111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000f4240', }, metadata: { amount: '1.0', fromAddress: '0xsender', toAddress: '0xrecipient', tokenAddress: '0xusdc-contract', tokenDecimals: 6, rawAmount: '1000000', }, } as BuiltEip155Transaction // Native ETH transfer (data is "0x", value comes from rawAmount) export const mockBuiltEip155TransactionNative = { transaction: { from: '0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', to: '0x1111111111111111111111111111111111111111', data: '0x', }, metadata: { amount: '0.1', fromAddress: '0xsender', toAddress: '0xrecipient', tokenAddress: '0x0000000000000000000000000000000000000000', tokenDecimals: 18, rawAmount: '100000000000000000', }, } as BuiltEip155Transaction export const mockSendBatchUserOpRequest = { chain: 'eip155:1', transactions: [ { token: 'USDC', value: '1.0', to: '0x1111111111111111111111111111111111111111' }, { token: 'USDC', value: '2.0', to: '0x2222222222222222222222222222222222222222' }, ], } as SendBatchUserOpRequest