[{"data":1,"prerenderedAt":542},["ShallowReactive",2],{"navigation_docs":3,"-chains-waves":204,"-chains-waves-surround":539},[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":203},"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,195,199],{"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",{"title":196,"path":197,"stem":198},"NEAR Protocol","\u002Fchains\u002Fnear","2.chains\u002F37.near",{"title":200,"path":201,"stem":202},"Waves","\u002Fchains\u002Fwaves","2.chains\u002F38.waves","i-lucide-link",{"id":205,"title":200,"body":206,"description":532,"extension":533,"links":534,"meta":535,"navigation":301,"path":201,"seo":537,"stem":202,"__hash__":538},"docs\u002F2.chains\u002F38.waves.md",{"type":207,"value":208,"toc":524},"minimark",[209,213,218,222,243,254,257,264,367,381,384,388,402,429,439,446,450,453,456,462,466,480,484,487,493,504,508,520],[210,211],"chain-facts",{"chain":212},"waves",[214,215,217],"h2",{"id":216},"waves-address-format","Waves address format",[219,220,221],"p",{},"What's under a Waves address? Base58 hides 26 bytes, using the Bitcoin alphabet.",[223,224,225,234,237,240],"ul",{},[226,227,228,229,233],"li",{},"One entity type byte, set to ",[230,231,232],"code",{},"1",".",[226,235,236],{},"One chain ID byte.",[226,238,239],{},"A 20-byte account public key hash.",[226,241,242],{},"A 4-byte checksum.",[219,244,245,246,253],{},"The public key hash is the first 20 bytes of Keccak256(Blake2b256(publicKey)). Waves uses original Keccak-256, not FIPS SHA3-256. The ",[247,248,252],"a",{"href":249,"rel":250},"https:\u002F\u002Fdocs.waves.tech\u002Fen\u002Fblockchain\u002Fbinary-format\u002Faddress-binary-format",[251],"nofollow","address binary format"," documents the layout.",[219,255,256],{},"The check decodes base58, with a limit of 36 characters. It checks the byte count, entity type, mainnet byte and checksum. It reports every broken rule together. A length window would be a fragile substitute.",[219,258,259,260,263],{},"It doesn't check whether the account exists. The address contains a public key hash, not the public key. Transaction recipients can also use aliases such as ",[230,261,262],{},"alias:W:name",". Those aren't addresses and the check refuses them.",[265,266,271],"pre",{"className":267,"code":268,"language":269,"meta":270,"style":270},"language-ts shiki shiki-themes chains chains chains","import { getChain } from \"@agntn\u002Fchains\";\n\nconst chain = getChain(\"waves\");\nchain.assertAddress(\"3PPbMwqLtwBGcJrTA5whqJfY95GqnNnFMDX\"); \u002F\u002F returned unchanged\nchain.caip2; \u002F\u002F \"waves:087\"\nchain.bip44; \u002F\u002F 5741564\n","ts","",[230,272,273,296,303,328,349,358],{"__ignoreMap":270},[274,275,278,282,286,289,293],"span",{"class":276,"line":277},"line",1,[274,279,281],{"class":280},"skH_V","import",[274,283,285],{"class":284},"s38Sx"," { getChain } ",[274,287,288],{"class":280},"from",[274,290,292],{"class":291},"shU9J"," \"@agntn\u002Fchains\"",[274,294,295],{"class":284},";\n",[274,297,299],{"class":276,"line":298},2,[274,300,302],{"emptyLinePlaceholder":301},true,"\n",[274,304,306,309,312,315,319,322,325],{"class":276,"line":305},3,[274,307,308],{"class":280},"const",[274,310,311],{"class":284}," chain ",[274,313,314],{"class":280},"=",[274,316,318],{"class":317},"sK71F"," getChain",[274,320,321],{"class":284},"(",[274,323,324],{"class":291},"\"waves\"",[274,326,327],{"class":284},");\n",[274,329,331,334,337,339,342,345],{"class":276,"line":330},4,[274,332,333],{"class":284},"chain.",[274,335,336],{"class":317},"assertAddress",[274,338,321],{"class":284},[274,340,341],{"class":291},"\"3PPbMwqLtwBGcJrTA5whqJfY95GqnNnFMDX\"",[274,343,344],{"class":284},"); ",[274,346,348],{"class":347},"scIB-","\u002F\u002F returned unchanged\n",[274,350,352,355],{"class":276,"line":351},5,[274,353,354],{"class":284},"chain.caip2; ",[274,356,357],{"class":347},"\u002F\u002F \"waves:087\"\n",[274,359,361,364],{"class":276,"line":360},6,[274,362,363],{"class":284},"chain.bip44; ",[274,365,366],{"class":347},"\u002F\u002F 5741564\n",[219,368,369,370,373,374,377,378,233],{},"That address is a documented Waves test vector. Its public key is ",[230,371,372],{},"HBqhfdFASRQ5eBBpu2y6c6KKi1az6bMx8v1JxX4iW1Q8",". ",[230,375,376],{},"decodeAddress"," returns ",[230,379,380],{},"{ kind: \"account\" }",[219,382,383],{},"Waves has 8 decimals. One WAVES is 100,000,000 wavelets.",[214,385,387],{"id":386},"why-mainnet-addresses-start-with-3p","Why mainnet addresses start with 3P",[219,389,390,391,394,395,398,399,233],{},"Every mainnet address carries byte ",[230,392,393],{},"87",", ASCII ",[230,396,397],{},"W",". That makes every mainnet address start with ",[230,400,401],{},"3P",[219,403,404,405,394,408,411,412,415,416,419,420,394,423,411,426,428],{},"Testnet uses byte ",[230,406,407],{},"84",[230,409,410],{},"T",". Its addresses start with ",[230,413,414],{},"3M"," or ",[230,417,418],{},"3N",". Stagenet uses byte ",[230,421,422],{},"83",[230,424,425],{},"S",[230,427,414],{},". Both networks are refused.",[219,430,431,432,435,436,233],{},"For example, ",[230,433,434],{},"3N9Q2sdkkhAnbR4XCveuRaSMLiVtvebZ3wp"," fails with ",[230,437,438],{},"chain byte \"T\", Waves testnet, where mainnet writes \"W\"",[219,440,441,442,445],{},"The CAIP-2 ID is ",[230,443,444],{},"waves:087",". The namespace writes the chain byte as a padded signed integer.",[214,447,449],{"id":448},"waves-checksum-and-base58check","Waves checksum and Base58Check",[219,451,452],{},"The checksum covers the first 22 bytes. It's the first four bytes of Keccak256(Blake2b256(first 22 bytes)). Two different hashes for four bytes. Fair enough.",[219,454,455],{},"This isn't Base58Check. Base58Check runs one hash twice. Waves stacks two different hashes once. The Waves class computes its checksum itself.",[219,457,458,459,233],{},"Change the last character and the checksum fails. The reason says ",[230,460,461],{},"the checksum does not hold, so a character is wrong",[214,463,465],{"id":464},"identifying-a-waves-address","Identifying a Waves address",[219,467,468,469,472,473,476,477,479],{},"What about ",[230,470,471],{},"3PBitcoinAVGJvpSe6jevepPbT3M8SoMZjb","? It's a real Waves mainnet sender. ",[230,474,475],{},"identify"," returns Waves alone, with the key ",[230,478,212],{},". The Bitcoin validator refuses it. The name inside the address doesn't get a vote.",[214,481,483],{"id":482},"waves-transaction-ids","Waves transaction IDs",[219,485,486],{},"Transaction IDs are base58 decoded to 32 or 64 bytes. Other widths fail.",[219,488,489,490,233],{},"A 32-byte ID is a hash, such as ",[230,491,492],{},"kD9ahh6vk5AQKQnnAGW797Qxwadidzf6Jty6r4imDQX",[219,494,495,496,499,500,503],{},"Why accept 64 bytes? Genesis and payment transactions, the oldest kinds Waves has, still use their signatures as IDs. The first genesis transaction is ",[230,497,498],{},"2DVtfgXjpMeFf2PQCqvwxAiaGbiDsxDjSdNQkc5JQ74eWxjWFYgwvqzC4dn7iB1AhuM32WxEiVi1SGijsBtYQwn8",". The node's ",[230,501,502],{},"TransactionId"," path reads exactly these two widths.",[214,505,507],{"id":506},"waves-chain-spellings","Waves chain spellings",[219,509,510,511,415,513,515,516,519],{},"Use ",[230,512,212],{},[230,514,200],{}," with ",[230,517,518],{},"getChain",". Case doesn't matter. There are no other aliases.",[521,522,523],"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":270,"searchDepth":298,"depth":298,"links":525},[526,527,528,529,530,531],{"id":216,"depth":298,"text":217},{"id":386,"depth":298,"text":387},{"id":448,"depth":298,"text":449},{"id":464,"depth":298,"text":465},{"id":482,"depth":298,"text":483},{"id":506,"depth":298,"text":507},"Waves addresses decode to 26 bytes. The validator checks the mainnet byte and checksum.","md",null,{"icon":536},"i-token-waves",{"title":200,"description":532},"Tp6vGorD_1m60ShEhHlGBX4S3HCUjtlPmwNpA_fYAFk",[540,534],{"title":196,"path":197,"stem":198,"description":541,"children":-1},"NEAR account IDs have a loose grammar. The validator accepts it all, while identify avoids claiming Bitcoin addresses.",1794310634190]