Menu

Checking whether a 2010 bitcoin output has moved, in about 30 lines of JavaScript
📰

Checking whether a 2010 bitcoin output has moved, in about 30 lines of JavaScript

DEV Community: javascript·Swapcore.Exchange·21 days ago
#wIgQ0P3g
#devtojavascript#devto#dev#const#block
Long article (733 words) — no AI summary yet.
Reading 0:00
15s threshold

17.8 years

That's how long the 50 BTC reward from Bitcoin's block 1 has been sitting unspent, according to the script below.

It's a timely question. On November 13, 2026, two mining rewards from September 2010, 50 BTC each, moved for the first time in more than 16 years (Decrypt and The Block covered it; Whale Alert flagged the first move at 04:08 UTC). Each spend paid 1,110 satoshis in fees, and a later transaction combined coins from both wallets.

If you try to check a wallet like that with an address search, you can get a confusing answer. Many 2009 and 2010 coinbase outputs paid a raw public key (P2PK), not an address. Explorers can derive an address from the key, but the cleanest question to ask is about the output itself: was txid:vout spent, and when?

The script

It uses the public Esplora API (Blockstream's by default, mempool.space works too) and Node 18+'s built-in fetch . No key, no dependencies.

// outspend.mjs: was one output spent, and how long did it sit first?…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.