blockcypher / blockcypher-python

Python library for the BlockCypher web services

Home Page:https://www.blockcypher.com/dev/bitcoin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

inStart and outStart as camel case are not accepted

lmagomes opened this issue · comments

When calling get_transaction_details, the code is setting tx_input_offset and tx_output_offset to inStart and outStart. However, the blockcypher API seems to only accept lower case.

https://api.blockcypher.com/v1/btc/main/txs/22ac1e67c3406771a0bcda4002c71288c63718ec4750f75dd1b861481abff974?limit=1&outStart=2 will not start from output at index 2:


  "outputs": [
    {
      "value": 78210000,
      "script": "76a914f87f10043525cf5ce6e499ed6597abc65509256888ac",
      "spent_by": "07d344987b4f49a6d92c214f4b4d5a93e679281cce4d201b7238c18b141a19c6",
      "addresses": [
        "1Pevo352FVix3LwSuq67vFRSdXwug4iP5N"
      ],
      "script_type": "pay-to-pubkey-hash"
    }
  ],

while https://api.blockcypher.com/v1/btc/main/txs/22ac1e67c3406771a0bcda4002c71288c63718ec4750f75dd1b861481abff974?limit=1&outstart=2 will:

  "outputs": [
    {
      "value": 99700000,
      "script": "a9144ff1674044a80d4caf47b78543d6fc9cb0e6bbae87",
      "spent_by": "03e01f2c5f659e55744cee41e7bb72ae4bc0c9d5eaf5c6b07debc798c4c17967",
      "addresses": [
        "38yiVhHY1DPHirhQyZvN2ns6yv5qdpY5DZ"
      ],
      "script_type": "pay-to-script-hash"
    }
  ],

Similarly https://api.blockcypher.com/v1/btc/main/txs/962169f5e9d72d99bb6f1f50bb12367c48ae88c2ff7d4a618a83b3cdc8c472f4?limit=1&inStart=2 will not start from input at index 2:

  "inputs": [
    {
      "prev_hash": "1bf352ed1f282cb4c98e5ace41e07a26572fa9c731d76c91301cd68b0ba6b55a",
      "output_index": 66,
      "script": "47304402201aae4cae59ed834d3b7bab77222114df4b6f7ee236b3ddf9f329a56bc4f389bf02203bf69dff269740ad800e6aae1512d3d2ed4fa908847c60548e27128ed5eba1f20121036fc8a0fc4e5eabf29845ed8da20900edb6baf3f2a66ff0cae75a6739fb599068",
      "output_value": 24900000,
      "sequence": 4294967294,
      "addresses": [
        "1ytDGD7f3YjujXQ719xv25h6EyzBRNhBp"
      ],
      "script_type": "pay-to-pubkey-hash",
      "age": 502072
    }
  ],

while https://api.blockcypher.com/v1/btc/main/txs/962169f5e9d72d99bb6f1f50bb12367c48ae88c2ff7d4a618a83b3cdc8c472f4?limit=1&instart=2 will.

  "inputs": [
    {
      "prev_hash": "1c2c8a5212d13b15bcb44bb85242cc777ea77320f1804574bcd4fd65c1b4ba0a",
      "output_index": 8,
      "script": "47304402200a2e8bf7fdd99ebbb9e017cbfb4f6103dd9ec552652cc526b76a7baf0cf9edb302206e038d444597503d005b6d6b49ff9d22f0ed61d027e3d438882f7306d855d54d0121025585634b9acb271cba36156ceb4814ab7287007d8feccf16fbe39485bb7a78de",
      "output_value": 2052100,
      "sequence": 4294967294,
      "addresses": [
        "1mgML7ffgBhXNsJVTxAwYR7gD9TDhn8xR"
      ],
      "script_type": "pay-to-pubkey-hash",
      "age": 506230
    }
  ],

The blockcypher API does show instart and outstart as lowercase.