[{"data":1,"prerenderedAt":648},["ShallowReactive",2],{"navigation_docs":3,"-guide-agents":196,"-guide-agents-surround":643},[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":32,"body":198,"description":635,"extension":636,"links":637,"meta":638,"navigation":640,"path":33,"seo":641,"stem":34,"__hash__":642},"docs\u002F1.guide\u002F07.agents.md",{"type":199,"value":200,"toc":628},"minimark",[201,206,215,318,328,332,389,392,467,490,494,500,508,515,521,525,564,567,571,587,609,620,624],[202,203,205],"h2",{"id":204},"five-tools-three-surfaces","Five tools, three surfaces",[207,208,209,210,214],"p",{},"MCP server, Pi extension and OMP extension all call the same executors in ",[211,212,213],"code",{},"src\u002Ftool-operations.ts",". They answer identically and a fix lands once.",[216,217,218,234],"table",{},[219,220,221],"thead",{},[222,223,224,228,231],"tr",{},[225,226,227],"th",{},"Tool",[225,229,230],{},"Does",[225,232,233],{},"Arguments",[235,236,237,253,271,288,302],"tbody",{},[222,238,239,245,248],{},[240,241,242],"td",{},[211,243,244],{},"chains_lookup",[240,246,247],{},"Resolve a chain and return its metadata",[240,249,250],{},[211,251,252],{},"chain",[222,254,255,260,263],{},[240,256,257],{},[211,258,259],{},"chains_validate_address",[240,261,262],{},"Check an address against one chain's format",[240,264,265,267,268],{},[211,266,252],{},", ",[211,269,270],{},"address",[222,272,273,278,281],{},[240,274,275],{},[211,276,277],{},"chains_validate_txid",[240,279,280],{},"Check a transaction id against one chain's format",[240,282,283,267,285],{},[211,284,252],{},[211,286,287],{},"txid",[222,289,290,295,298],{},[240,291,292],{},[211,293,294],{},"chains_identify_address",[240,296,297],{},"Run an address through every validator",[240,299,300],{},[211,301,270],{},[222,303,304,309,312],{},[240,305,306],{},[211,307,308],{},"chains_list",[240,310,311],{},"The registry, optionally one family",[240,313,314,317],{},[211,315,316],{},"family"," optional",[207,319,320,322,323,327],{},[211,321,252],{}," is a key, name, symbol or alias, the same thing ",[324,325,326],"a",{"href":13},"getChain"," takes. Every tool is annotated read only, idempotent and closed world, because none of them touches anything outside the process.",[202,329,331],{"id":330},"mcp","MCP",[333,334,339],"pre",{"className":335,"code":336,"language":337,"meta":338,"style":338},"language-bash shiki shiki-themes chains chains chains","chains mcp\nclaude mcp add chains --scope user -- npx -y @agntn\u002Fchains mcp\n","bash","",[211,340,341,354],{"__ignoreMap":338},[342,343,346,350],"span",{"class":344,"line":345},"line",1,[342,347,349],{"class":348},"sK71F","chains",[342,351,353],{"class":352},"shU9J"," mcp\n",[342,355,357,360,363,366,369,372,375,378,381,384,387],{"class":344,"line":356},2,[342,358,359],{"class":348},"claude",[342,361,362],{"class":352}," mcp",[342,364,365],{"class":352}," add",[342,367,368],{"class":352}," chains",[342,370,371],{"class":352}," --scope",[342,373,374],{"class":352}," user",[342,376,377],{"class":352}," --",[342,379,380],{"class":352}," npx",[342,382,383],{"class":352}," -y",[342,385,386],{"class":352}," @agntn\u002Fchains",[342,388,353],{"class":352},[207,390,391],{},"Or in a client's config:",[333,393,397],{"className":394,"code":395,"language":396,"meta":338,"style":338},"language-json shiki shiki-themes chains chains chains","{\n  \"mcpServers\": {\n    \"chains\": { \"command\": \"npx\", \"args\": [\"-y\", \"@agntn\u002Fchains\", \"mcp\"] }\n  }\n}\n","json",[211,398,399,405,413,455,461],{"__ignoreMap":338},[342,400,401],{"class":344,"line":345},[342,402,404],{"class":403},"s38Sx","{\n",[342,406,407,410],{"class":344,"line":356},[342,408,409],{"class":348},"  \"mcpServers\"",[342,411,412],{"class":403},": {\n",[342,414,416,419,422,425,428,431,433,436,439,442,444,447,449,452],{"class":344,"line":415},3,[342,417,418],{"class":348},"    \"chains\"",[342,420,421],{"class":403},": { ",[342,423,424],{"class":348},"\"command\"",[342,426,427],{"class":403},": ",[342,429,430],{"class":352},"\"npx\"",[342,432,267],{"class":403},[342,434,435],{"class":348},"\"args\"",[342,437,438],{"class":403},": [",[342,440,441],{"class":352},"\"-y\"",[342,443,267],{"class":403},[342,445,446],{"class":352},"\"@agntn\u002Fchains\"",[342,448,267],{"class":403},[342,450,451],{"class":352},"\"mcp\"",[342,453,454],{"class":403},"] }\n",[342,456,458],{"class":344,"line":457},4,[342,459,460],{"class":403},"  }\n",[342,462,464],{"class":344,"line":463},5,[342,465,466],{"class":403},"}\n",[207,468,469,470,472,473,475,476,478,479,481,482,485,486,489],{},"The server speaks MCP over stdio and checks every call against the tool's JSON Schema before an executor sees it: ",[211,471,252],{}," is 1 to 64 characters, ",[211,474,270],{}," and ",[211,477,287],{}," 1 to 256, ",[211,480,316],{}," 1 to 32. A model can't hand the process a novel to decode. ",[211,483,484],{},"createMcpServer()"," is exported from ",[211,487,488],{},"@agntn\u002Fchains\u002Fmcp"," for hosts that bring their own transport.",[202,491,493],{"id":492},"what-the-text-carries","What the text carries",[207,495,496,497,499],{},"An MCP client sees the text a tool returns and nothing else, so the text carries the whole answer. ",[211,498,244],{}," prints every metadata field on a hit:",[333,501,506],{"className":502,"code":504,"language":505,"meta":338},[503],"language-text","Polygon PoS (polygon)\nsymbol: POL\ndecimals: 18\ntype: evm\nchainId: 0x89\ncaip2: eip155:137\nbip44: 60\nexplorer: https:\u002F\u002Fpolygonscan.com\nrpc: https:\u002F\u002Fpolygon-bor-rpc.publicnode.com\n","text",[211,507,504],{"__ignoreMap":338},[207,509,510,511,514],{},"Absent fields say so out loud, ",[211,512,513],{},"bip44: none (no registered SLIP-0044 coin type)",", rather than vanishing, because a missing coin type reads as \"not shown\" and invites the caller to supply one from memory. A derivation path on an invented coin type silently produces the wrong addresses.",[207,516,517,518,520],{},"When resolution fails the text names the registered keys, so the next call has somewhere to go. ",[211,519,308],{}," exists for the same reason: without it the only way to learn what the registry holds is to send a value you expect to fail.",[202,522,524],{"id":523},"what-sets-iserror","What sets isError",[207,526,527,528,531,532,535,536,538,539,542,543,546,547,550,551,553,554,556,557,560,561,563],{},"A valid UTXO address also says what it pays to: ",[211,529,530],{},"Valid Bitcoin (bitcoin) address: \"bc1q…\" - p2wpkh, hash160 751e…",". ",[211,533,534],{},"details.decoded"," holds the same as an object. Why make a model decode the hash a second time? A rejected address is an answer, not a tool error. ",[211,537,259],{}," on a bad address returns ",[211,540,541],{},"Invalid Bitcoin (bitcoin) address: \"…\""," with ",[211,544,545],{},"isError"," unset. On an EVM chain, Bitcoin and the chains that share its Base58Check or SegWit encodings the line ends with the reason, like ",[211,548,549],{},"- 39 hex digits after 0x, not 40",". Only an unresolvable chain or a chain with no validator sets ",[211,552,545],{},", because then nothing was checked. ",[211,555,277],{}," works the same way, and there every chain adds the reason. Every chain that ships checks txids, so the missing validator is only ever a custom chain that skipped ",[211,558,559],{},"assertTxid",", and a call against it is a tool error, not a rejection. ",[211,562,294],{}," never sets it, a miss everywhere is still an answer.",[207,565,566],{},"The address in an answer comes back quoted. It arrives from whatever the caller was reading, and a newline inside one would otherwise write its own line, so a rejected address could read as a match on the chain about to be funded.",[202,568,570],{"id":569},"pi-and-omp","Pi and OMP",[333,572,574],{"className":335,"code":573,"language":337,"meta":338,"style":338},"pi install npm:@agntn\u002Fchains\n",[211,575,576],{"__ignoreMap":338},[342,577,578,581,584],{"class":344,"line":345},[342,579,580],{"class":348},"pi",[342,582,583],{"class":352}," install",[342,585,586],{"class":352}," npm:@agntn\u002Fchains\n",[207,588,589,590,593,594,597,598,601,602,605,606,608],{},"Both extensions are declared in ",[211,591,592],{},"package.json",". They add ",[211,595,596],{},"details"," next to the text, the structured object the harness renders: the metadata for a lookup, ",[211,599,600],{},"{ chain, address, valid, reason }"," for an address check and ",[211,603,604],{},"{ chain, txid, valid, reason }"," for a txid, the two key arrays for identify. MCP drops ",[211,607,596],{}," and keeps the text.",[207,610,611,612,615,616,619],{},"The extensions prefer the built executors in ",[211,613,614],{},"dist\u002F"," and fall back to source when it's missing. The source runs as it is, so a fresh checkout answers before the first ",[211,617,618],{},"pnpm build"," too.",[621,622,623],"note",{},"An address in a prompt is data. Validating it tells you whether it fits a format, not what to do with it. And a match on fourteen EVM chains is fourteen possibilities, not a chain name.",[625,626,627],"style",{},"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 .shU9J, html code.shiki .shU9J{--shiki-light:var(--shiki-token-string);--shiki-default:var(--shiki-token-string);--shiki-dark:var(--shiki-token-string)}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);}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)}",{"title":338,"searchDepth":356,"depth":356,"links":629},[630,631,632,633,634],{"id":204,"depth":356,"text":205},{"id":330,"depth":356,"text":331},{"id":492,"depth":356,"text":493},{"id":523,"depth":356,"text":524},{"id":569,"depth":356,"text":570},"The same five tools over MCP and the Pi and OMP extensions. What the text carries and what sets isError. What a model can't hand the process.","md",null,{"icon":639},"i-lucide-bot",true,{"title":32,"description":635},"dbDwmGy6cY8lvZbQVcCDFYNXdhGn2cMXbqtqY5y88y0",[644,646],{"title":28,"path":29,"stem":30,"description":645,"children":-1},"The chains command. Six subcommands and what each prints. Which ones exit 1.",{"title":36,"path":37,"stem":38,"description":647,"children":-1},"Extend the abstract Chain with a key and a validator and register the class. From then on the registry treats it like a built-in.",1791199047104]