https://github.com/proohit/camtjs
JS package to work with CAMT transactions
https://github.com/proohit/camtjs
Last synced: 4 months ago
JSON representation
JS package to work with CAMT transactions
- Host: GitHub
- URL: https://github.com/proohit/camtjs
- Owner: proohit
- License: mit
- Created: 2022-11-11T21:33:23.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-16T10:59:36.000Z (over 3 years ago)
- Last Synced: 2025-10-29T23:17:31.991Z (8 months ago)
- Language: TypeScript
- Size: 445 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# camtjs


[](https://sonarcloud.io/summary/new_code?id=proohit_camtjs)
[](https://codecov.io/gh/proohit/camtjs)
[](https://sonarcloud.io/summary/new_code?id=proohit_camtjs)

JS package to work with Camt transactions.
:warning: Still work in progress. :warning:
## Features
- [ ] Camt052 (WIP)
- [ ] Camt053
- [ ] Validation
The Camt052 implementation is currently based on V10, but may work for e.g. V8 as well.
For easier working inside JS, the camt tags are renamed to their description according to [ISO 20022](https://www.iso20022.org/iso-20022-message-definitions?business-domain%5B0%5D=1&search=Bank-to-Customer%20Cash%20Management). For instance `BkToCstmrAcctRpt.Rpt.Ntry` is renamed to `messageRoot.report.entry`.
## Installation
```bash
npm i camtjs
```
Natively supported in node. For browser there are polyfills needed, because of the underlying `xml2js`. I tested it with `nextjs` and `vite`, which both worked out of the box.
## Usage
```ts
import { Camt052 } from 'camtjs';
const camt052 = await Camt052.parseCamt('your camt xml');
// You then have access to the complete Camt052 document tree
console.log(camt052.document.messageRoot.report.entry);
```