php – bitcoind守护进程和createrawtransaction参数

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了php – bitcoind守护进程和createrawtransaction参数脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我一直在测试/学习bitcoind守护进程的rpc接口,并成功使用PHP库到现在为止.
 我正在尝试创建一个新的原始事务,我在互联网上有很多例子,但我不知道函数的params应该来自哪里.

例如:

$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
    ));

>“txid”来自哪里,或者它是如何生成
> vout值必须来自哪里.

解决方法

看看 this description.这很棒.

(非常)短版:

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

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

脚本宝典总结

以上是脚本宝典为你收集整理的php – bitcoind守护进程和createrawtransaction参数全部内容,希望文章能够帮你解决php – bitcoind守护进程和createrawtransaction参数所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。