3 ms·
Hey HN, My name is Svapnil Ankolkar and I've recently built iso20022.js, a library for creating ISO20022 payments in Typescript. The goal of this project is t
by svapnil 2y ago
Hey HN,
My name is Svapnil Ankolkar and I've recently built iso20022.js, a library for creating ISO20022 payments in Typescript.
The goal of this project is to be the easiest way to create, and eventually ingest, files in the ISO20022 standard, the defacto XML standard for bank payments.
I'd love to know what you think and importantly know about any improvements you'd like us to make!
- franciscop 2y agoSince you do say it in HN tagline, what are the "3 lines of code"? I can only see 43 LoC in the landing page. A tool to help massively with payments is always welcome of course, but if this is really 43 lines instead of 3 it'd feel like shady marketing (no judgement until there's a reply/clarification).
- tootie 2y agoI mean, it's 3 statements with like 40 lines of JSON options. Debatable what counts as a LOC, but it's still pretty impressive.
- prettyStandard 2y agoI imagine they are counting object literals as one line of code, I'm inclined to agree. Maybe they could have said in "3 statements of code". > import { ISO20022 } from 'iso20022.js' > const iso20022 = new ISO20022({ /.../ }); > const creditPaymentInitiation = iso20022.createSWIFTCreditPaymentInitiation({ /.../}); > console.log(creditPaymentInitiation.toString()); Now are we counting the import and not counting the log statement, or are we counting the log statement and not the import? I'm not too worried about it.
- jerf 2y agoIt's the import, the "const iso20022 = new ISO20022" line, and the "const creditPaymentInitiation = iso20022.createSWIFTCreditPaymentInitiation". The big data chunks are being counted as one line. I will admit I'm usually very skeptical about "Do X in Y line" claims because usually you can do anything in one line by shoving the entire codebase behind a "DoIt()" call. But I'll actually give them this one. I'm not even worried about the data taking up so many lines as clearly the data is necessary. If they were full of mandatory function calls or something I'd ding 'em too, but they're not, it's just the data you need.
- franciscop 2y agoIf it was free text content I'd agree, but this being configuration code where you need to be very precise on the key names and values, possibly reading some docs and consulting multiple sources per line, I would not count this as 3 lines... 3 simple steps sure, but calling that 3 lines is not being honest IMHO.
- NoboruWataya 2y agoYou import the library, initialise an object and call its method. I think it's fair enough to call that example three lines of code. The bigger question of course is what do you end up with. Clearly that method call isn't going to actually send an instruction to your bank to debit your account and credit somebody else's. I guess `creditPaymentInitiation` is an object that has can be converted to a properly formatted message that can then be sent to your bank using an external tool?
- cess11 2y agoI'd bet the .toString() method returns an XML payload you can shove into your API call when you've configured a client for it.
- svapnil 2y agoYup - see https://docs.iso20022js.com/quickstart#step-4-send-the-payment-initiation-message-to-the-bank https://docs.iso20022js.com/quickstart#step-4-send-the-payme... if you wanna see how that's done
- runlevel1 2y agoIt'd be more accurate to say 3 steps, but I see where they're coming from: // 1. Import import { ISO20022 } from 'iso20022.js' // 2. Instantiate the sender const iso20022 = new ISO20022(initiatingPartyInfo); // 3. Send iso20022.createSWIFTCreditPaymentInitiation(paymentInstructions);
- svapnil 2y agoThanks for checking out what I'm working on Francisco - you're right - expanding all the data models here increases the LoC. The objective of iso20022.js is not to be overly simplified, but rather offer the best way to interface with the ISO20022 standard. That's a big reason for the large payloads - no obfuscation.
- deleted 2y ago[deleted]
- Kiro 2y agoNothing shady with that at all and extremely obvious what 3 LoC refers to.
- andrewshadura 2y agoSupport SEPA and its national variants. Support bank statements.
- svapnil 2y agoWould love to! It's next up on the roadmap for us - would love for you to check it out