[{"data":1,"prerenderedAt":449},["ShallowReactive",2],{"navigation_docs":3,"-chains-ton":196,"-chains-ton-surround":444},[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":144,"body":198,"description":437,"extension":438,"links":439,"meta":440,"navigation":321,"path":145,"seo":442,"stem":146,"__hash__":443},"docs\u002F2.chains\u002F24.ton.md",{"type":199,"value":200,"toc":433},"minimark",[201,205,210,262,269,412,416,429],[202,203],"chain-facts",{"chain":204},"ton",[206,207,209],"h2",{"id":208},"address-format","Address format",[211,212,213,214,218,219,222,223,218,226,229,230,233,234,237,238,241,242,245,246,249,250,253,254,257,258,261],"p",{},"The TEP-2 user-friendly form: 36 bytes in unpadded base64, so exactly 48 characters. Wallets emit the URL-safe alphabet with ",[215,216,217],"code",{},"-"," and ",[215,220,221],{},"_",", the standard one with ",[215,224,225],{},"+",[215,227,228],{},"\u002F"," is in circulation too, and both pass. The first byte is the tag, ",[215,231,232],{},"0x11"," for bounceable (",[215,235,236],{},"EQ…",") or ",[215,239,240],{},"0x51"," for non-bounceable (",[215,243,244],{},"UQ…","). A set testnet flag is rejected the way Bitcoin's testnet versions are. The second byte is the workchain, ",[215,247,248],{},"0x00"," for the basechain or ",[215,251,252],{},"0xff"," for the masterchain, the only two that exist. Both live inside one network, so neither is the CAIP-2 reference: that's the network's ",[215,255,256],{},"global_id",", ",[215,259,260],{},"-239"," on mainnet, the id TON Connect and WalletConnect pass around.",[211,263,264,265,268],{},"The last two bytes are the CRC16-XModem of the 34 before them, and they're verified: one character off fails, which is what TEP-2 puts the checksum there for. The raw ",[215,266,267],{},"workchain:hex"," form isn't accepted, because wallets and explorers exchange the friendly one.",[270,271,276],"pre",{"className":272,"code":273,"language":274,"meta":275,"style":275},"language-ts shiki shiki-themes github-light github-light poimandres","import { getChain } from \"@agntn\u002Fchains\";\n\nconst chain = getChain(\"ton\");\nchain.assertAddress(\"EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs\"); \u002F\u002F returned unchanged\nchain.type; \u002F\u002F \"ton\"\nchain.caip2; \u002F\u002F \"ton:-239\"\n","ts","",[215,277,278,316,323,352,381,397],{"__ignoreMap":275},[279,280,283,287,291,295,298,302,306,310,313],"span",{"class":281,"line":282},"line",1,[279,284,286],{"class":285},"sP0CR","import",[279,288,290],{"class":289},"sKlNE"," {",[279,292,294],{"class":293},"snHMy"," getChain",[279,296,297],{"class":289}," }",[279,299,301],{"class":300},"stCPd"," from",[279,303,305],{"class":304},"scVjq"," \"",[279,307,309],{"class":308},"sQ7BG","@agntn\u002Fchains",[279,311,312],{"class":304},"\"",[279,314,315],{"class":289},";\n",[279,317,319],{"class":281,"line":318},2,[279,320,322],{"emptyLinePlaceholder":321},true,"\n",[279,324,326,330,334,337,340,343,345,347,349],{"class":281,"line":325},3,[279,327,329],{"class":328},"s1TYA","const",[279,331,333],{"class":332},"saoiD"," chain",[279,335,336],{"class":328}," =",[279,338,294],{"class":339},"sULi6",[279,341,342],{"class":289},"(",[279,344,312],{"class":304},[279,346,204],{"class":308},[279,348,312],{"class":304},[279,350,351],{"class":289},");\n",[279,353,355,359,362,365,367,369,372,374,377],{"class":281,"line":354},4,[279,356,358],{"class":357},"spVlQ","chain",[279,360,361],{"class":289},".",[279,363,364],{"class":339},"assertAddress",[279,366,342],{"class":289},[279,368,312],{"class":304},[279,370,371],{"class":308},"EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",[279,373,312],{"class":304},[279,375,376],{"class":289},"); ",[279,378,380],{"class":379},"sjhu3","\u002F\u002F returned unchanged\n",[279,382,384,386,388,391,394],{"class":281,"line":383},5,[279,385,358],{"class":357},[279,387,361],{"class":289},[279,389,390],{"class":357},"type",[279,392,393],{"class":289},"; ",[279,395,396],{"class":379},"\u002F\u002F \"ton\"\n",[279,398,400,402,404,407,409],{"class":281,"line":399},6,[279,401,358],{"class":357},[279,403,361],{"class":289},[279,405,406],{"class":357},"caip2",[279,408,393],{"class":289},[279,410,411],{"class":379},"\u002F\u002F \"ton:-239\"\n",[206,413,415],{"id":414},"spellings","Spellings",[211,417,418,257,420,422,423,425,426,361],{},[215,419,204],{},[215,421,144],{},". The key is ",[215,424,204],{},", the rest resolve through ",[215,427,428],{},"getChain",[430,431,432],"style",{},"html pre.shiki code .sP0CR, html code.shiki .sP0CR{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#5DE4C7}html pre.shiki code .sKlNE, html code.shiki .sKlNE{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#A6ACCD}html pre.shiki code .snHMy, html code.shiki .snHMy{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#ADD7FF}html pre.shiki code .stCPd, html code.shiki .stCPd{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#A6ACCD}html pre.shiki code .scVjq, html code.shiki .scVjq{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#A6ACCD}html pre.shiki code .sQ7BG, html code.shiki .sQ7BG{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#5DE4C7}html pre.shiki code .s1TYA, html code.shiki .s1TYA{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#91B4D5}html pre.shiki code .saoiD, html code.shiki .saoiD{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#E4F0FB}html pre.shiki code .sULi6, html code.shiki .sULi6{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#E4F0FBD0}html pre.shiki code .spVlQ, html code.shiki .spVlQ{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E4F0FB}html pre.shiki code .sjhu3, html code.shiki .sjhu3{--shiki-light:#6A737D;--shiki-light-font-style:inherit;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#767C9DB0;--shiki-dark-font-style:italic}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":275,"searchDepth":318,"depth":318,"links":434},[435,436],{"id":208,"depth":318,"text":209},{"id":414,"depth":318,"text":415},"The TEP-2 user-friendly form in either base64 alphabet: 36 bytes, a bounceable or non-bounceable tag, one of the two workchains that exist, and the CRC16 verified.","md",null,{"icon":441},"i-token-ton",{"title":144,"description":437},"3dmwVyC1GTfQEwpnylmPPA1x5vZaIf_x_zJkHVrehEU",[445,447],{"title":140,"path":141,"stem":142,"description":446,"children":-1},"The Move format, same as Aptos: 64 hex digits behind 0x or the single digit short form. Coin type 784, sui:mainnet.",{"title":148,"path":149,"stem":150,"description":448,"children":-1},"Base58Check under version 0x41, 25 bytes. Decoding is what keeps TRON and Bitcoin's legacy form apart, they are the same width.",1790447833279]