From 825d52823c37fcecf44e81a1a022b32c4dae4159 Mon Sep 17 00:00:00 2001 From: "David A. Harding" Date: Wed, 2 Aug 2023 08:19:33 -1000 Subject: [PATCH] All: remove references to blockchain.info They changed to blockchain.com and now heavily promote alcoins. Suggested by Murchandamus and Roasbeef --- appdx-pycoin.asciidoc | 4 ++-- ch02.asciidoc | 2 +- ch09.asciidoc | 2 +- code/get-utxo.py | 31 ------------------------------- tools/discouraged.sh | 2 ++ 5 files changed, 6 insertions(+), 35 deletions(-) delete mode 100644 code/get-utxo.py diff --git a/appdx-pycoin.asciidoc b/appdx-pycoin.asciidoc index 2e126958..2905f0a9 100644 --- a/appdx-pycoin.asciidoc +++ b/appdx-pycoin.asciidoc @@ -330,7 +330,7 @@ Dogecoin address : DFpN6QqFfUm3gKNaxN6tNcab1FArL9cZLE ==== Transaction Utility (TX) ((("transaction utility (TX)", id="TX17"))) -The command-line utility +tx+ will display transactions in human-readable form, fetch base transactions from pycoin's transaction cache or from web services (blockchain.info, blockcypher.com, blockr.io and chain.so are currently supported), merge transactions, add or delete inputs or outputs, and sign transactions. +The command-line utility +tx+ will display transactions in human-readable form, fetch base transactions from pycoin's transaction cache or from web services (blockcypher.com, blockr.io and chain.so are currently supported), merge transactions, add or delete inputs or outputs, and sign transactions. Following are some examples. @@ -358,7 +358,7 @@ Oops! We don't have web services set up. Let's do that now: [source,bash] ---- $ PYCOIN_CACHE_DIR=~/.pycoin_cache -$ PYCOIN_BTC_PROVIDERS="block.io blockchain.info blockexplorer.com" +$ PYCOIN_BTC_PROVIDERS="block.io blockexplorer.com" $ export PYCOIN_CACHE_DIR PYCOIN_BTC_PROVIDERS ---- diff --git a/ch02.asciidoc b/ch02.asciidoc index 40b8ef1c..588e60b5 100644 --- a/ch02.asciidoc +++ b/ch02.asciidoc @@ -36,7 +36,7 @@ relationships and flows between them. .Bitcoin overview image::images/mbc2_0201.png["Bitcoin Overview"] -((("Bitcoin Block Explorer")))((("BlockCypher Explorer")))((("blockchain.info")))((("BitPay Insight")))Popular blockchain explorers include: +((("Bitcoin Block Explorer")))Popular blockchain explorers include: * https://blockstream.info/[Blockstream Explorer] * https://mempool.space[Mempool.Space] diff --git a/ch09.asciidoc b/ch09.asciidoc index eed61cc9..3b1c95e4 100644 --- a/ch09.asciidoc +++ b/ch09.asciidoc @@ -217,7 +217,7 @@ The following identifier hash belongs to the genesis block: ---- You can search for that block hash in any block explorer website, such -as _blockchain.info_, and you will find a page describing the contents +as _blockstream.info_, and you will find a page describing the contents of this block, with a URL containing that hash: https://blockstream.info/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f diff --git a/code/get-utxo.py b/code/get-utxo.py deleted file mode 100644 index 2b3ffef1..00000000 --- a/code/get-utxo.py +++ /dev/null @@ -1,31 +0,0 @@ -# get unspent outputs from blockchain API - -import json -import requests - -# example address -address = '1Dorian4RoXcnBv9hnQ4Y2C1an6NJ4UrjX' - -# The API URL is https://blockchain.info/unspent?active=
-# It returns a JSON object with a list "unspent_outputs", containing UTXO, like this: -# { "unspent_outputs":[ -# { -# "tx_hash":"ebadfaa92f1fd29e2fe296eda702c48bd11ffd52313e986e99ddad9084062167", -# "tx_index":51919767, -# "tx_output_n": 1, -# "script":"76a9148c7e252f8d64b0b6e313985915110fcfefcf4a2d88ac", -# "value": 8000000, -# "value_hex": "7a1200", -# "confirmations":28691 -# }, -# ... -# ]} - -resp = requests.get('https://blockchain.info/unspent?active=%s' % address) -utxo_set = json.loads(resp.text)["unspent_outputs"] - -for utxo in utxo_set: - print("%s:%d - %ld Satoshis" % (utxo['tx_hash'], utxo['tx_output_n'], - utxo['value'])) - # Or try... - # print("{tx_hash}:{tx_output_n} - {value} Satoshis".format(**utxo)) diff --git a/tools/discouraged.sh b/tools/discouraged.sh index 3d5134e4..a7081a19 100755 --- a/tools/discouraged.sh +++ b/tools/discouraged.sh @@ -41,3 +41,5 @@ m-of-m m-of-n n-of-n k-of-n +blockchain.info +blockchain.com