SPB Git

Repository Public

NFTFixtureData.swift 29.3 KB 270 lines swift

1// SP Wallet iOS2// File: Features/NFTs/NFTFixtureData.swift3// Description: DEBUG ONLY — never compiled in release. The server answers of the NFT domain used by the fixture mode4//              (SPWALLET_NFT_FIXTURES=1) and by the unit tests: verbatim copies of ../SPWalletCore/Tests/SPWalletCoreTests/Fixtures/nft-*.json5//              (shapes of the backend's own view functions). Generated file — do not edit; regenerate from those fixtures.6//7// Author: Simon-Pierre Boucher8// Contact: contact@spboucher.ai9#if DEBUG10import Foundation1112enum NFTFixtureData {13    static let list = #"""14{15  "items": [16    { "key": "evm:ethereum:0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/8520", "chain": "ethereum", "family": "evm", "standard": "erc721", "assetId": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/8520", "tokenId": "8520",17      "name": "Ape #8520", "onchainName": null, "collection": { "key": "evm:ethereum:0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", "name": null, "verifiedOnChain": { "state": "unsupported" } },18      "quantity": "1", "state": "in_wallet", "inWallet": true, "origin": "manual", "metadataStatus": "ok", "image": { "id": "m0123456789abcdef0123456789abcdef01234567", "kind": "image", "status": "available" },19      "transferable": true, "transferBlockedBy": null, "firstSeen": "2026-11-10T12:00:00.000Z", "verifiedAt": "2026-11-17T15:00:00.000Z", "goneAt": null, "stale": false, "spam": null },20    { "key": "sol:solana:CMhGwGHMbVaBmxebfU3t5eViSf6FKHnvFCBNiA1D659j", "chain": "solana", "family": "sol", "standard": "metaplex-bubblegum", "assetId": "CMhGwGHMbVaBmxebfU3t5eViSf6FKHnvFCBNiA1D659j", "tokenId": null,21      "name": null, "onchainName": "FREE AIRDROP", "collection": null,22      "quantity": "1", "state": "in_wallet", "inWallet": true, "origin": "discovered", "metadataStatus": "blocked", "image": null,23      "transferable": false, "transferBlockedBy": "compressed_transfer_not_supported", "firstSeen": "2026-11-16T08:00:00.000Z", "verifiedAt": null, "goneAt": null, "stale": true, "spam": { "by": "solana-das" } }24  ],25  "total": 7, "hiddenSpam": 3, "cursor": 2,26  "sync": { "running": ["solana"], "lastSyncedAt": { "solana": "2026-11-17T14:58:00.000Z" } },27  "valuation": { "state": "unavailable", "reason": "no_reliable_valuation" },28  "asOf": "2026-11-17T15:00:01.000Z"29}30"""#3132    static let capabilities = #"""33{34  "chains": [35    { "network": "solana", "name": "Solana", "family": "sol", "transfer": "supported", "transferStandards": ["spl-token-2022", "metaplex-token-metadata", "metaplex-pnft", "metaplex-core"], "transferReason": null, "marketWrite": false,36      "sections": [37        { "section": "token", "status": "ok", "code": null, "unlockedBy": null, "source": "solana-rpc", "count": 3, "truncated": false, "syncedAt": "2026-11-17T15:00:00.000Z" },38        { "section": "compressed", "status": "blocked_by_provider", "code": "provider_method_unsupported", "unlockedBy": "NFT_SOLANA_DAS_URL", "source": "solana-das", "count": 0, "truncated": false, "syncedAt": "2026-11-17T15:00:00.000Z" }39      ],40      "receive": true, "inventory": "partial", "reason": "sections_blocked:compressed", "unlockedBy": "NFT_SOLANA_DAS_URL",41      "standards": ["metaplex-token-metadata", "metaplex-pnft", "spl-token-2022", "metaplex-core", "metaplex-bubblegum"], "lookup": true, "manualAdd": true, "marketRead": true },42    { "network": "ethereum", "name": "Ethereum", "family": "evm", "transfer": "supported", "transferStandards": ["erc721", "erc1155"], "transferReason": null, "marketWrite": false, "sections": [], "receive": true,43      "inventory": "blocked_by_provider", "reason": "no_keyless_discovery", "unlockedBy": "NFT_EVM_PROVIDER / NFT_EVM_INDEXER_URLS", "standards": ["erc721", "erc1155"], "lookup": true, "manualAdd": true, "marketRead": false },44    { "network": "bitcoin", "name": "Bitcoin", "family": "btc", "transfer": "not_supported", "transferStandards": [], "transferReason": "ordinals_transfer_not_supported", "marketWrite": false, "sections": [], "receive": true,45      "inventory": "blocked_by_provider", "reason": "ordinals_need_ord_indexer", "unlockedBy": null, "standards": ["ordinals-inscription"], "lookup": false, "manualAdd": false, "marketRead": false },46    { "network": "cardano", "name": "Cardano", "family": "cardano", "transfer": "not_supported", "transferStandards": [], "transferReason": "no_adapter", "marketWrite": false, "sections": [], "receive": false,47      "inventory": "unsupported", "reason": "no_adapter", "unlockedBy": null, "standards": [], "lookup": false, "manualAdd": false, "marketRead": false }48  ],49  "budget": [{ "source": "metadata-uri", "requests": 12, "bytes": "482113" }],50  "providers": [51    { "id": "solana-rpc", "on": true, "unlockedBy": null, "sends": "wallet_address_to_rpc" },52    { "id": "solana-das", "on": true, "unlockedBy": null, "sends": "wallet_address_to_rpc" },53    { "id": "evm-rpc", "on": true, "unlockedBy": null, "sends": "wallet_address_to_rpc" },54    { "id": "evm-indexer", "on": false, "unlockedBy": "NFT_EVM_INDEXER_URLS", "sends": "wallet_address_to_indexer_host" },55    { "id": "evm-provider", "on": false, "unlockedBy": "NFT_EVM_PROVIDER", "sends": "nothing_until_enabled" },56    { "id": "opensea", "on": false, "unlockedBy": "OPENSEA_API_KEY", "sends": "nothing_until_enabled" },57    { "id": "magiceden", "on": true, "unlockedBy": null, "sends": "mint_only" },58    { "id": "ordinals", "on": false, "unlockedBy": null, "sends": "not_built" }59  ],60  "limits": { "inventoryMax": 500, "mediaMaxBytes": 26214400, "dailyRequests": 5000, "dailyBytes": 2147483648 }61}62"""#6364    static let itemErc721 = #"""65{66  "modelVersion": 1, "key": "evm:ethereum:0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/8520", "family": "evm", "chainId": "ethereum",67  "ownerAddress": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", "assetId": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/8520", "standard": "erc721", "tokenId": "8520",68  "contractAddress": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D", "mintAddress": null, "quantity": "1", "supply": { "state": "unknown" },69  "collection": { "key": "evm:ethereum:0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", "id": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", "verifiedOnChain": { "state": "unsupported" }, "name": null,70    "source": { "category": "onchain", "source": "evm-rpc", "detail": "2 endpoints", "fetchedAt": "2026-11-17T15:00:00.000Z", "blockRef": { "number": "21000000", "hash": "0xabc" }, "confidence": "chain_verified", "freshness": "fresh", "covers": ["collection"] } },71  "updateAuthority": { "state": "unsupported" }, "creators": { "state": "unsupported" }, "tokenProgram": null, "royaltyBps": { "state": "unknown", "reason": "erc2981 not read" }, "ruleSet": { "state": "unsupported" }, "extensions": [],72  "metadata": {73    "status": "ok", "errorCode": null, "sourceUri": "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/8520", "resolvedUri": "https://ipfs.io/ipfs/QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/8520",74    "onchainName": null, "onchainSymbol": null, "name": "Ape #8520", "description": "<script>alert(1)</script> a description kept as text", "externalUrl": "javascript:alert(1)",75    "attributes": [76      { "raw": { "trait_type": "Fur", "value": "Golden Brown" }, "traitType": "Fur", "value": "Golden Brown", "valueText": "Golden Brown", "displayType": null, "maxValue": null, "malformed": false },77      { "raw": { "trait_type": "Level", "value": 7, "display_type": "number", "max_value": 10 }, "traitType": "Level", "value": 7, "valueText": "7", "displayType": "number", "maxValue": "10", "malformed": false },78      { "raw": "not an object", "traitType": null, "value": null, "valueText": "not an object", "displayType": null, "maxValue": null, "malformed": true }79    ],80    "raw": { "name": "Ape #8520", "image": "ipfs://QmImage", "animation_url": "https://evil.example/run.html", "attributes": [] },81    "contentHash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", "mutable": { "state": "unknown" },82    "traitStatistics": { "computed": false, "reason": "no_collection_index" },83    "source": { "category": "creator_metadata", "source": "metadata-uri", "detail": "ipfs.io", "fetchedAt": "2026-11-17T14:00:00.000Z", "confidence": "creator_declared", "freshness": "fresh", "covers": ["metadata", "media"] }84  },85  "media": [86    { "role": "image", "id": "m0123456789abcdef0123456789abcdef01234567", "sourceUri": "ipfs://QmImage", "resolvedUri": "https://ipfs.io/ipfs/QmImage", "declaredMime": null, "mime": "image/png", "kind": "image", "status": "available", "errorCode": null, "bytes": "48213" },87    { "role": "animation", "id": "mfedcba9876543210fedcba9876543210fedcba98", "sourceUri": "https://evil.example/run.html", "resolvedUri": null, "declaredMime": "text/html", "mime": null, "kind": "html", "status": "not_fetched", "errorCode": null, "bytes": null }88  ],89  "ownership": { "state": "in_wallet", "owner": { "state": "known", "value": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" }, "tokenAccount": { "state": "unsupported" }, "frozen": { "state": "unsupported" }, "delegate": { "state": "unknown" },90    "tokenRecordState": { "state": "unsupported" }, "heldByWallet": true,91    "source": { "category": "onchain", "source": "evm-rpc", "detail": "2 endpoints", "fetchedAt": "2026-11-17T15:00:00.000Z", "blockRef": { "number": "21000000" }, "confidence": "chain_verified", "freshness": "fresh", "covers": ["ownership", "identity", "state"] } },92  "market": null,93  "capabilities": { "viewable": true, "transferable": true, "transferBlockedBy": [], "transferWarnings": [], "marketActions": false, "marketBlockedBy": "market_not_integrated" },94  "sources": [95    { "category": "onchain", "source": "evm-rpc", "detail": "2 endpoints", "fetchedAt": "2026-11-17T15:00:00.000Z", "confidence": "chain_verified", "freshness": "fresh", "covers": ["ownership", "identity", "state"] },96    { "category": "creator_metadata", "source": "metadata-uri", "detail": "ipfs.io", "fetchedAt": "2026-11-17T14:00:00.000Z", "confidence": "creator_declared", "freshness": "fresh", "covers": ["metadata", "media"] }97  ],98  "fetchedAt": "2026-11-17T15:00:00.000Z", "blockRef": { "number": "21000000", "hash": "0xabc" }, "origin": "manual", "indexerFlags": null,99  "explorerUrl": "https://etherscan.io/nft/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D/8520",100  "marketSources": [{ "provider": "opensea", "name": "OpenSea", "state": "needs_key", "unlockedBy": "OPENSEA_API_KEY" }],101  "firstSeen": "2026-11-10T12:00:00.000Z", "lastSeen": "2026-11-17T15:00:00.000Z", "verifiedAt": "2026-11-17T15:00:00.000Z", "goneAt": null,102  "externalMarkets": [{ "name": "OpenSea", "url": "https://opensea.io/item/ethereum/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/8520" }],103  "transfer": { "transferable": true, "blockedBy": [], "warnings": [], "standard": "erc721", "route": "safeTransferFrom(address,address,uint256)" }104}105"""#106107    static let itemSolCore = #"""108{109  "modelVersion": 1, "key": "sol:solana:CMhGwGHMbVaBmxebfU3t5eViSf6FKHnvFCBNiA1D659j", "family": "sol", "chainId": "solana", "ownerAddress": null,110  "assetId": "CMhGwGHMbVaBmxebfU3t5eViSf6FKHnvFCBNiA1D659j", "standard": "metaplex-core", "tokenId": null, "contractAddress": null, "mintAddress": "CMhGwGHMbVaBmxebfU3t5eViSf6FKHnvFCBNiA1D659j",111  "quantity": "0", "supply": { "state": "known", "value": "1" },112  "collection": { "key": "sol:solana:phygZDQZJZVHvJGYPGoKPYUtXw7mstSYtTtcuh8LJcC", "id": "phygZDQZJZVHvJGYPGoKPYUtXw7mstSYtTtcuh8LJcC", "verifiedOnChain": { "state": "known", "value": true }, "name": "Phygitals",113    "source": { "category": "onchain", "source": "solana-rpc", "detail": "2 endpoints", "fetchedAt": "2026-11-17T15:00:00.000Z", "blockRef": { "slot": "380000000", "commitment": "finalized" }, "confidence": "chain_verified", "freshness": "stale", "covers": ["collection"] } },114  "updateAuthority": { "state": "known", "value": "phygZDQZJZVHvJGYPGoKPYUtXw7mstSYtTtcuh8LJcC" }, "creators": { "state": "known", "value": [{ "address": "62Q9eeDY3eM8A5CnprBGYMPShdBjAzdpBdr71QHsS8dS", "verified": true, "share": 100 }] },115  "tokenProgram": null, "royaltyBps": { "state": "known", "value": 500 }, "ruleSet": { "state": "unsupported" }, "extensions": ["core-collection:PermanentFreezeDelegate", "core:Attributes"],116  "metadata": { "status": "ok", "errorCode": null, "sourceUri": "https://metadata.phygitals.com/x.json", "resolvedUri": "https://metadata.phygitals.com/x.json", "onchainName": "2016 Pokemon XY Special Box Prom", "onchainSymbol": null,117    "name": "2016 Pokemon XY Special Box Promo", "description": null, "externalUrl": "https://phygitals.com/card/x", "attributes": [], "raw": null, "contentHash": null, "mutable": { "state": "known", "value": true },118    "traitStatistics": { "computed": false, "reason": "no_collection_index" }, "source": null },119  "media": [],120  "ownership": { "state": "not_in_wallet", "owner": { "state": "known", "value": "62Q9eeDY3eM8A5CnprBGYMPShdBjAzdpBdr71QHsS8dS" }, "tokenAccount": { "state": "unsupported" }, "frozen": { "state": "known", "value": false }, "delegate": { "state": "none" },121    "tokenRecordState": { "state": "unsupported" }, "heldByWallet": false,122    "source": { "category": "onchain", "source": "solana-rpc", "detail": "2 endpoints", "fetchedAt": "2026-11-17T15:00:00.000Z", "confidence": "chain_verified", "freshness": "stale", "covers": ["ownership"] } },123  "market": { "source": { "category": "market", "source": "magiceden", "detail": "api-mainnet.magiceden.dev", "fetchedAt": "2026-11-17T14:59:00.000Z", "confidence": "market_reported", "freshness": "fresh", "covers": ["market"] },124    "url": "https://magiceden.io/item-details/CMhGwGHMbVaBmxebfU3t5eViSf6FKHnvFCBNiA1D659j", "listed": { "state": "known", "value": true }, "seller": { "state": "known", "value": "62Q9eeDY3eM8A5CnprBGYMPShdBjAzdpBdr71QHsS8dS" }, "marketCollection": "phygitals",125    "listingPrice": { "state": "known", "value": { "amount": "1500000000", "currency": { "network": "solana", "asset": "native", "symbol": "SOL", "decimals": 9 } } },126    "bestOffer": { "state": "unknown", "reason": "not requested from this source" }, "lastSale": { "state": "unknown", "reason": "not requested from this source" },127    "collectionFloor": { "state": "known", "value": { "amount": "900000000", "currency": { "network": "solana", "asset": "native", "symbol": "SOL", "decimals": 9 } } } },128  "capabilities": { "viewable": true, "transferable": false, "transferBlockedBy": ["not_in_wallet"], "transferWarnings": ["core_collection_permanent_delegate", "mutable_metadata"], "marketActions": false, "marketBlockedBy": "market_not_integrated" },129  "sources": [], "fetchedAt": "2026-11-17T15:00:00.000Z", "blockRef": null, "origin": "lookup", "indexerFlags": { "spam": true, "by": "solana-das", "classifications": ["airdrop"] }, "explorerUrl": null,130  "marketSources": [], "firstSeen": "2026-11-17T15:00:00.000Z", "lastSeen": "2026-11-17T15:00:00.000Z", "verifiedAt": null, "goneAt": null,131  "externalMarkets": [{ "name": "Magic Eden", "url": "https://magiceden.io/item-details/CMhGwGHMbVaBmxebfU3t5eViSf6FKHnvFCBNiA1D659j" }, { "name": "OpenSea", "url": "https://opensea.io/item/solana/CMhGwGHMbVaBmxebfU3t5eViSf6FKHnvFCBNiA1D659j" }]132}133"""#134135    static let activity = #"""136{137  "events": [138    { "id": "evm:ethereum:0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/8520|0xaaa|spw-transfer", "assetKey": "evm:ethereum:0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/8520", "type": "transfer-out",139      "interpretation": { "by": "spw:own-transfer", "note": "sent by this wallet (proposal 7a1c1f0e-8f5f-4b1e-9c56-000000000101)" }, "tx": "0xaaa", "index": "spw-transfer", "blockRef": { "hash": "0xblock" }, "at": "2026-11-17T15:10:00.000Z",140      "from": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", "to": "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC", "quantity": "1", "price": null, "finality": "confirmed",141      "source": { "category": "onchain", "source": "spw-transfer", "detail": "this wallet's own transaction, tracked to finality", "fetchedAt": "2026-11-17T15:10:05.000Z", "confidence": "chain_single_source", "freshness": "fresh", "covers": ["events"] } },142    { "id": "evm:ethereum:0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/8520|0xbbb|12", "assetKey": "evm:ethereum:0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/8520", "type": "sale",143      "interpretation": { "by": "spw:seaport-receipt", "note": null }, "tx": "0xbbb", "index": "12", "blockRef": { "number": "20999000", "hash": "0xb2" }, "at": null, "from": "0x1111111111111111111111111111111111111111", "to": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", "quantity": "1",144      "price": { "amount": "30000000000000000000", "currency": { "network": "ethereum", "asset": "native", "symbol": "ETH", "decimals": 18 } }, "finality": "finalized",145      "source": { "category": "computed", "source": "spw", "detail": "seaport receipt decoder", "fetchedAt": "2026-11-17T15:00:00.000Z", "confidence": "computed", "freshness": "fresh", "covers": ["events"] },146      "marketProgram": { "id": "0x0000000000000068F116a894984e2DB1123eB395", "name": "Seaport 1.6", "source": "docs" },147      "market": { "provider": "opensea", "venue": "OpenSea", "orderId": "0xorder", "washTrade": { "state": "unknown" }, "fees": [{ "kind": "marketplace", "bps": 50, "amount": null, "recipient": null, "required": true }] } }148  ],149  "cursor": "20999000|evm:ethereum:0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/8520|0xbbb|12", "completeness": "recent_window", "note": "public endpoints limit the log range", "scannedAt": "2026-11-17T15:00:00.000Z", "canLoadOlder": true, "error": null150}151"""#152153    static let collection = #"""154{155  "info": { "key": "sol:solana:phygZDQZJZVHvJGYPGoKPYUtXw7mstSYtTtcuh8LJcC", "id": "phygZDQZJZVHvJGYPGoKPYUtXw7mstSYtTtcuh8LJcC", "chain": "solana", "standard": "metaplex-core", "onchainName": "Phygitals", "uri": "https://metadata.phygitals.com/collection.json",156    "size": { "state": "known", "value": "8421" }, "updateAuthority": { "state": "known", "value": "62Q9eeDY3eM8A5CnprBGYMPShdBjAzdpBdr71QHsS8dS" }, "features": ["core-collection:PermanentFreezeDelegate"],157    "source": { "category": "onchain", "source": "solana-rpc", "detail": "2 endpoints", "fetchedAt": "2026-11-17T12:00:00.000Z", "confidence": "chain_verified", "freshness": "fresh", "covers": ["collection"] } },158  "metadata": { "name": "Phygitals", "description": "Cards", "imageId": "m00000000000000000000000000000000000000aa", "status": "ok" },159  "error": null, "held": 2, "fetchedAt": "2026-11-17T12:00:00.000Z"160}161"""#162163    static let market = #"""164{165  "key": "evm:ethereum:0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/8520",166  "sources": [167    { "url": "https://opensea.io/item/ethereum/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/8520", "listed": { "state": "known", "value": true },168      "ask": { "state": "known", "value": { "orderId": "0xhash", "price": { "amount": "31500000000000000000", "currency": { "network": "ethereum", "asset": "native", "symbol": "ETH", "decimals": 18 }, "precision": "exact" }, "quantity": "1",169        "seller": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", "venue": "OpenSea", "protocol": { "name": "seaport", "address": "0x0000000000000068F116a894984e2DB1123eB395" }, "createdAt": "2026-11-16T10:00:00Z", "expiresAt": null,170        "fees": [{ "kind": "creator_royalty", "bps": 250, "amount": null, "recipient": "0x2222222222222222222222222222222222222222", "required": false }] } },171      "bestOffer": { "state": "known", "value": { "orderId": null, "price": { "amount": "29000000000000000000", "currency": { "network": "ethereum", "asset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "symbol": "WETH", "decimals": 18 }, "precision": "source_decimal" }, "quantity": "1",172        "bidder": null, "venue": "OpenSea", "scope": "collection", "createdAt": null, "expiresAt": null, "fees": null } },173      "lastSale": { "state": "known", "value": { "price": { "amount": "30000000000000000000", "currency": { "network": "ethereum", "asset": "native", "symbol": "ETH", "decimals": 18 }, "precision": "exact" }, "quantity": "1", "at": "2026-10-01T00:00:00Z", "tx": "0xbbb", "buyer": null, "seller": null, "venue": null } },174      "collection": { "slug": "boredapeyachtclub", "name": "Bored Ape Yacht Club" },175      "collectionFloor": { "state": "known", "value": { "amount": "28000000000000000000", "currency": { "network": "ethereum", "asset": "native", "symbol": "ETH", "decimals": 18 }, "precision": "source_decimal" } },176      "verification": { "state": "verified", "providerValue": "verified", "by": "OpenSea" },177      "flags": { "suspicious": { "state": "known", "value": false }, "disabled": { "state": "known", "value": false }, "nsfw": { "state": "unknown" } },178      "rarity": { "state": "known", "value": { "rank": "1204", "outOf": "10000", "method": "openrarity", "calculatedAt": null } },179      "status": { "provider": "opensea", "name": "OpenSea", "state": "ok", "code": "provider_rate_limited", "unlockedBy": null, "stale": true,180        "stamp": { "category": "market", "source": "opensea", "detail": "OpenSea", "fetchedAt": "2026-11-17T14:40:00.000Z", "confidence": "market_reported", "freshness": "stale", "covers": ["market"] },181        "attribution": { "text": "Powered by OpenSea", "url": "https://opensea.io" } } },182    { "url": null, "listed": { "state": "unknown" }, "ask": { "state": "unknown" }, "bestOffer": { "state": "unknown" }, "lastSale": { "state": "unknown" }, "collection": null, "collectionFloor": { "state": "unknown" }, "verification": null,183      "flags": { "suspicious": { "state": "unknown" }, "disabled": { "state": "unknown" }, "nsfw": { "state": "unknown" } }, "rarity": { "state": "unknown" },184      "status": { "provider": "magiceden", "name": "Magic Eden", "state": "needs_key", "code": "no_api_key", "unlockedBy": "NFT_MARKET_MAGICEDEN", "stale": false, "stamp": null, "attribution": null } }185  ],186  "contradictions": [{ "field": "ask", "providers": ["opensea", "magiceden"], "note": "different asking prices: two listings on two markets, or one stale" }],187  "rates": { "ethereum:native": { "currency": { "network": "ethereum", "asset": "native", "symbol": "ETH", "decimals": 18 }, "symbol": "ETH", "usd": "3120.55", "cad": "4380.1", "source": "coingecko", "priceAt": "2026-11-17T14:59:00.000Z", "stale": false, "withheld": null } },188  "asOf": "2026-11-17T15:00:00.000Z",189  "actions": [190    { "id": "buy", "available": false, "reason": "market_writes_not_built" }, { "id": "sell", "available": false, "reason": "market_writes_not_built" }, { "id": "create_listing", "available": false, "reason": "market_writes_not_built" },191    { "id": "cancel_listing", "available": false, "reason": "market_writes_not_built" }, { "id": "make_offer", "available": false, "reason": "market_writes_not_built" }, { "id": "cancel_offer", "available": false, "reason": "market_writes_not_built" },192    { "id": "accept_offer", "available": false, "reason": "market_writes_not_built" }193  ],194  "external": { "links": [{ "name": "OpenSea", "url": "https://opensea.io/item/ethereum/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d/8520" }],195    "notice": { "outsideWallet": true, "walletConnect": false, "keyExport": false, "code": "external_site_needs_a_wallet_connection_this_wallet_does_not_offer" } },196  "value": { "state": "unavailable", "reason": "no_valuation_from_floor_or_single_quote" }197}198"""#199200    static let marketCollection = #"""201{202  "key": "evm:ethereum:0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",203  "sources": [204    { "slug": "boredapeyachtclub", "name": "Bored Ape Yacht Club", "description": "10,000 apes", "url": "https://opensea.io/collection/boredapeyachtclub", "imageUrl": null, "bannerUrl": null,205      "verification": { "state": "verified", "providerValue": "verified", "by": "OpenSea" },206      "floor": { "state": "known", "value": { "amount": "28000000000000000000", "currency": { "network": "ethereum", "asset": "native", "symbol": "ETH", "decimals": 18 }, "precision": "source_decimal" } },207      "volumes": [{ "interval": "all", "volume": null, "reported": { "value": "1412345.5", "symbol": "ETH" }, "sales": "50123" },208                  { "interval": "7d", "volume": { "amount": "120000000000000000000", "currency": { "network": "ethereum", "asset": "native", "symbol": "ETH", "decimals": 18 }, "precision": "source_decimal" }, "reported": null, "sales": null }],209      "listedCount": { "state": "unknown" }, "owners": { "state": "known", "value": "5400" }, "totalSupply": { "state": "known", "value": "9998" },210      "fees": [{ "kind": "marketplace", "bps": 50, "amount": null, "recipient": "0x0000a26b00c1F0DF003000390027140000fAa719", "required": true }],211      "traits": { "state": "known", "value": { "total": "9998", "categories": [{ "type": "Fur", "values": [{ "value": "Golden Brown", "count": "778" }, { "value": "Black", "count": "1229" }] }], "truncated": true } },212      "definitions": { "floor": "lowest active listing on OpenSea" },213      "status": { "provider": "opensea", "name": "OpenSea", "state": "ok", "code": null, "unlockedBy": null, "stale": false,214        "stamp": { "category": "market", "source": "opensea", "detail": "OpenSea", "fetchedAt": "2026-11-17T14:55:00.000Z", "confidence": "market_reported", "freshness": "fresh", "covers": ["market"] }, "attribution": null },215      "imageId": "m00000000000000000000000000000000000000bb", "bannerId": null }216  ],217  "rates": {}, "asOf": "2026-11-17T15:00:00.000Z"218}219"""#220221    static let marketProviders = #"""222{223  "providers": [224    { "id": "magiceden", "name": "Magic Eden", "state": "on", "unlockedBy": null, "unlocks": "", "chains": ["solana"], "sends": "mint_only", "attribution": { "text": "Data by Magic Eden", "url": "https://magiceden.io" },225      "terms": { "url": "https://docs.magiceden.io", "readAt": "2026-11-17", "note": "free to use, default limit 120 QPM" }, "verification": "live",226      "budget": { "provider": "magiceden", "minute": { "used": 2, "limit": 60 }, "day": { "used": 41, "limit": 5000, "date": "2026-11-17" }, "refused": 0, "lastRefusedAt": null, "upstreamLimited": 1, "lastUpstreamLimitedAt": "2026-11-17T09:00:00.000Z" },227      "ttlSeconds": { "item": 120, "listings": 120, "offers": 120, "events": 300, "collection": 600 } },228    { "id": "opensea", "name": "OpenSea", "state": "needs_key", "unlockedBy": "OPENSEA_API_KEY", "unlocks": "listing, best offer, last sale, events, collection statistics on Solana and 7 EVM networks", "chains": ["ethereum", "base", "solana"],229      "sends": "nothing_until_enabled", "attribution": null, "terms": null, "verification": null, "budget": null, "ttlSeconds": { "item": 120, "listings": 120, "offers": 120, "events": 300, "collection": 600 } }230  ],231  "actions": [{ "id": "buy", "available": false, "reason": "market_writes_not_built" }, { "id": "accept_offer", "available": false, "reason": "market_writes_not_built" }],232  "notice": { "outsideWallet": true, "walletConnect": false, "keyExport": false, "code": "external_site_needs_a_wallet_connection_this_wallet_does_not_offer" }233}234"""#235236    static let utxoLocks = #"""237{238  "network": "bitcoin", "address": "bc1qcr8te4kr609gcawutmrza0j4xv80jy8z306fyu", "mode": "heuristic", "ordConfigured": false, "ordHost": null, "ordError": null, "signerSupportsLocks": true,239  "utxos": [240    { "txid": "abababababababababababababababababababababababababababababababab", "vout": 0, "outpoint": "abababababababababababababababababababababababababababababababab:0", "value": 546,241      "signerLock": { "reason": "owner", "at": 1794000000 }, "ord": null, "excludedBy": ["signer_locked", "heuristic_small"], "reviewed": false, "spendable": false },242    { "txid": "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd", "vout": 1, "outpoint": "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd:1", "value": 2500000,243      "signerLock": null, "ord": { "inscriptions": [], "runes": [] }, "excludedBy": [], "reviewed": false, "spendable": true }244  ],245  "staleLocks": [{ "outpoint": "efefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef:2", "reason": "ord", "at": 1793000000 }],246  "symbol": "BTC", "decimals": 8, "transfer": "not_supported", "transferReason": "ordinals_transfer_not_supported"247}248"""#249250    static let valuation = #"""251{252  "enabled": true, "state": "unavailable", "reason": "no_reliable_valuation", "excludedFromWalletTotal": true,253  "estimate": {254    "label": "indicative_floor_based_estimate", "method": "items held × lowest collection floor reported by a market source; a floor is the cheapest asking price of ANY item of the collection, not the value of the items held",255    "collections": [256      { "collectionKey": "sol:solana:phygZDQZJZVHvJGYPGoKPYUtXw7mstSYtTtcuh8LJcC", "chain": "solana", "name": "Phygitals", "items": 2,257        "floors": [{ "provider": "magiceden", "name": "Magic Eden", "floor": { "amount": "900000000", "currency": { "network": "solana", "asset": "native", "symbol": "SOL", "decimals": 9 }, "precision": "exact" }, "fetchedAt": "2026-11-17T14:55:00.000Z", "stale": false }],258        "used": { "provider": "magiceden", "floor": { "amount": "900000000", "currency": { "network": "solana", "asset": "native", "symbol": "SOL", "decimals": 9 }, "precision": "exact" }, "fetchedAt": "2026-11-17T14:55:00.000Z", "stale": false,259          "indicative": { "amount": "1800000000", "currency": { "network": "solana", "asset": "native", "symbol": "SOL", "decimals": 9 }, "precision": "exact" } }, "reason": null },260      { "collectionKey": "evm:ethereum:0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", "chain": "ethereum", "name": null, "items": 1, "floors": [], "used": null, "reason": "no_api_key" }261    ],262    "rates": { "solana:native": { "currency": { "network": "solana", "asset": "native", "symbol": "SOL", "decimals": 9 }, "symbol": "SOL", "usd": "210.5", "cad": null, "source": "coingecko", "priceAt": null, "stale": false, "withheld": null } },263    "indicativeUsd": "378.90", "collectionsCounted": 1, "collectionsWithoutFloor": 1, "itemsWithoutCollection": "not_counted", "asOf": "2026-11-17T15:00:00.000Z"264  }265}266"""#267268}269#endif270
Files main
Menu

Theme