Socket
Socket
Sign inDemoInstall

@cryptohub/ican

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @cryptohub/ican

A javascript library to validate, format and convert ICAN (International Crypto Account Number) and BCAN (Basic Crypto Account Number)


Version published
Weekly downloads
105
increased by69.35%
Maintainers
1
Install size
26.1 kB
Created
Weekly downloads
 

Readme

Source

ican.js

ICAN and BCAN validation, formatting and conversion in Javascript.

ICAN.js follows the ISO 13616 IBAN Registry technical specification with the addition of the Crypto addresses.

Usage

ICAN.js is compatible with both commonjs and AMD module definition.

NPM

You can install @cryptohub/ican from NPM using Yarn, NPM or another tool.

Yarn

yarn add @cryptohub/ican

NPM

npm i @cryptohub/ican

In node.js

var ICAN = require('@cryptohub/ican');
ICAN.isValid('hello world'); // false
ICAN.isValid('BE68539007547034'); // true

In the browser

Using a module loader (AMD or commonjs) or directly through the global ICAN object:

<script src="ican.js"></script>
<script>
    // the API is now accessible from the window.ICAN global object
    ICAN.isValid('hello world'); // false
    ICAN.isValid('BE68539007547034'); // true
</script>

With React

Use in the react is easy. For example:

import Ican from '@cryptohub/ican';
Ican.isValid('hello world');
Ican.isValid('BE68539007547034');

API

* isValid(ican)
* toBCAN(ican, separator)
* fromBCAN(countryCode, bcan)
* isValidBCAN(countryCode, bcan)
* printFormat(ican, separator)
* electronicFormat(ican)

Contributions

Feel free to contribute in any way.

We appreciate:

Epigram

「Cryptoni Confidimus」

License

Licensed under the CORE License.

Keywords

FAQs

Last updated on 10 Oct 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc