在 blockcypher 上签署比特币:"error":"Not enough signatures: 0 for 1 inputs"

Signing bitcoin on blockcypher : "error": "Not enough signatures: 0 for 1 inputs"

我正在使用块密码进行交易。我已经执行了所有必要的步骤,但是当我尝试发送交易时,我收到一条错误消息,“错误:签名不足:1 个输入为 0”。

签名者(签名和私钥)

去运行signer.go697817584637d858b16ceb4dbecddfb7afc2da67992263ccffa2891bf69bb229 8f16d5bae3c2e4b6923d5a7da8194088f1813f5b22901d7be=9a640[9a648]

输出签名

3044022005b5ee7e4bac8a16a1ed59b4132a5ed51633718425b2813430bff0dbf238b35602203b3345c013f0f6555b029bed886ace99cbf416300d6007775d8a4772205e5a0b

比特币发件人信息

  private key:8f16d5bae3c2e4b6923d5a7da8194088f1813f5b22900b9a648d7ef8a38d0be0,  public key:029602113dd7851c8095434c4019258462aa30c16df6d146b9c4d039f1c5392f03,
address: mzrycPJMEjQ4WNv7rZVZepb6Lse63Xt4Ue,
  wif: cSNrA5tkpCpRLdXHrSy3mYdWRWPGFTYd53Z9tERz5DSprUx7JGZM

比特币接收方信息

private key:f392289723ef4a6dfef8fef7a76daea1cce8c572ed73d3b05e15271bfae70a01,   public key:020e3dc996e6cab4df26770b01b8f135322de2ef52c0b394e5c49dcf981d700db7,
 address: mmzsfMgMk4hejzv5ahuQULnMGQC4n7Wm3H,
 wif: cVkAus4uxWXhvcJVKovCj9Fpx2U2rftq7QVBU2vDsbQoZuwirtu9

发送交易

curl -d '{
  "tx": {
    "block_height": -1,
    "block_index": -1,
    "hash": "f54241d7525acba9d1a2ba270c9e1627810676a95909f0d1c7f800dde1b33adf",
    "addresses": [
      "mzrycPJMEjQ4WNv7rZVZepb6Lse63Xt4Ue",
      "mmzsfMgMk4hejzv5ahuQULnMGQC4n7Wm3H"
    ],
    "total": 300400,
    "fees": 99600,
    "size": 119,
    "preference": "high",
    "relayed_by": "158.223.165.35",
    "received": "2017-06-11T16:21:01.407862694Z",
    "ver": 1,
    "lock_time": 0,
    "double_spend": false,
    "vin_sz": 1,
    "vout_sz": 2,
    "confirmations": 0,
    "inputs": [
      {
        "prev_hash": "d2cb465b74e3f57d64b584962ee557d9a623d38befd570e14686438cc25279ee",
        "output_index": 0,
        "script": "",
        "output_value": 400000,
        "sequence": 4294967295,
        "addresses": [
          "mzrycPJMEjQ4WNv7rZVZepb6Lse63Xt4Ue"
        ],
        "script_type": ""
      }
    ],
    "outputs": [
      {
        "value": 10,
        "script": "76a914471888d19d0148ab072d3707712e8de8f4dc724788ac",
        "addresses": [
          "mmzsfMgMk4hejzv5ahuQULnMGQC4n7Wm3H"
        ],
        "script_type": "pay-to-pubkey-hash"
      },
      {
        "value": 300390,
        "script": "76a914d433cec679da5579b3fff61eefbb0ce70ae9221a88ac",
        "addresses": [
          "mzrycPJMEjQ4WNv7rZVZepb6Lse63Xt4Ue"
        ],
        "script_type": "pay-to-pubkey-hash"
      }
    ]
  },
  "tosign": [
    "697817584637d858b16ceb4dbecddfb7afc2da67992263ccffa2891bf69bb229"
  ]
}, "tosign": [ "697817584637d858b16ceb4dbecddfb7afc2da67992263ccffa2891bf69bb229" ], "signatures": ["3044022005b5ee7e4bac8a16a1ed59b4132a5ed51633718425b2813430bff0dbf238b35602203b3345c013f0f6555b029bed886ace99cbf416300d6007775d8a4772205e5a0b"], "pubkeys": ["029602113dd7851c8095434c4019258462aa30c16df6d146b9c4d039f1c5392f03" ] }' https://api.blockcypher.com/v1/btc/test3/txs/send?token=fcd13b49d1a4469e865707205e2022bc

我使用了自己的令牌,但为此 post 对其进行了审查。

如果有人能够帮助解决这个问题,我将不胜感激。

您的 JSON 文档似乎有问题。 signatures 和 pubkeys 数组应该与 "tosign" 我们 return 处于同一级别。您发布的内容实际上是无效的 JSON,还有一个 "tosign" 带有主文档之外的签名和公钥。看起来你刚刚做了一个追加。应该是这样的:

{
  "tx": { ... },
  "tosign": ["..."],
  "pubkeys": ["..."],
  "signatures": ["..."]
}

上次你用了两次签名,应该用一次 只需使用一次