{"id":16325496,"url":"https://github.com/tynes/bitcoin-utils","last_synced_at":"2026-05-07T01:06:09.976Z","repository":{"id":104848426,"uuid":"132099387","full_name":"tynes/bitcoin-utils","owner":"tynes","description":"handy bitcoin scripts","archived":false,"fork":false,"pushed_at":"2022-02-05T10:49:39.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-09T00:36:53.778Z","etag":null,"topics":["bash","bitcoin","decentralization","hofstadter"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tynes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-04T06:43:22.000Z","updated_at":"2022-06-04T02:14:52.000Z","dependencies_parsed_at":"2023-07-04T22:50:08.479Z","dependency_job_id":null,"html_url":"https://github.com/tynes/bitcoin-utils","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"be6509dc1524d10f461de5891a21edaf279ed789"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tynes/bitcoin-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tynes%2Fbitcoin-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tynes%2Fbitcoin-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tynes%2Fbitcoin-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tynes%2Fbitcoin-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tynes","download_url":"https://codeload.github.com/tynes/bitcoin-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tynes%2Fbitcoin-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231099,"owners_count":25245687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bitcoin","decentralization","hofstadter"],"created_at":"2024-10-10T23:05:08.932Z","updated_at":"2026-05-07T01:06:04.950Z","avatar_url":"https://github.com/tynes.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bitcoin-utils\n\nSome basic bitcoin utilities utilizing the [blockchain.info](https://blockchain.info/q/)\nquery api. Stick them someplace easy for quick access!\n\n```\n$ git clone https://www.github.com/tynes/bitcoin-utils ~/bitcoin-utils\n```\n\n\"Asics are making mining too centralized. Regular people have no chance anymore.\"\n\n\"What do you mean? There is some chance that I could mine the next block.\"\n\n```\n$ date +%Y-%m-%d\n\u003e 2018-05-03\n$ ~/bitcoin-utils/probability\n\u003e 0.0000000000000000000000578884179218271\n```\n\n\n\"So you think you can win the lottery?\"\n\n\n```\nThis is the New Improved Lottery. It shows a\nconstantly fluctuating probability distribution\nover the likelihood of a win occurring, the\nlikelihood of particular numbers being selected,\nwith the overall expectation working out to the\nthe aforesaid Poisson distribution. You\ncould feed it to a display on people's\ncellphones, so they could just flip open the\ncellphone and see their chances of winning.\nThink of how exciting *that* would be! Much\nmore exciting than trying to balance your checkbook!\nThis new dream would be so much tastier\nthat it would compete with, not only\nhopes of going to technical school, but\neven hopes of getting home from work early.\nPeople could just stay glued to the screen\nall day long, why, they wouldn't need to\ndream about anything else!\n\nYep, offering people tempting daydreams that\nwill not actually happen sure is a valuable\nservice, all right.  People are willing to pay,\nit must be valuable.  The alternative is that\nconsumers are making mistakes, and we all\nknow that can't happen.\n\nAnd yet current governments, with their vile monopoly\non lotteries, don't offer this simple and obvious\nservice.  Why?  Because they want to overcharge\npeople.  They want them to spend money every week.\nThey want them to spend a hundred dollars for the\nthrill of believing their chance of winning is a\nhundred times as large, instead of being able\nto stare at a cellphone screen waiting for the\nlikelihood to spike.  So if you believe that the\nlottery is a service, it is clearly an enormously\noverpriced service—charged to the poorest members\nof society—and it is your solemn duty as a citizen\nto demand the New Improved Lottery instead. [1]\n```\n\n---\n__pay attention__ / pā əˈten(t)SH(ə)n / : _idiom_ - to concentrate on\n\n---\n\n```\nIt would mean that you're occupying your valuable\nbrain with a fantasy whose real probability is\nnearly zero—a tiny line of likelihood which you,\nyourself, can do nothing to realize.  The lottery\nballs will decide your future.  The fantasy is\nof wealth that arrives without effort—without\nconscientiousness, learning, charisma, or even patience.\n\nWhich makes the lottery another kind of sink: a sink of\nemotional energy.  It encourages people to invest\ntheir dreams, their hopes for a better future,\ninto an infinitesimal probability.  If not for\nthe lottery, maybe they would fantasize about\ngoing to technical school, or opening their own\nbusiness, or getting a promotion at work—things\nthey might be able to actually do, hopes that\nwould make them want to become stronger.\n\nMany people don't realize that a numerical\ncalculation of expected utility ought to\noverride or replace their imprecise financial\ninstincts, and instead treat the calculation\nas merely one argument to be balanced\nagainst their pleasant anticipations — an\nemotionally weak argument, since it's\nmade up of mere squiggles on paper,\ninstead of visions of fabulous wealth. [2]\n```\n\n---\n\n ⚛ ☦ 🕉 the universal currency is attention. spend it on what you love.  ☸ ☪ 🔯\n \n ---\n \n## api\n\n| script         | usage                  | description                                                            |\n| -------------  |------------------------| -----------------------------------------------------------------------|\n| getdifficulty  | $ getdifficulty        | current difficulty target as a decimal number                          |\n| getblockcount  | $ getblockcount        | current block height in the longest chain                              |\n| latesthash     | $ latesthash           | hash of the latest block                                               |\n| bcperblock     | $ bcperblock           | current block reward in BTC                                            |\n| totalbc        | $ totalbc              | total Bitcoins in circulation (delayed by up to 1 hour])               |\n| probability    | $ probability          | probability of finding a valid block each hash attempt                 |\n| hashestowin    | $ hashestowin          | average number of hash attempts needed to solve a block                |\n| nextretarget   | $ nextretarget         | block height of the next difficulty retarget                           |\n| avgtxsize      | $ avgtxsize \\\u003cblocks\u003e   | average transaction size for the past number of blocks - default: 1000 |\n| avgtxvalue     | $ avgtxvalue           | average transaction value (1000 Default)                               |\n| interval       | $ interval             | average time between blocks in seconds                                 |\n| eta            | $ eta                  | estimated time until the next block (in seconds)                       |\n| avgtxnumber    | $ avgtxnumber \\\u003cblocks\u003e | average number of transactions per block - default: 100                |\n| bestblockheader| $                      | TODO                                                                   |\n\n### sources\n\n[1] - [New Improved Lottery](https://www.lesswrong.com/posts/QawvGzYWhqdyPWgBL/new-improved-lottery)  \n[2] - [Lotteries: A Waste of Hope](https://www.lesswrong.com/s/FrqfoG3LJeCZs96Ym/p/vYsuM8cpuRgZS5rYB)  \n[*] - [GEB](https://en.wikipedia.org/wiki/G%C3%B6del,_Escher,_Bach)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftynes%2Fbitcoin-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftynes%2Fbitcoin-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftynes%2Fbitcoin-utils/lists"}