[{"data":1,"prerenderedAt":710},["ShallowReactive",2],{"navigation_docs":3,"-blockchains-dogecoin":108,"-blockchains-dogecoin-surround":705},[4,32],{"title":5,"path":6,"stem":7,"children":8,"icon":31},"Guide","\u002Fguide","1.guide\u002F1.index",[9,11,15,19,23,27],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"Working with Keys","\u002Fguide\u002Fkeys","1.guide\u002F2.keys",{"title":16,"path":17,"stem":18},"Working with Addresses","\u002Fguide\u002Faddresses","1.guide\u002F3.addresses",{"title":20,"path":21,"stem":22},"Generating Wallets","\u002Fguide\u002Fwallets","1.guide\u002F4.wallets",{"title":24,"path":25,"stem":26},"Working with EVM Chains","\u002Fguide\u002Fevm","1.guide\u002F5.evm",{"title":28,"path":29,"stem":30},"Creating Custom Blockchains","\u002Fguide\u002Fcustom","1.guide\u002F6.custom","i-lucide-book-open",{"title":33,"path":34,"stem":35,"children":36,"icon":107},"Blockchains","\u002Fblockchains","2.blockchains\u002F0.index",[37,39,43,47,51,55,59,63,67,71,75,79,83,87,91,95,99,103],{"title":38,"path":34,"stem":35},"Overview",{"title":40,"path":41,"stem":42},"Aptos","\u002Fblockchains\u002Faptos","2.blockchains\u002Faptos",{"title":44,"path":45,"stem":46},"Base","\u002Fblockchains\u002Fbase","2.blockchains\u002Fbase",{"title":48,"path":49,"stem":50},"Bitcoin","\u002Fblockchains\u002Fbitcoin","2.blockchains\u002Fbitcoin",{"title":52,"path":53,"stem":54},"Bitcoin Cash","\u002Fblockchains\u002Fbitcoincash","2.blockchains\u002Fbitcoincash",{"title":56,"path":57,"stem":58},"Bitcoin Gold","\u002Fblockchains\u002Fbitcoingold","2.blockchains\u002Fbitcoingold",{"title":60,"path":61,"stem":62},"Bitcoin SV","\u002Fblockchains\u002Fbitcoinsv","2.blockchains\u002Fbitcoinsv",{"title":64,"path":65,"stem":66},"Cardano","\u002Fblockchains\u002Fcardano","2.blockchains\u002Fcardano",{"title":68,"path":69,"stem":70},"Dash","\u002Fblockchains\u002Fdash","2.blockchains\u002Fdash",{"title":72,"path":73,"stem":74},"Decred","\u002Fblockchains\u002Fdecred","2.blockchains\u002Fdecred",{"title":76,"path":77,"stem":78},"Dogecoin","\u002Fblockchains\u002Fdogecoin","2.blockchains\u002Fdogecoin",{"title":80,"path":81,"stem":82},"Ethereum","\u002Fblockchains\u002Fethereum","2.blockchains\u002Fethereum",{"title":84,"path":85,"stem":86},"Litecoin","\u002Fblockchains\u002Flitecoin","2.blockchains\u002Flitecoin",{"title":88,"path":89,"stem":90},"Solana","\u002Fblockchains\u002Fsolana","2.blockchains\u002Fsolana",{"title":92,"path":93,"stem":94},"Stellar","\u002Fblockchains\u002Fstellar","2.blockchains\u002Fstellar",{"title":96,"path":97,"stem":98},"Sui","\u002Fblockchains\u002Fsui","2.blockchains\u002Fsui",{"title":100,"path":101,"stem":102},"TRON","\u002Fblockchains\u002Ftron","2.blockchains\u002Ftron",{"title":104,"path":105,"stem":106},"Zcash","\u002Fblockchains\u002Fzcash","2.blockchains\u002Fzcash","i-lucide-boxes",{"id":109,"title":76,"body":110,"description":698,"extension":699,"links":700,"meta":701,"navigation":184,"path":77,"seo":703,"stem":78,"__hash__":704},"docs\u002F2.blockchains\u002Fdogecoin.md",{"type":111,"value":112,"toc":690},"minimark",[113,120,125,262,266,270,280,349,440,462,466,538,548,552,559,626,639,653,657,668,672,686],[114,115],"chain-facts",{"coin":116,"curve":117,"driver":118,"formats":119},"3","secp256k1","dogecoin","legacy P2PKH",[121,122,124],"h2",{"id":123},"load-it","Load it",[126,127,132],"pre",{"className":128,"code":129,"language":130,"meta":131,"style":131},"language-js shiki shiki-themes github-light github-light poimandres","import { useBlockchain, blockchains } from \"@agntn\u002Fkeys\";\n\nconst dogeChain = useBlockchain(await blockchains.dogecoin()());\nconst testnet = useBlockchain(await blockchains.dogecoin({ network: \"testnet\" })());\n","js","",[133,134,135,179,186,221],"code",{"__ignoreMap":131},[136,137,140,144,148,152,155,158,161,165,169,173,176],"span",{"class":138,"line":139},"line",1,[136,141,143],{"class":142},"sP0CR","import",[136,145,147],{"class":146},"sKlNE"," {",[136,149,151],{"class":150},"snHMy"," useBlockchain",[136,153,154],{"class":146},",",[136,156,157],{"class":150}," blockchains",[136,159,160],{"class":146}," }",[136,162,164],{"class":163},"stCPd"," from",[136,166,168],{"class":167},"scVjq"," \"",[136,170,172],{"class":171},"sQ7BG","@agntn\u002Fkeys",[136,174,175],{"class":167},"\"",[136,177,178],{"class":146},";\n",[136,180,182],{"class":138,"line":181},2,[136,183,185],{"emptyLinePlaceholder":184},true,"\n",[136,187,189,193,197,200,203,206,210,213,216,218],{"class":138,"line":188},3,[136,190,192],{"class":191},"s1TYA","const",[136,194,196],{"class":195},"saoiD"," dogeChain",[136,198,199],{"class":191}," =",[136,201,151],{"class":202},"sULi6",[136,204,205],{"class":146},"(",[136,207,209],{"class":208},"sZW6a","await",[136,211,157],{"class":212},"spVlQ",[136,214,215],{"class":146},".",[136,217,118],{"class":202},[136,219,220],{"class":146},"()());\n",[136,222,224,226,229,231,233,235,237,239,241,243,246,249,252,254,257,259],{"class":138,"line":223},4,[136,225,192],{"class":191},[136,227,228],{"class":195}," testnet",[136,230,199],{"class":191},[136,232,151],{"class":202},[136,234,205],{"class":146},[136,236,209],{"class":208},[136,238,157],{"class":212},[136,240,215],{"class":146},[136,242,118],{"class":202},[136,244,245],{"class":146},"({",[136,247,248],{"class":150}," network",[136,250,251],{"class":146},":",[136,253,168],{"class":167},[136,255,256],{"class":171},"testnet",[136,258,175],{"class":167},[136,260,261],{"class":146}," })());\n",[263,264,265],"p",{},"Mainnet and testnet only, anything else throws in the constructor. Regtest in Dogecoin Core borrows Bitcoin's testnet bytes, so it's left out.",[121,267,269],{"id":268},"the-address","The address",[263,271,272,273,276,277,215],{},"Dogecoin grew out of Litecoin's code, which grew out of Bitcoin's, and the address never moved far from home. ",[133,274,275],{},"RIPEMD160(SHA256(pubkey))",", a version byte in front, base58check. The version bytes come from Dogecoin Core v1.14.9 ",[133,278,279],{},"chainparams.cpp",[281,282,283,299],"table",{},[284,285,286],"thead",{},[287,288,289,293,296],"tr",{},[290,291,292],"th",{},"Network",[290,294,295],{},"P2PKH",[290,297,298],{},"P2SH",[300,301,302,329],"tbody",{},[287,303,304,308,317],{},[305,306,307],"td",{},"mainnet",[305,309,310,313,314],{},[133,311,312],{},"0x1e",", starts with ",[133,315,316],{},"D",[305,318,319,313,322,325,326],{},[133,320,321],{},"0x16",[133,323,324],{},"9"," or ",[133,327,328],{},"A",[287,330,331,333,341],{},[305,332,256],{},[305,334,335,313,338],{},[133,336,337],{},"0x71",[133,339,340],{},"n",[305,342,343,313,346],{},[133,344,345],{},"0xc4",[133,347,348],{},"2",[126,350,352],{"className":128,"code":351,"language":130,"meta":131,"style":131},"const privateKey = \"0000000000000000000000000000000000000000000000000000000000000001\";\nconst publicKey = dogeChain.getKeyPublic(privateKey);\n\ndogeChain.getAddress(publicKey); \u002F\u002F DFpN6QqFfUm3gKNaxN6tNcab1FArL9cZLE\ntestnet.getAddress(publicKey); \u002F\u002F nesRpRaAbTDmZHwmzBkLd2AtF7Z9L9z5S2\n",[133,353,354,372,396,400,422],{"__ignoreMap":131},[136,355,356,358,361,363,365,368,370],{"class":138,"line":139},[136,357,192],{"class":191},[136,359,360],{"class":195}," privateKey",[136,362,199],{"class":191},[136,364,168],{"class":167},[136,366,367],{"class":171},"0000000000000000000000000000000000000000000000000000000000000001",[136,369,175],{"class":167},[136,371,178],{"class":146},[136,373,374,376,379,381,383,385,388,390,393],{"class":138,"line":181},[136,375,192],{"class":191},[136,377,378],{"class":195}," publicKey",[136,380,199],{"class":191},[136,382,196],{"class":212},[136,384,215],{"class":146},[136,386,387],{"class":202},"getKeyPublic",[136,389,205],{"class":146},[136,391,392],{"class":212},"privateKey",[136,394,395],{"class":146},");\n",[136,397,398],{"class":138,"line":188},[136,399,185],{"emptyLinePlaceholder":184},[136,401,402,405,407,410,412,415,418],{"class":138,"line":223},[136,403,404],{"class":212},"dogeChain",[136,406,215],{"class":146},[136,408,409],{"class":202},"getAddress",[136,411,205],{"class":146},[136,413,414],{"class":212},"publicKey",[136,416,417],{"class":146},"); ",[136,419,421],{"class":420},"sjhu3","\u002F\u002F DFpN6QqFfUm3gKNaxN6tNcab1FArL9cZLE\n",[136,423,425,427,429,431,433,435,437],{"class":138,"line":424},5,[136,426,256],{"class":212},[136,428,215],{"class":146},[136,430,409],{"class":202},[136,432,205],{"class":146},[136,434,414],{"class":212},[136,436,417],{"class":146},[136,438,439],{"class":420},"\u002F\u002F nesRpRaAbTDmZHwmzBkLd2AtF7Z9L9z5S2\n",[263,441,442,445,446,449,450,453,454,457,458,461],{},[133,443,444],{},"legacy"," is the only type it writes. Dogecoin never activated SegWit, so there's no bech32, and the library's ",[133,447,448],{},"p2sh"," type is P2SH wrapping a P2WPKH program. On a chain without SegWit that script is spendable by anyone who sees it. So ",[133,451,452],{},"\"p2sh\"",", ",[133,455,456],{},"\"segwit\""," and the rest throw a ",[133,459,460],{},"RangeError"," instead of handing you that address.",[121,463,465],{"id":464},"validation","Validation",[126,467,469],{"className":128,"code":468,"language":130,"meta":131,"style":131},"dogeChain.validateAddress(\"DFpN6QqFfUm3gKNaxN6tNcab1FArL9cZLE\"); \u002F\u002F true\ndogeChain.validateAddress(\"A7HRQk3GFCW2QasvdZxXuYj8kkQK5QrYLs\"); \u002F\u002F true, P2SH\ndogeChain.validateAddress(\"1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH\"); \u002F\u002F false, Bitcoin's version byte\n",[133,470,471,494,516],{"__ignoreMap":131},[136,472,473,475,477,480,482,484,487,489,491],{"class":138,"line":139},[136,474,404],{"class":212},[136,476,215],{"class":146},[136,478,479],{"class":202},"validateAddress",[136,481,205],{"class":146},[136,483,175],{"class":167},[136,485,486],{"class":171},"DFpN6QqFfUm3gKNaxN6tNcab1FArL9cZLE",[136,488,175],{"class":167},[136,490,417],{"class":146},[136,492,493],{"class":420},"\u002F\u002F true\n",[136,495,496,498,500,502,504,506,509,511,513],{"class":138,"line":181},[136,497,404],{"class":212},[136,499,215],{"class":146},[136,501,479],{"class":202},[136,503,205],{"class":146},[136,505,175],{"class":167},[136,507,508],{"class":171},"A7HRQk3GFCW2QasvdZxXuYj8kkQK5QrYLs",[136,510,175],{"class":167},[136,512,417],{"class":146},[136,514,515],{"class":420},"\u002F\u002F true, P2SH\n",[136,517,518,520,522,524,526,528,531,533,535],{"class":138,"line":188},[136,519,404],{"class":212},[136,521,215],{"class":146},[136,523,479],{"class":202},[136,525,205],{"class":146},[136,527,175],{"class":167},[136,529,530],{"class":171},"1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH",[136,532,175],{"class":167},[136,534,417],{"class":146},[136,536,537],{"class":420},"\u002F\u002F false, Bitcoin's version byte\n",[263,539,540,541,544,545,215],{},"P2PKH and P2SH under the driver's own version bytes. P2SH passes because multisig wallets really pay to it, the library just never writes one. A testnet address fails on mainnet and the other way round. The vectors in the tests come from the node's own ",[133,542,543],{},"key_tests.cpp"," and ",[133,546,547],{},"base58_keys_valid.json",[121,549,551],{"id":550},"mnemonics","Mnemonics",[263,553,554,555,558],{},"BIP32 on ",[133,556,557],{},"m\u002F44'\u002F3'\u002Faccount'\u002Fchange\u002Findex",", coin type 3 from SLIP-0044.",[126,560,562],{"className":128,"code":561,"language":130,"meta":131,"style":131},"const mnemonic =\n  \"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about\";\n\ndogeChain.deriveHDWallet(mnemonic, \"m\u002F44'\u002F3'\u002F0'\u002F0\u002F0\").address;\n\u002F\u002F DBus3bamQjgJULBJtYXpEzDWQRwF5iwxgC, the same address Ledger Live derives\n",[133,563,564,574,586,590,621],{"__ignoreMap":131},[136,565,566,568,571],{"class":138,"line":139},[136,567,192],{"class":191},[136,569,570],{"class":195}," mnemonic",[136,572,573],{"class":191}," =\n",[136,575,576,579,582,584],{"class":138,"line":181},[136,577,578],{"class":167},"  \"",[136,580,581],{"class":171},"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",[136,583,175],{"class":167},[136,585,178],{"class":146},[136,587,588],{"class":138,"line":188},[136,589,185],{"emptyLinePlaceholder":184},[136,591,592,594,596,599,601,604,606,608,611,613,616,619],{"class":138,"line":223},[136,593,404],{"class":212},[136,595,215],{"class":146},[136,597,598],{"class":202},"deriveHDWallet",[136,600,205],{"class":146},[136,602,603],{"class":212},"mnemonic",[136,605,453],{"class":146},[136,607,175],{"class":167},[136,609,610],{"class":171},"m\u002F44'\u002F3'\u002F0'\u002F0\u002F0",[136,612,175],{"class":167},[136,614,615],{"class":146},").",[136,617,618],{"class":212},"address",[136,620,178],{"class":146},[136,622,623],{"class":138,"line":424},[136,624,625],{"class":420},"\u002F\u002F DBus3bamQjgJULBJtYXpEzDWQRwF5iwxgC, the same address Ledger Live derives\n",[263,627,628,629,632,633,635,636,638],{},"The purpose level doesn't pick a format, there's only one. ",[133,630,631],{},"m\u002F84'"," still gives you a ",[133,634,316],{}," address, and an explicit ",[133,637,452],{}," still throws.",[263,640,641,642,645,646,544,649,652],{},"WIF isn't here yet. Dogecoin's prefix is ",[133,643,644],{},"0x9e",", and ",[133,647,648],{},"encodeWIF",[133,650,651],{},"decodeWIF"," speak only Bitcoin, Litecoin and Decred, so a key from a Dogecoin wallet export goes in as hex.",[121,654,656],{"id":655},"signing","Signing",[263,658,659,660,663,664,667],{},"Dogecoin Core signs under ",[133,661,662],{},"\"\\x19Dogecoin Signed Message:\\n\"",", then does what Bitcoin does: compact size lengths, double SHA-256, secp256k1. So a Bitcoin signature doesn't verify here, and the other way round. The Dogecoin vectors in bitcoinjs-message match byte for byte once you drop their header byte. ",[133,665,666],{},"{ recovered: true }"," throws, same as on Bitcoin.",[121,669,671],{"id":670},"where-it-lives","Where it lives",[263,673,674,677,678,681,682,685],{},[133,675,676],{},"src\u002Fblockchains\u002Fdogecoin.ts"," has the version bytes, the preamble and the address rules. It extends ",[133,679,680],{},"AbstractBitcoinMessageBlockchain"," in ",[133,683,684],{},"src\u002Futils\u002Fbitcoin.ts",", the part of the Bitcoin base with keys and signed messages and none of the address formats.",[687,688,689],"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 .sZW6a, html code.shiki .sZW6a{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#5DE4C7C0}html pre.shiki code .spVlQ, html code.shiki .spVlQ{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E4F0FB}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 .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}",{"title":131,"searchDepth":181,"depth":181,"links":691},[692,693,694,695,696,697],{"id":123,"depth":181,"text":124},{"id":268,"depth":181,"text":269},{"id":464,"depth":181,"text":465},{"id":550,"depth":181,"text":551},{"id":655,"depth":181,"text":656},{"id":670,"depth":181,"text":671},"Bitcoin's P2PKH recipe behind a D, its own message preamble, and one address type, because the chain never got SegWit.","md",null,{"icon":702},"i-token-doge",{"title":76,"description":698},"DJ6esi1RsUOigTq0FHIK_7NbD6GG24fxRdd8_vs67E0",[706,708],{"title":72,"path":73,"stem":74,"description":707,"children":-1},"secp256k1 with BLAKE-256 in every hash. Addresses start with Ds. No mnemonic derivation and that's on purpose.",{"title":80,"path":81,"stem":82,"description":709,"children":-1},"secp256k1 with EIP-55 checksummed addresses and personal_sign message signatures.",1790282411352]