[{"data":1,"prerenderedAt":589},["ShallowReactive",2],{"navigation_docs":3,"-providers-blockbook":136,"-providers-blockbook-surround":584},[4,56,132],{"title":5,"path":6,"stem":7,"children":8,"icon":55},"Guide","\u002Fguide","1.guide\u002F01.index",[9,11,15,19,23,27,31,35,39,43,47,51],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"CLI","\u002Fguide\u002Fcli","1.guide\u002F02.cli",{"title":16,"path":17,"stem":18},"Provider selection","\u002Fguide\u002Fselection","1.guide\u002F03.selection",{"title":20,"path":21,"stem":22},"Balances","\u002Fguide\u002Fbalances","1.guide\u002F04.balances",{"title":24,"path":25,"stem":26},"Transactions","\u002Fguide\u002Ftransactions","1.guide\u002F05.transactions",{"title":28,"path":29,"stem":30},"Tokens","\u002Fguide\u002Ftokens","1.guide\u002F06.tokens",{"title":32,"path":33,"stem":34},"Contracts","\u002Fguide\u002Fcontracts","1.guide\u002F07.contracts",{"title":36,"path":37,"stem":38},"Gas and blocks","\u002Fguide\u002Fgas-and-blocks","1.guide\u002F08.gas-and-blocks",{"title":40,"path":41,"stem":42},"Errors","\u002Fguide\u002Ferrors","1.guide\u002F09.errors",{"title":44,"path":45,"stem":46},"Agents","\u002Fguide\u002Fagents","1.guide\u002F10.agents",{"title":48,"path":49,"stem":50},"Custom providers","\u002Fguide\u002Fcustom","1.guide\u002F11.custom",{"title":52,"path":53,"stem":54},"Explorer","\u002Fguide\u002Fexplorer","1.guide\u002F12.explorer","i-lucide-book-open",{"title":57,"path":58,"stem":59,"children":60,"icon":131},"Providers","\u002Fproviders","2.providers\u002F0.index",[61,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127],{"title":62,"path":58,"stem":59},"Overview",{"title":64,"path":65,"stem":66},"Etherscan","\u002Fproviders\u002Fetherscan","2.providers\u002F01.etherscan",{"title":68,"path":69,"stem":70},"Blockscout","\u002Fproviders\u002Fblockscout","2.providers\u002F02.blockscout",{"title":72,"path":73,"stem":74},"Blockchair","\u002Fproviders\u002Fblockchair","2.providers\u002F03.blockchair",{"title":76,"path":77,"stem":78},"Mempool","\u002Fproviders\u002Fmempool","2.providers\u002F04.mempool",{"title":80,"path":81,"stem":82},"Blockstream","\u002Fproviders\u002Fblockstream","2.providers\u002F05.blockstream",{"title":84,"path":85,"stem":86},"Solscan","\u002Fproviders\u002Fsolscan","2.providers\u002F06.solscan",{"title":88,"path":89,"stem":90},"Helius","\u002Fproviders\u002Fhelius","2.providers\u002F07.helius",{"title":92,"path":93,"stem":94},"TONAPI","\u002Fproviders\u002Fton","2.providers\u002F08.ton",{"title":96,"path":97,"stem":98},"TRONSCAN","\u002Fproviders\u002Ftronscan","2.providers\u002F09.tronscan",{"title":100,"path":101,"stem":102},"Aptos Explorer","\u002Fproviders\u002Faptos","2.providers\u002F10.aptos",{"title":104,"path":105,"stem":106},"Blockberry","\u002Fproviders\u002Fblockberry","2.providers\u002F11.blockberry",{"title":108,"path":109,"stem":110},"Koios","\u002Fproviders\u002Fkoios","2.providers\u002F12.koios",{"title":112,"path":113,"stem":114},"Arweave gateway","\u002Fproviders\u002Farweave","2.providers\u002F13.arweave",{"title":116,"path":117,"stem":118},"dcrdata","\u002Fproviders\u002Fdcrdata","2.providers\u002F14.dcrdata",{"title":120,"path":121,"stem":122},"Horizon","\u002Fproviders\u002Fhorizon","2.providers\u002F15.horizon",{"title":124,"path":125,"stem":126},"WhatsOnChain","\u002Fproviders\u002Fwhatsonchain","2.providers\u002F16.whatsonchain",{"title":128,"path":129,"stem":130},"Blockbook","\u002Fproviders\u002Fblockbook","2.providers\u002F17.blockbook","i-lucide-library",{"title":133,"path":134,"stem":135},"Chains","\u002Fchains","3.chains",{"id":137,"title":128,"body":138,"description":577,"extension":578,"links":579,"meta":580,"navigation":203,"path":129,"seo":582,"stem":130,"__hash__":583},"docs\u002F2.providers\u002F17.blockbook.md",{"type":139,"value":140,"toc":571},"minimark",[141,145,150,315,341,345,415,425,429,558,562,567],[142,143],"provider-facts",{"provider":144},"blockbook",[146,147,149],"h2",{"id":148},"address-it","Address it",[151,152,157],"pre",{"className":153,"code":154,"language":155,"meta":156,"style":156},"language-ts shiki shiki-themes github-light github-light poimandres","import { Blockbook } from \"@agntn\u002Fexplorers\u002Fproviders\u002Fblockbook\";\n\nconst btg = new Blockbook(); \u002F\u002F or create(\"blockbook\")\nawait btg.getBalance(\"GNiT8AiCaMYPYW9uSgmq2qUsVjNgh1kdty\", \"bitcoingold\");\nawait btg.getTxHistory(\"GNiT8AiCaMYPYW9uSgmq2qUsVjNgh1kdty\", \"bitcoingold\", { limit: 10 });\n","ts","",[158,159,160,198,205,232,271],"code",{"__ignoreMap":156},[161,162,165,169,173,177,180,184,188,192,195],"span",{"class":163,"line":164},"line",1,[161,166,168],{"class":167},"sP0CR","import",[161,170,172],{"class":171},"sKlNE"," {",[161,174,176],{"class":175},"snHMy"," Blockbook",[161,178,179],{"class":171}," }",[161,181,183],{"class":182},"stCPd"," from",[161,185,187],{"class":186},"scVjq"," \"",[161,189,191],{"class":190},"sQ7BG","@agntn\u002Fexplorers\u002Fproviders\u002Fblockbook",[161,193,194],{"class":186},"\"",[161,196,197],{"class":171},";\n",[161,199,201],{"class":163,"line":200},2,[161,202,204],{"emptyLinePlaceholder":203},true,"\n",[161,206,208,212,216,219,222,225,228],{"class":163,"line":207},3,[161,209,211],{"class":210},"s1TYA","const",[161,213,215],{"class":214},"saoiD"," btg",[161,217,218],{"class":210}," =",[161,220,221],{"class":167}," new",[161,223,176],{"class":224},"sULi6",[161,226,227],{"class":171},"(); ",[161,229,231],{"class":230},"sjhu3","\u002F\u002F or create(\"blockbook\")\n",[161,233,235,239,242,245,248,251,253,256,258,261,263,266,268],{"class":163,"line":234},4,[161,236,238],{"class":237},"sZW6a","await",[161,240,215],{"class":241},"spVlQ",[161,243,244],{"class":171},".",[161,246,247],{"class":224},"getBalance",[161,249,250],{"class":171},"(",[161,252,194],{"class":186},[161,254,255],{"class":190},"GNiT8AiCaMYPYW9uSgmq2qUsVjNgh1kdty",[161,257,194],{"class":186},[161,259,260],{"class":171},", ",[161,262,194],{"class":186},[161,264,265],{"class":190},"bitcoingold",[161,267,194],{"class":186},[161,269,270],{"class":171},");\n",[161,272,274,276,278,280,283,285,287,289,291,293,295,297,299,302,305,308,312],{"class":163,"line":273},5,[161,275,238],{"class":237},[161,277,215],{"class":241},[161,279,244],{"class":171},[161,281,282],{"class":224},"getTxHistory",[161,284,250],{"class":171},[161,286,194],{"class":186},[161,288,255],{"class":190},[161,290,194],{"class":186},[161,292,260],{"class":171},[161,294,194],{"class":186},[161,296,265],{"class":190},[161,298,194],{"class":186},[161,300,301],{"class":171},", {",[161,303,304],{"class":175}," limit",[161,306,307],{"class":171},":",[161,309,311],{"class":310},"siHFe"," 10",[161,313,314],{"class":171}," });\n",[316,317,318,319,322,323,260,326,329,330,332,333,336,337,340],"p",{},"One chain, no key. Blockbook is the indexer Trezor wrote for its wallet, and btgexplorer.com runs a public instance of it for Bitcoin Gold. ",[158,320,321],{},"baseUrl"," is the explorer root, the part before ",[158,324,325],{},"\u002Fapi\u002Fv2",[158,327,328],{},"https:\u002F\u002Fbtgexplorer.com"," by default. There's no published limit and no key to raise one, so for anything heavy point ",[158,331,321],{}," at your own Blockbook. Any other chain is an ",[158,334,335],{},"UnsupportedChainError",". An address Bitcoin Gold doesn't take, a Bitcoin ",[158,338,339],{},"1..."," one for example, fails before a request goes out.",[146,342,344],{"id":343},"what-it-reads","What it reads",[346,347,348,361],"table",{},[349,350,351],"thead",{},[352,353,354,358],"tr",{},[355,356,357],"th",{},"Operation",[355,359,360],{},"Route",[362,363,364,375,385,395,405],"tbody",{},[352,365,366,370],{},[367,368,369],"td",{},"balance",[367,371,372],{},[158,373,374],{},"\u002Fapi\u002Fv2\u002Faddress\u002F{address}?details=basic",[352,376,377,380],{},[367,378,379],{},"history",[367,381,382],{},[158,383,384],{},"\u002Fapi\u002Fv2\u002Faddress\u002F{address}?details=txs",[352,386,387,390],{},[367,388,389],{},"one transaction",[367,391,392],{},[158,393,394],{},"\u002Fapi\u002Fv2\u002Ftx\u002F{txid}",[352,396,397,400],{},[367,398,399],{},"unspent outputs",[367,401,402],{},[158,403,404],{},"\u002Fapi\u002Fv2\u002Futxo\u002F{address}",[352,406,407,410],{},[367,408,409],{},"block",[367,411,412],{},[158,413,414],{},"\u002Fapi\u002Fv2\u002Fblock\u002F{height}",[316,416,417,418,421,422,244],{},"No gas and no tokens. ",[158,419,420],{},"\u002Fapi\u002Fv2\u002Festimatefee"," quotes BTG per kilobyte straight from the node, and nothing else in this library speaks that unit, so gas stays unsupported rather than converted into something that looks like ",[158,423,424],{},"sat\u002FvB",[146,426,428],{"id":427},"gotchas","Gotchas",[430,431,432,436,450,457,477,483,490,508,518,528,539,550],"ul",{},[433,434,435],"li",{},"Blockbook resolves every input to the address and the amount it spends. So the sender and the fee come with the transaction itself, one request per page, no parent lookups like on WhatsOnChain.",[433,437,438,439,442,443,446,447,449],{},"Seen from an address, a transaction is a send when one of its inputs spent from that address. Then ",[158,440,441],{},"value"," is what went to everyone else and ",[158,444,445],{},"to"," is the first of them. Otherwise it's a receive and ",[158,448,441],{}," is what landed on the address.",[433,451,452,453,456],{},"Ask for a page past the end and Blockbook answers with the last page, not an empty one. The provider checks the page number it got back and returns ",[158,454,455],{},"[]",", so a loop over pages ends where it should.",[433,458,459,460,463,464,467,468,471,472,467,475,244],{},"History comes newest first and only that way. ",[158,461,462],{},"sort: \"asc\""," throws instead of quietly giving you the wrong order. ",[158,465,466],{},"startBlock"," and ",[158,469,470],{},"endBlock"," work, they go out as Blockbook's ",[158,473,474],{},"from",[158,476,445],{},[433,478,479,482],{},[158,480,481],{},"limit"," up to 100. A page carries full transactions, every input and its script, so 100 rows of a busy pool address are about 1.4 MB.",[433,484,485,486,489],{},"A transaction still in the mempool reads as ",[158,487,488],{},"pending"," at block 0.",[433,491,492,493,467,496,499,500,503,504,507],{},"Balance comes with ",[158,494,495],{},"funded",[158,497,498],{},"spent"," totals and the signed ",[158,501,502],{},"unconfirmed"," delta. No block height, the endpoint doesn't send one, so ",[158,505,506],{},"blockNumber"," stays null.",[433,509,510,511,514,515,244],{},"Unspent outputs come with the height and without the block hash, so ",[158,512,513],{},"blockHash"," stays null. Unconfirmed ones are in the list with ",[158,516,517],{},"confirmed: false",[433,519,520,521,524,525,244],{},"A missing transaction or block is a 400 with the reason inside, which the provider turns into ",[158,522,523],{},"NotFoundError",". Any other reason travels in the message of a plain ",[158,526,527],{},"ExplorerError",[433,529,530,531,534,535,538],{},"OP_RETURN outputs never become the recipient. Their payloads stay in ",[158,532,533],{},"raw"," and don't get decoded into ",[158,536,537],{},"opReturn"," the way Mempool does it.",[433,540,541,542,545,546,549],{},"A block has an empty ",[158,543,544],{},"miner"," and gas fields of ",[158,547,548],{},"\"0\"",", like every other chain without gas.",[433,551,552,553,557],{},"The ",[554,555,52],"a",{"href":556},"\u002Fexplorer"," has no live feed for Bitcoin Gold. Search works, the hub says there's no tip.",[146,559,561],{"id":560},"where-it-lives","Where it lives",[316,563,564,244],{},[158,565,566],{},"src\u002Fproviders\u002Fblockbook.ts",[568,569,570],"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 .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 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 pre.shiki code .siHFe, html code.shiki .siHFe{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#5DE4C7}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":156,"searchDepth":200,"depth":200,"links":572},[573,574,575,576],{"id":148,"depth":200,"text":149},{"id":343,"depth":200,"text":344},{"id":427,"depth":200,"text":428},{"id":560,"depth":200,"text":561},"Bitcoin Gold through the Blockbook API of btgexplorer.com. Balances, history, unspent outputs, transactions and blocks. Satoshis, no key.","md",null,{"icon":581},"i-lucide-book-marked",{"title":128,"description":577},"43s7HvCCsVVHGd4_QJmq0K2cwgrxTuUUv8XCKpfe09Q",[585,587],{"title":124,"path":125,"stem":126,"description":586,"children":-1},"Bitcoin SV through WhatsOnChain. Balances, history, unspent outputs, transactions and blocks. Satoshis. Three requests a second without a key.",{"title":133,"path":134,"stem":135,"description":588,"children":-1},"The 29 chains the built-in providers serve. Which provider answers for each and which operations any of them cover. Read from the registry and not typed in.",1790332430506]