The SKALE Network continues to push forward in supporting secure and privacy-preserving transaction workflows with the introduction of BITE protocol. As part of that, we’re introducing a new JSON-RPC method: bite_getDecryptedTransactionData
.
This method allows you to retrieve the decrypted transaction fields of a transaction that was previously submitted to the chain in encrypted form, and has already been persisted into the blockchain.
This call expects a transaction hash as input, and returns the decrypted data
field associated with that transaction as well as the decrypted to
field. If a transaction with such hash does not exist or does not have any decrypted data associated with it, the method throws an error.
Example request:
{
"jsonrpc": "2.0",
"method": "bite_getDecryptedTransactionData",
"params": {
hash: "0x8a2b2db1677fe4e08d43e8fc6c8c4c4b9aebfacb60e5d5a87e55b1ec6b8d18a3"
},
"id": 1
}
Example response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"data": "0xa9059cbb0000000000000000000000008b299e2c8d3c74c7c6fdf56188dfe325a77d6e390000000000000000000000000000000000000000000000000000000000000001",
"to": "0x8b299e2c8d3c74c7c6fdf56188dfe325a77d6e39"
}
}