[{"data":1,"prerenderedAt":493},["ShallowReactive",2],{"navigation_docs":3,"-guide-identify":196,"-guide-identify-surround":488},[4,44],{"title":5,"path":6,"stem":7,"children":8,"icon":43},"Guide","\u002Fguide","1.guide\u002F01.index",[9,11,15,19,23,27,31,35,39],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"Registry and aliases","\u002Fguide\u002Fregistry","1.guide\u002F02.registry",{"title":16,"path":17,"stem":18},"Address validation","\u002Fguide\u002Fvalidation","1.guide\u002F03.validation",{"title":20,"path":21,"stem":22},"Identify","\u002Fguide\u002Fidentify","1.guide\u002F04.identify",{"title":24,"path":25,"stem":26},"Metadata","\u002Fguide\u002Fmetadata","1.guide\u002F05.metadata",{"title":28,"path":29,"stem":30},"CLI","\u002Fguide\u002Fcli","1.guide\u002F06.cli",{"title":32,"path":33,"stem":34},"Agents","\u002Fguide\u002Fagents","1.guide\u002F07.agents",{"title":36,"path":37,"stem":38},"Custom chains","\u002Fguide\u002Fcustom","1.guide\u002F08.custom",{"title":40,"path":41,"stem":42},"Playground","\u002Fguide\u002Fplayground","1.guide\u002F09.playground","i-lucide-book-open",{"title":45,"path":46,"stem":47,"children":48,"icon":195},"Chains","\u002Fchains","2.chains\u002F00.index",[49,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143,147,151,155,159,163,167,171,175,179,183,187,191],{"title":50,"path":46,"stem":47},"Overview",{"title":52,"path":53,"stem":54},"Ethereum","\u002Fchains\u002Fethereum","2.chains\u002F01.ethereum",{"title":56,"path":57,"stem":58},"Base","\u002Fchains\u002Fbase","2.chains\u002F02.base",{"title":60,"path":61,"stem":62},"Arbitrum One","\u002Fchains\u002Farbitrum","2.chains\u002F03.arbitrum",{"title":64,"path":65,"stem":66},"Optimism","\u002Fchains\u002Foptimism","2.chains\u002F04.optimism",{"title":68,"path":69,"stem":70},"Polygon PoS","\u002Fchains\u002Fpolygon","2.chains\u002F05.polygon",{"title":72,"path":73,"stem":74},"BNB Chain","\u002Fchains\u002Fbsc","2.chains\u002F06.bsc",{"title":76,"path":77,"stem":78},"Avalanche C-Chain","\u002Fchains\u002Favalanche","2.chains\u002F07.avalanche",{"title":80,"path":81,"stem":82},"Fantom Opera","\u002Fchains\u002Ffantom","2.chains\u002F08.fantom",{"title":84,"path":85,"stem":86},"Gnosis Chain","\u002Fchains\u002Fgnosis","2.chains\u002F09.gnosis",{"title":88,"path":89,"stem":90},"Linea","\u002Fchains\u002Flinea","2.chains\u002F10.linea",{"title":92,"path":93,"stem":94},"zkSync Era","\u002Fchains\u002Fzksync","2.chains\u002F11.zksync",{"title":96,"path":97,"stem":98},"Scroll","\u002Fchains\u002Fscroll","2.chains\u002F12.scroll",{"title":100,"path":101,"stem":102},"Berachain","\u002Fchains\u002Fberachain","2.chains\u002F13.berachain",{"title":104,"path":105,"stem":106},"Bitcoin","\u002Fchains\u002Fbitcoin","2.chains\u002F14.bitcoin",{"title":108,"path":109,"stem":110},"Litecoin","\u002Fchains\u002Flitecoin","2.chains\u002F15.litecoin",{"title":112,"path":113,"stem":114},"Pepecoin","\u002Fchains\u002Fpepecoin","2.chains\u002F16.pepecoin",{"title":116,"path":117,"stem":118},"eCash","\u002Fchains\u002Fecash","2.chains\u002F17.ecash",{"title":120,"path":121,"stem":122},"Cardano","\u002Fchains\u002Fcardano","2.chains\u002F18.cardano",{"title":124,"path":125,"stem":126},"Solana","\u002Fchains\u002Fsolana","2.chains\u002F19.solana",{"title":128,"path":129,"stem":130},"Stellar","\u002Fchains\u002Fstellar","2.chains\u002F20.stellar",{"title":132,"path":133,"stem":134},"XRP Ledger","\u002Fchains\u002Fxrpl","2.chains\u002F21.xrpl",{"title":136,"path":137,"stem":138},"Aptos","\u002Fchains\u002Faptos","2.chains\u002F22.aptos",{"title":140,"path":141,"stem":142},"Sui","\u002Fchains\u002Fsui","2.chains\u002F23.sui",{"title":144,"path":145,"stem":146},"TON (The Open Network)","\u002Fchains\u002Fton","2.chains\u002F24.ton",{"title":148,"path":149,"stem":150},"TRON","\u002Fchains\u002Ftron","2.chains\u002F25.tron",{"title":152,"path":153,"stem":154},"Octra","\u002Fchains\u002Foctra","2.chains\u002F26.octra",{"title":156,"path":157,"stem":158},"Arweave","\u002Fchains\u002Farweave","2.chains\u002F27.arweave",{"title":160,"path":161,"stem":162},"Monero","\u002Fchains\u002Fmonero","2.chains\u002F28.monero",{"title":164,"path":165,"stem":166},"Decred","\u002Fchains\u002Fdecred","2.chains\u002F29.decred",{"title":168,"path":169,"stem":170},"Arc","\u002Fchains\u002Farc","2.chains\u002F30.arc",{"title":172,"path":173,"stem":174},"Dogecoin","\u002Fchains\u002Fdogecoin","2.chains\u002F31.dogecoin",{"title":176,"path":177,"stem":178},"Bitcoin Cash","\u002Fchains\u002Fbitcoincash","2.chains\u002F32.bitcoincash",{"title":180,"path":181,"stem":182},"Bitcoin SV","\u002Fchains\u002Fbitcoinsv","2.chains\u002F33.bitcoinsv",{"title":184,"path":185,"stem":186},"Bitcoin Gold","\u002Fchains\u002Fbitcoingold","2.chains\u002F34.bitcoingold",{"title":188,"path":189,"stem":190},"Dash","\u002Fchains\u002Fdash","2.chains\u002F35.dash",{"title":192,"path":193,"stem":194},"Zcash","\u002Fchains\u002Fzcash","2.chains\u002F36.zcash","i-lucide-link",{"id":197,"title":20,"body":198,"description":481,"extension":482,"links":483,"meta":484,"navigation":244,"path":21,"seo":486,"stem":22,"__hash__":487},"docs\u002F1.guide\u002F04.identify.md",{"type":199,"value":200,"toc":475},"minimark",[201,206,348,371,375,386,389,393,404,408,437,450,456,464,471],[202,203,205],"h2",{"id":204},"the-call","The call",[207,208,213],"pre",{"className":209,"code":210,"language":211,"meta":212,"style":212},"language-ts shiki shiki-themes chains chains chains","import { identify } from \"@agntn\u002Fchains\";\n\nconst { matches, unchecked } = identify(\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\");\nmatches.map((chain) => chain.key); \u002F\u002F [\"solana\"]\nunchecked; \u002F\u002F []\n\nidentify(\"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984\").matches.length; \u002F\u002F 13, every EVM chain\nidentify(\"0x1\").matches.map((chain) => chain.key); \u002F\u002F [\"aptos\", \"sui\"]\n","ts","",[214,215,216,239,246,271,293,302,307,324],"code",{"__ignoreMap":212},[217,218,221,225,229,232,236],"span",{"class":219,"line":220},"line",1,[217,222,224],{"class":223},"skH_V","import",[217,226,228],{"class":227},"s38Sx"," { identify } ",[217,230,231],{"class":223},"from",[217,233,235],{"class":234},"shU9J"," \"@agntn\u002Fchains\"",[217,237,238],{"class":227},";\n",[217,240,242],{"class":219,"line":241},2,[217,243,245],{"emptyLinePlaceholder":244},true,"\n",[217,247,249,252,255,258,262,265,268],{"class":219,"line":248},3,[217,250,251],{"class":223},"const",[217,253,254],{"class":227}," { matches, unchecked } ",[217,256,257],{"class":223},"=",[217,259,261],{"class":260},"sK71F"," identify",[217,263,264],{"class":227},"(",[217,266,267],{"class":234},"\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\"",[217,269,270],{"class":227},");\n",[217,272,274,277,280,283,286,289],{"class":219,"line":273},4,[217,275,276],{"class":227},"matches.",[217,278,279],{"class":260},"map",[217,281,282],{"class":227},"((chain) ",[217,284,285],{"class":223},"=>",[217,287,288],{"class":227}," chain.key); ",[217,290,292],{"class":291},"scIB-","\u002F\u002F [\"solana\"]\n",[217,294,296,299],{"class":219,"line":295},5,[217,297,298],{"class":227},"unchecked; ",[217,300,301],{"class":291},"\u002F\u002F []\n",[217,303,305],{"class":219,"line":304},6,[217,306,245],{"emptyLinePlaceholder":244},[217,308,310,313,315,318,321],{"class":219,"line":309},7,[217,311,312],{"class":260},"identify",[217,314,264],{"class":227},[217,316,317],{"class":234},"\"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984\"",[217,319,320],{"class":227},").matches.length; ",[217,322,323],{"class":291},"\u002F\u002F 13, every EVM chain\n",[217,325,327,329,331,334,337,339,341,343,345],{"class":219,"line":326},8,[217,328,312],{"class":260},[217,330,264],{"class":227},[217,332,333],{"class":234},"\"0x1\"",[217,335,336],{"class":227},").matches.",[217,338,279],{"class":260},[217,340,282],{"class":227},[217,342,285],{"class":223},[217,344,288],{"class":227},[217,346,347],{"class":291},"\u002F\u002F [\"aptos\", \"sui\"]\n",[349,350,351,354,355,358,359,362,363,366,367,370],"p",{},[214,352,353],{},"identify(address)"," partitions the registry: ",[214,356,357],{},"matches"," holds every chain whose ",[214,360,361],{},"assertAddress"," accepted the string, ",[214,364,365],{},"unchecked"," holds every chain that carries no validator and so couldn't be asked. Only ",[214,368,369],{},"InvalidAddressError"," counts as a miss. Anything else a validator throws is a bug and comes back out.",[202,372,374],{"id":373},"what-a-match-means","What a match means",[349,376,377,378,381,382,385],{},"Format only. Every EVM chain shares one format, so a ",[214,379,380],{},"0x"," address with 40 hex digits matches all fourteen, and that's the honest answer. A match narrows the family rather than naming the chain an address is used on. Same for ",[214,383,384],{},"0x1"," on Aptos and Sui: both write the framework address that way, and nothing in the string can tell them apart.",[349,387,388],{},"A miss on a chain says the string doesn't fit that format. A miss everywhere says no registered format fits, which isn't the same as the address being wrong. It could be a chain this package doesn't know.",[202,390,392],{"id":391},"unchecked-isnt-no","Unchecked isn't no",[349,394,395,396,400,401,403],{},"A chain without a validator is named as unchecked rather than skipped, because a silent skip would let \"matches none\" read as \"belongs to no registered chain\". The list is empty right now, every built-in chain validates, but a ",[397,398,399],"a",{"href":37},"custom chain"," that skips ",[214,402,361],{}," lands there.",[202,405,407],{"id":406},"on-the-cli-and-in-the-tools","On the CLI and in the tools",[207,409,413],{"className":410,"code":411,"language":412,"meta":212,"style":212},"language-bash shiki shiki-themes chains chains chains","chains identify 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984\nchains identify EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v --json\n","bash",[214,414,415,425],{"__ignoreMap":212},[217,416,417,420,422],{"class":219,"line":220},[217,418,419],{"class":260},"chains",[217,421,261],{"class":234},[217,423,424],{"class":234}," 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984\n",[217,426,427,429,431,434],{"class":219,"line":241},[217,428,419],{"class":260},[217,430,261],{"class":234},[217,432,433],{"class":234}," EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",[217,435,436],{"class":234}," --json\n",[349,438,439,441,442,445,446,449],{},[214,440,312],{}," exits 0 even when nothing matches, because that's an answer too. It prints a warning line in that case and the matching chains otherwise, one per line with the family and the name. ",[214,443,444],{},"--json"," gives ",[214,447,448],{},"{ matches, unchecked }"," as arrays of keys.",[349,451,452,455],{},[214,453,454],{},"chains_identify_address"," is the same thing for a model, grouped by family, with the reach of a match spelled out in the text:",[207,457,462],{"className":458,"code":460,"language":461,"meta":212},[459],"language-text","\"0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984\" matches 14 of 36 checked chains.\nevm (14): ethereum, base, arbitrum, optimism, polygon, bsc, avalanche, fantom, gnosis, linea, zksync, scroll, berachain, arc\nA format match narrows the family; it does not prove the address is used on any of these chains.\n","text",[214,463,460],{"__ignoreMap":212},[349,465,466,467,470],{},"The ",[397,468,40],{"href":469},"\u002Fplayground?op=identify"," runs the same partition in your browser and lights up the families as you type.",[472,473,474],"style",{},"html pre.shiki code .skH_V, html code.shiki .skH_V{--shiki-light:var(--shiki-token-keyword);--shiki-default:var(--shiki-token-keyword);--shiki-dark:var(--shiki-token-keyword)}html pre.shiki code .s38Sx, html code.shiki .s38Sx{--shiki-light:var(--ui-text-highlighted);--shiki-default:var(--ui-text-highlighted);--shiki-dark:var(--ui-text-highlighted)}html pre.shiki code .shU9J, html code.shiki .shU9J{--shiki-light:var(--shiki-token-string);--shiki-default:var(--shiki-token-string);--shiki-dark:var(--shiki-token-string)}html pre.shiki code .sK71F, html code.shiki .sK71F{--shiki-light:var(--shiki-token-function);--shiki-default:var(--shiki-token-function);--shiki-dark:var(--shiki-token-function)}html pre.shiki code .scIB-, html code.shiki .scIB-{--shiki-light:var(--shiki-token-comment);--shiki-default:var(--shiki-token-comment);--shiki-dark:var(--shiki-token-comment)}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":212,"searchDepth":241,"depth":241,"links":476},[477,478,479,480],{"id":204,"depth":241,"text":205},{"id":373,"depth":241,"text":374},{"id":391,"depth":241,"text":392},{"id":406,"depth":241,"text":407},"One address of unknown origin through every registered validator. Which chains accept the format and which couldn't be asked. What a match doesn't mean.","md",null,{"icon":485},"i-lucide-scan-search",{"title":20,"description":481},"_WA_Zfo0vvvKi7hu6dxCeL-chUFdB7Z_EzT0Q-1VrMo",[489,491],{"title":16,"path":17,"stem":18,"description":490,"children":-1},"assertAddress on every chain, and decodeAddress for what an address pays to. What each family decodes and which checksums are verified and which are left alone. A format check and nothing more.",{"title":24,"path":25,"stem":26,"description":492,"children":-1},"Every field on a chain class. Which ones may be missing and why. Where each decimals value, magic and proof-of-work hash was checked.",1791251837297]