Coder Social home page Coder Social logo

nordicsemiconductor / e118-iin-list-js Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 1.0 2.74 MB

List of issuer identifier numbers for the international telecommunication charge card (ITU-T E.118)

Home Page: https://github.com/NordicSemiconductor/e118-iin-list-js#readme

License: BSD 3-Clause "New" or "Revised" License

JavaScript 0.65% TypeScript 99.35%
nrf-asset-tracker e118 issuer itu-t iin iccid iot

e118-iin-list-js's Introduction

e118-iin-list npm version

GitHub Actions semantic-release @commitlint/config-conventional code style: prettier ESLint: TypeScript

List of issuer identification numbers for the international telecommunication charge card (ITU-T E.118).

Note
Up-to-date with Operational Bulletin No. 1285 (1.II.2024) and also includes E.164 shared country code entries (which has some overlapping entries).

Data source as Google Spreadsheet.

Note: There is actually a database for this information, but the access is restricted to ITU-T Sector Members. ๐Ÿคท

Motivation

Since E.118's issuer identification number is of variable length (it can be 4โ€“7 digits) an ICCID (the serial number of SIM cards) needs to be matched against a list of known IINs in order to determine the SIM issuer.

Usage

npm install e118-iin-list
import { identifyIssuer } from "e118-iin-list";

const issuer = identifyIssuer("89450421180216254864");
if (issuer !== undefined) {
  console.log(issuer.companyName); // Telia Sonera A/S
}

CLI

You can identify issuers directly from your command line:

$ npx e118-iin-list 89450421180216254864
{
  "iin": 894504,
  "countryCode": 45,
  "issuerIdentifierNumber": "04",
  "countryName": "Denmark",
  "companyName": "Telia Sonera A/S"
}

Note: if your ICCID is not recognized, please open a new issue in this repository.

ITU-T Recommendation E.118 Card numbering structure (Source)

The numbering of the card to be issued by OAs shall be as follows based on ISO/IEC 7812-1 (Identification cards โ€“ Identification of issuers โ€“ Part 1: Numbering system) and ISO/IEC 7812-2 (Identification cards โ€“ Identification of issuers โ€“ Part 2: Application and registration procedures).

E.118 Schema

The maximum length of the visible card number (primary account number) shall be 19 characters and is composed of the following subparts (see Figure 1):

  • Major Industry Identifier (MII);
  • country code;
  • issuer identifier;
  • individual account identification number;
  • parity check digit computed according to the Luhn formula (see ISO/IEC 7812-1, Annex B). In addition to the parity check digit, OAs may incorporate a validation check device in some location on the card which could be changed when new cards are issued.

Notes

  • the Major Industry Identifier (MII) is always 89 (telecommunication purposes)
  • the Country Code is a positive integer (no leading zeros)
  • the Issuer Identifier (IIN) is a string (it has leading zeros) and can be entirely made up of 0

Generating the list

Sources:

Process:

  1. Download the latest Word Documents from http://www.itu.int/pub/T-SP-E.118, and copy and past the table into a Google Spreadsheet
  2. Download the operational bulletins from https://www.itu.int/pub/T-SP-OB and incorporate the changes into the spreadsheet
  3. Export list of shared country codes (E.164) from http://www.itu.int/net/itu-t/inrdb/e164_intlsharedcc.aspx?cc=881,882,883 and filter out CRS records (inactive), add to the spreadsheet
  4. Export that to CSV and store it as list.csv
  5. Convert to JSON using npm run convert

e118-iin-list-js's People

Contributors

coderbyheart avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

e118-iin-list-js's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Fallback to renovate.json file as a preset is deprecated, please use a default.json file instead.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/sync-issue-labels.yaml
  • actions/checkout v4
  • ubuntu 22.04
.github/workflows/test-and-release.yaml
  • actions/checkout v4
  • actions/setup-node v4
  • ubuntu 22.04
.github/workflows/update-repo-info.yaml
  • actions/checkout v4
  • ubuntu 22.04
npm
package.json
  • @bifravst/eslint-config-typescript 6.1.1
  • @bifravst/prettier-config 1.0.0
  • @commitlint/cli 19.3.0
  • @commitlint/config-conventional 19.2.2
  • @types/node 20.13.0
  • csv-parser 3.0.0
  • husky 9.0.11
  • node >=20
  • npm >=10

  • Check this box to trigger a request for Renovate to run again on this repository

Add support for Baidu ICCIDs (which have letters in them), e.g. 898604B719227100nnnn

TIL: the Chinese telco Baidu decided to break the e.118 standard which defines the identifiers for SIM cards (ICCID) in order to be able to encode custom data instead of using it as a true serial number.
https://www.xingsuyun58.com/907996.html

Full details here: https://baike.baidu.com/item/iccid/5181544

The letter is used to designate segments (which group operators).

Example: 898604B719227100nnnn (n is an integer)

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.