pactus-project / pactus

Pactus blockchain
https://pactus.org
MIT License
216 stars 141 forks source link

RPC: decode raw transaction #1478

Open kehiy opened 3 months ago

Ja7ad commented 1 month ago

@kehiy @b00f Please write more details about this issue.

kehiy commented 1 month ago

@Ja7ad this endpoint works like that:

  1. input: a raw hex transaction (like what we get for broadcasting).
  2. output: a decoded json(?) object of transaction.

example:

curl -X POST https://bitcoin-mainnet.public.blastapi.io -H 'Content-Type: application/json' -d '{"jsonrpc":"1.0","id":0,"method":"decoderawtransaction","params":[""]}'

or:

https://www.blockchain.com/explorer/assets/btc/decode-transaction