找回密码
 立即注册
搜索
查看: 226|回复: 0

Bitcoin Core RPC getrawtransaction Documentation Guide

[复制链接]

10万

主题

150

回帖

32万

积分

管理员

积分
325078
发表于 2025-10-27 15:18:22 | 显示全部楼层 |阅读模式
The getrawtransaction RPC method in Bitcoin Core allows users to retrieve a raw transaction from the blockchain by its transaction ID. This method is part of the Bitcoin Core JSON-RPC API, which enables programmatic interaction with the Bitcoin network. To use getrawtransaction, you must have a running Bitcoin Core node with RPC server enabled and proper authentication configured.

When calling getrawtransaction, you provide the transaction ID (txid) as a required parameter. Optionally, you can set a verbose flag to return a decoded transaction object instead of the raw hex string. This is useful for extracting detailed information such as inputs, outputs, and confirmations. For example, with verbose set to true, the response includes the transaction\“s version, locktime, and vin/vout arrays.

It\“s important to note that getrawtransaction only works for transactions in the node\“s mempool or blockchain. If the transaction is not found, an error is returned. This method is essential for developers building applications that need to analyze transaction data, such as wallets, explorers, or auditing tools. Always ensure your node is synced to access the latest transactions.

相关帖子

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|usdt交易

GMT+8, 2025-11-23 04:26 , Processed in 0.115588 second(s), 22 queries .

Powered by usdt cosino! X3.5

© 2001-2025 Bitcoin Casino

快速回复 返回顶部 返回列表