Bitcoin
Bitcoin
Bitcoin
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
decoderawtransaction parses a serialized Bitcoin transaction hex and returns its structure as a JSON object — version, size, vsize, weight, locktime, and the full vin[] and vout[] arrays — along with the computed txid. It is a stateless decoder: it reads only the bytes you hand it and performs no lookup against the chain or mempool, so it works for transactions that have never been broadcast. Outputs report amounts in BTC. Call it on the Bitcoin JSON-RPC endpoint at https://bitcoin.therpc.io/YOUR_API_KEY to turn opaque hex into a readable transaction.
createrawtransaction to confirm its inputs and outputs before you sign or broadcast it.txid of an unsigned transaction so you can track or reference it before it ever hits the network.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | hexstring | string | 是 | Serialized transaction hex to decode. |
| 2 | iswitness | boolean | 否 | Whether the hex is a witness transaction (auto-detected if omitted). |
| 类型 | 描述 |
|---|---|
| object | txid, hash, version, size, vsize, weight, locktime, vin[], vout[]. |
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-22 | TX decode failed | The hex string is not a valid serialized transaction. |
getrawtransaction at verbosity 2 if you need fee and prevout data.iswitness explicitly to force the correct interpretation.