Transaction information
Getting the data of a transaction, if it exists in the wallet.
Parameters
- x-wallet-id: Wallet identifier.
- id: Transaction ID (hash) to get data.
Request
curl -X GET -H "X-Wallet-Id: default-wallet" \
http://localhost:8000/wallet/transaction?id=005844898b5f1e5f953d1a45ccbb41afc0d200b4e4a3b45d7f177f692b1a6c91
Response
{
"tx_id":"005844898b5f1e5f953d1a45ccbb41afc0d200b4e4a3b45d7f177f692b1a6c91",
"version":1,
"weight":8.000001,
"timestamp":1659464721,
"is_voided":false,
"inputs":[
{
"value":51,
"token_data":0,
"script":"dqkUCxl0E/Pce3bBB5ppr2+lOEq4ZU6IrA==",
"decoded":{
"type":"P2PKH",
"address":"WPgioaCDXL82SfkPW35X2Pbd6YnqUWLKLk",
"timelock":null
},
"token":"00",
"tx_id":"0048dbfce484d6b2bf210637b4ff8e9220bafd21fa7b86cd2221490edd6bca23",
"index":0
},
{
"value":1,
"token_data":129,
"script":"dqkU6TYBuyxKl4ATkIWx7N1doJ/0pM6IrA==",
"decoded":{
"type":"P2PKH",
"address":"Wjw925akXYhP9YG8nRziJmMYY5q5EPiP3Z",
"timelock":null
},
"token":"008a62793ccd07bd21c7d9b2c20f718d1545911130e74da2c78b932f5fec6904",
"tx_id":"0048dbfce484d6b2bf210637b4ff8e9220bafd21fa7b86cd2221490edd6bca23",
"index":2
}
],
"outputs":[
{
"value":49,
"token_data":0,
"script":"dqkU7NfgEFCjpuKSKjlHEPYrSN21oqWIrA==",
"decoded":{
"type":"P2PKH",
"address":"WkGLxUVv8kbpNHf1sNh2amzdyvGcXYSN71",
"timelock":null
},
"token":"00",
"spent_by":null,
"selected_as_input":false
},
{
"value":200,
"token_data":1,
"script":"dqkUSSdep2/Jgw+AAsTTFePoMnA29EuIrA==",
"decoded":{
"type":"P2PKH",
"address":"WVLqNPWmX1t2y1LcGCXF1etCV9TLZnPfw4",
"timelock":null
},
"token":"008a62793ccd07bd21c7d9b2c20f718d1545911130e74da2c78b932f5fec6904",
"spent_by":null,
"selected_as_input":false
},
{
"value":1,
"token_data":129,
"script":"dqkUE6A1QxhXim9+SjkmpaCjC0vUlHyIrA==",
"decoded":{
"type":"P2PKH",
"address":"WQToe2JbWEmXpTjCNeTJXr8aGAXaQExu8M",
"timelock":null
},
"token":"008a62793ccd07bd21c7d9b2c20f718d1545911130e74da2c78b932f5fec6904",
"spent_by":null,
"selected_as_input":false
}
],
"parents":[
"0048dbfce484d6b2bf210637b4ff8e9220bafd21fa7b86cd2221490edd6bca23",
"00d8ce13c9fb26ee660ecd357321515e27255be97e6d9e48f96c02540386e586"
]
}
If the informed hash does not match a transaction wallet, the following error is returned:
{
"success":false,
"error":"Wallet does not contain transaction with id 005844898b5f1e5f953d1a45cc"
}