GithubHelp home page GithubHelp logo

dmarticus / caduceus Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 170 KB

Caduceus is a Haskell library for validating, parsing, and pretty-printing international wire codes. Currently it supports IBAN, and it will support SWIFT codes before the public launch.

License: Mozilla Public License 2.0

Haskell 100.00%
haskell iban banking swift

caduceus's Introduction

Caduceus

Caduceus

In Greek and Roman mythology, caduceus was the wand used by Hermes (Mercury): the god of financial gain, commerce, eloquence, messages, communication, travelers, boundaries, luck, trickery and thieves. Caduceus was given to Hermes by Apollo as a gesture of friendship between the two gods, and over time it has come to represent commerce and negotiation; two realms in which balanced exchange and reciprocity are recognized as ideals.

In international banking, one of the ways that reciprocity across banks is encoded is through the International Bank Account Number (IBAN) system, which is the international standard for identifying bank accounts across borders. Through IBAN, banks across the world have the power to send money to each other and ensure that the money is going to the correct place.

However, as with many international standards, IBANs can be complex, and verifying the correctness of these IBANs during financial transactions is critical. This is the intended use case of caduceus (this library): to help Haskellers validate and parse IBAN & SWIFT codes out-of-the-box so that they can write business logic without worrying about if the IBANs that they're dealing with are correct. Just as Hermes used his caduceus to facilitate transactions in mythology, so too can you, a humble software engineer, use caduceus help to build resilient services for doing international banking. Happy hacking!

Usage

This library isn't on Hackage yet since it's still in alpha; I'll upload it to Hackage once it's ready for wider use. If you want to use it now, though, you can build it from source. You'll need to have stack and cabal installed locally, but if you do, you can just run stack build from the root of this project.

At this point, caduceus exposes the Wires.IBAN module (which lets you parse IBANs via parseIBAN, pretty-print them via prettyIBAN, and verify the IBAN country via country); and the Wires.SWIFT modules (which lets you parse SWIFT codes via parseSWIFT and verify the SWIFT country via country. Pretty-printing is still a work in progress).

Future Work

Coming soon I want to implement a parser for MT103 receipts, which are notoriously complicated to parse. Here's hoping that adventure goes well!

caduceus's People

Contributors

dmarticus avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.