A utility package for parsing cardano transactions. This package returns a summary of what each wallet did in a transaction.
You can install the package using npm:
npm i @luxbug/cardano-transaction-parser
import { parseTransaction } from '@luxbug/cardano-transaction-parser';
const transactionData = {
inputs: [
{
address: '...',
amount: [
{ unit: 'lovelace', quantity: '1000000' },
{ unit: 'asset1234567890', quantity: '1' }
]
}
],
outputs: [
{
address: '...',
amount: [
{ unit: 'lovelace', quantity: '500000' },
{ unit: 'asset1234567890', quantity: '1' }
]
}
]
};
const parsedTransaction = await parseTransaction(transactionData);
console.log(parsedTransaction);
Parses a transaction object and returns asset and ADA summary for each wallet involved in the transaction.
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.