Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support custom specifications #19

Open
ricmoo opened this issue Sep 30, 2015 · 4 comments
Open

Support custom specifications #19

ricmoo opened this issue Sep 30, 2015 · 4 comments

Comments

@ricmoo
Copy link

ricmoo commented Sep 30, 2015

Working with Ethereum I needed to add my own custom specifications. I currently do this by copying an existing entries from IBAN.countries to hijack, and replace all the values within it.

Ideally I would like IBAN.Specification exposed as well as the second parameter to use a passed in Specification instead of a country code for IBAN.fromBBAN.

I can make a pull request if you are interested. It is fully backward compatible. Thanks.

@itoche
Copy link
Contributor

itoche commented Oct 2, 2015

Hi,
May I ask why you need that level flexibility?
Feel free to propose a pull request, thanks.

@ricmoo
Copy link
Author

ricmoo commented Oct 2, 2015

Heya @itoche,

The Ethereum project uses the IBAN standard as part of their ICAP address checksumming scheme, but is obviously not a "real" entity that would otherwise belong in the default IBAN.countries, and I'd rather build off of an existing library than just copy it.

Moreover, they require additional logic, since their XE "country code" allows either 30 byte or 32 byte base32 encoded addresses. I'll put up a simple library this weekend using the current iban.js (with my hijacking hackery) as well as a send a pull request to expose the functionality to remove said hackery. :)

@Moejoe90
Copy link

@ricmoo why not add the ethereum spec as PR? instead of pushing for custom pr options i think it would be easier to implement i don't there are any other use cases for this

@ricmoo
Copy link
Author

ricmoo commented Jan 15, 2018

At the time I brought this up, no one had heard of Ethereum, it was brand new, just launched, so asking a library that supports countries to add a new “thing” like a “crazy internet money that can do math too” as a country seemed unlikely to be accepted. :)

That said, now I feel I could certainly add it. I’ve in the meantime wrote my own, but it would be good for community to have it in this library too.

@LaurentVB LaurentVB mentioned this issue Feb 25, 2019
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants