TxMutationParser
Parse XRPL transaction to context aware object for visual representation. It takes a XRPL transaction (outcome, meta) and an XRPL account. The XRPL account is the context from which the XPRL transaction is to be interpreted.
by WietseWind
HTML
<script src="https://cdn.jsdelivr.net/gh/XRPL-Labs/TxMutationParser@main/dist/browser.js"></script>
<h1 id="me"><code>rwietsevLFg8XSmG3bEZzFein1g8RBqWDZ</code></h1>
<h3 id="hash"><code>0D9BC6C5B24C5D57B817001BF5C9D1D973E3C67F2AFF31751EB51F89E3A446E3</code></h3>
<pre id="results">Loading...</pre>
JavaScript
const {TxMutationParser} = require('TxMutationParser')
const main = async () => {
const hash = document.getElementById('hash').innerText
const call = await window.fetch(`https://hash.xrp.fans/${hash}/json`)
const tx = await call.json()
const parsed = TxMutationParser(document.getElementById('me').innerText, tx.result)
document.getElementById('results').innerText = JSON.stringify(parsed, null, 2)
}
main()