bitcoind守护进程和createrawtransaction参数

时间:2014-04-03 12:29:24

标签: php bitcoin bitcoind

我一直在测试/学习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. 来自或如何生成
  3. 其中vout值必须来自。

1 个答案:

答案 0 :(得分:3)

看看this description。这很棒。

(非常)短版:

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

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

相关问题