简体   繁体   English

如何从交易 hash 中获取区块链交易的价值?

[英]How to get value of transactions in blockchain from transaction hash?

I have create a file with hash address.我创建了一个地址为 hash 的文件。 There any methods found this amount via API?有什么方法可以通过 API 找到这个数额吗?

If you are using web3.js you can pass transaction hash to a function like web3.eth.getTransaction(transactionHash [, callback]) to get information about the transaction.如果您使用的是 web3.js,您可以将事务 hash 传递给 function,例如web3.eth.getTransaction(transactionHash [, callback])以获取有关事务的信息。 It will also include a value field which you have passed to the transaction它还将包含一个您已传递给交易的字段

Read more about transaction receipts and logs here 在此处阅读有关交易收据和日志的更多信息

in the bitcoin.network to get transaction details from transaction hash then you can use get transaction RPC API call在 bitcoin.network 中从交易 hash 中获取交易详细信息然后您可以使用获取交易 RPC API 调用

https://developer.bitcoin.org/reference/rpc/gettransaction.html https://developer.bitcoin.org/reference/rpc/gettransaction.html

I have created videos for how to set up BTC node and work with RPC API call https://youtu.be/_c4TJrP7osc我已经创建了有关如何设置 BTC 节点和使用 RPC API 调用https://youtu.be/_c4TJrP7osc的视频

please watch it that might help you for how to setup请观看它,它可能会帮助您了解如何设置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM