【问题标题】:bitcoind daemon and createrawtransaction paramsbitcoind 守护进程和 createrawtransaction 参数
【发布时间】:2014-05-15 07:02:21
【问题描述】:

到目前为止,我一直在测试/学习 Bitcoind 守护程序的 rpc 接口,并成功使用 php 库。 我正在尝试创建一个新的原始交易,我在互联网上有很多例子,但我不知道函数的参数应该来自哪里。

示例:

$bitcoin = new Bitcoin('myuser','mypwd','127.0.0.1','8332');

 $bitcoin->createrawtransaction(
     array(
        array(
            "txid"=>"aed23bb3ec7e93d69450d7e5ea49d52fcfbef9d380108f2be8fe14ef705fcea5", /where this string comes from or how i have to generate it??
            "vout"=>2 //what is this vout, in this case what means the number 2??
        ),
    ),
    array(
        "1GTDT3hYk4x4wzaa9k38pRsHy9SPJ7qPzT"=>0.006,//destination wallet address and required amount
    ));
  1. “txid”来自哪里,或者它是如何产生的
  2. vout 值必须来自哪里。

【问题讨论】:

    标签: php bitcoin bitcoind


    【解决方案1】:

    看看this description。太棒了。

    (非常)简短版:

    • 每笔交易的输入都是旧交易的输出。
    • txid 是您收到的交易的交易 ID(至少包含您要花费的价值)。 vout 是您的地址在原始txid 中的索引。

    您可以在这里查看一些实际交易:https://blockchain.info/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-07-23
      • 2013-12-14
      • 2023-03-02
      • 2015-10-07
      • 2011-07-13
      • 1970-01-01
      • 2015-10-24
      相关资源
      最近更新 更多