有人可以用block.io API帮助我从钱包中提取比特币吗?

时间:2019-10-10 18:47:08

标签: api bitcoin

我正在尝试使用block.io API,在尝试并实施了几个月之前,它运行良好,现在他们更改了签名方法,所有API均正常运行,只有提款API不起作用,curl响应是表示成功,但是需要more_signatures_needed,我不知道该怎么做,有人可以帮我吗?我会很感激的。

受保护的无效Page_Load(对象发送者,EventArgs e)     {          myPage.Text = readHtmlPage(“ https://block.io/api/v2/withdraw_from_addresses/”);

   //fecth response
    String myUri = Session["myPagecc"].ToString();

//显示响应         Label1.Text = myUri.ToString();

}
private String readHtmlPage(string url)
{

    String api_key = "myapikey";

    double amounts = "btcamount";

    String to_addresses = "receiveraddress";

    string FROM_ADDRESS = "myaddress";

    string NEWCODE = Guid.NewGuid().ToString().Substring(0, 5);
    string priority="medium";
    String result = "";
    String strPost = "api_key=" + api_key + "&from_addresses=" + FROM_ADDRESS + "&to_addresses="+to_addresses +"&amounts="+amounts+"&priority="+priority+"&nonce="+NEWCODE;




    StreamWriter myWriter = null;

    HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
    objRequest.Method = "POST";
    objRequest.ContentLength = strPost.Length;
    objRequest.ContentType = "application/x-www-form-urlencoded";

    try
    {
        myWriter = new StreamWriter(objRequest.GetRequestStream());
        myWriter.Write(strPost);

    }
    catch (Exception e)
    {
        return e.Message;
    }
    finally 
    {
        myWriter.Close();


    }

    HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse();
    using (StreamReader sr =
       new StreamReader(objResponse.GetResponseStream()))
    {
        result = sr.ReadToEnd();

        // Close and clean up the StreamReader
        sr.Close();
    }
    return result;
}

“状态”:“成功”,“数据”:{“ reference_id”:“ 70ab0922cf036481533e7f345068c0bed36f9681d644d8”,“ more_signatures_needed”:true,“ inputs”:[{“ input_no”:0,“ signatures_needed”:1,“ data_to_ “: ”3916022666e29882298d54c2c8f2ab3306cc4e774594f5db9“, ”签名“:[{ ”signer_address“: ”jhE397dsNaNLByJ8WV43emD1mhSpPtwDV“, ”signer_public_key“: ”a34b48a3a18373020d8d96fb53b733d373cd3ba9b5bbfd2c9f8105c8939058130d“, ”signed_data“:空}]}], ”encrypted_pa​​ssphrase“:{ ”signer_address“: ”NaNLmhSByJ8WV43emD1jhE397dspPtwDV“ “signer_public_key”: “373cd3ba9b5bbfd2c9f8020d8d96fb53b733d373a34b48a3a18105c8939058130d”, “密码”: “R20 / Wyy5iTVFmpcmn1Y8JOMR8mP7jAqaBrMf2UOW2aEBQSQ1XfxpgonIyFLDOKkmuqH84sETSjXTFsl3dpo5niABB2rL69vnsLbS4DaXMw1o33NH0zgHyzdkAYmIoeGe85YVPMkrQsNhLrGQ6JUaubT + W3rIBxP7rCqYznnMnt8QxG4wu5LSh2EY8fja6AI1”}, “unsigned_tx_hex”:“010000000127d8d4654bc8cf69c9b1980c1afa67e51b5b28241ac080100000023220020200d0c2118ad382e8dab4f3c2ddf5ab8ca1d8ac3ffa3d910a0a2aa86cb69cb77 bb62e2a7f12fbc8a699ffffffff076a914103ee4139219756a503842b0ad01000000000019caf5a381440b66bd81188ac64a401000000000017a9145af1577250a83928e306b35f8463047d72d9e3408700000000“}}

1 个答案:

答案 0 :(得分:0)

请为此提供任何解决方案。

使用Block.IO令牌提取时,似乎我们需要发送一些额外的安全密码 根据他们的文档:https://block.io/api/simple/signing

喜欢知道如何发送cURL来执行吗?

他们的示例cURL无法正常工作:/ api / v2 / withdraw_from_addresses /?api_key = API KEY&from_addresses = ADDRESS1,ADDRESS2,...&to_addresses = ADDRESS1,ADDRESS2,...&amounts = AMOUNT1,AMOUNT2,...

响应为:

{[status, success]}
{[data, {
  "reference_id": "24fe5a.....",
  "more_signatures_needed": true,
  "inputs": [
    {
      "input_no": 0,
      "signatures_needed": 1,
      "data_to_sign": "2498d....",
      "signers": [
        {
          "signer_address": "1H4.....",
          "signer_public_key": "037710.....",
          "signed_data": null
        }
      ]
    }
  ],
  "encrypted_passphrase": {
    "signer_address": "1H4...",
    "signer_public_key": "0377....",
    "passphrase": "fDCM0...."
  },
  "unsigned_tx_hex": "01000...."
}]}

如果可能的话:请在asp.net vb中期待一些示例