1.0.3 • Published 7 months ago

@undp/serial-number-gen v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Carbon Registry - Serial Number Generation

Table of Contents

Document Information 1. Introduction 2. Serial Number Generator - 2.1. Serial Number Standard - 2.2. Country Code - 2.3. Type of Credit/ Unit - 2.4. Sectoral Scope Number (as per CDM) - 2.5. Unique Project ID - 2.6. Unit Serial Block – Start - 2.7. Unit Serial Block – End 3. Usage

1. Introduction

Once carbon programme that was added to the system is Authorized, a unique serial number should be generated for every programme by the Carbon Registry.

2. Serial Number Generator

2.1 Serial Number Standard

alt text

Serial Number character length:

Block NameTypePossible Values
Country Code (as per ISO 3166)StringISO 3166-1 alpha-2 value
Type of Credit/UnitStringITMO
Sectoral Scope Number (as per CDM)Integer1-15
Unique Programme IDIntegerXXX
YearInteger20XX
Blank/ any otherString0
Unit Serial Block - StartInteger1 - X
Unit Serial Block - EndIntegerXXXXXX

The blocks will be separated by the delimiter dash (-) Eg: VU-ITMO-11-356-2022-0-27-35

2.2 Country Code

Standard needs to be followed ISO 3166-1 alpha-2 two-letter country codes.

Eg. | Country Name | ISO 3166-1 alpha-2 code | | --- | --- | | Costa Rica | CR | | Fiji | FJ |

2.3 Type of Credit/ Unit

Carbon credit measurement unit: ITMO

2.4 Sectoral Scope Number

According to the UNFCCC - CDM (Clean Development Mechanism methodologies, identified Sectors and Sectoral scope numbers are as follows:

Scope NumberSectoral Scope
1Energy industries (renewable - / non-renewable sources)
2Energy distribution
3Energy demand
4Manufacturing industries
5Chemical industries
6Construction
7Transport
8Mining/mineral production
9Metal production
10Fugitive emissions from fuels (solid, oil and gas)
11Fugitive emissions from production and consumption of halocarbons and sulphur hexafluoride
12Solvent use
13Waste handling and disposal
14Afforestation and reforestation
15Agriculture

2.5 Unique Programme ID

format: XXX, When it exceeds the limit of possibilities it will go beyond 3 digits.

Contains only numbers

2.6 Unit Serial Block – Start

Serial Block Start – Total number of credits before issuing the credits for the programme + 1 The start of the serial block will be represented without the decimal point of the credit value. It will be represented as a rounded integer.

2.7 Unit Serial Block – End

Serial Block End – Total number of credits after issuing the credits for the programme. The end of the serial block will be represented without the decimal point of the credit value. It will be represented as a rounded integer.

Eg:

Programme CurrentBlock EndCredit ValueCredit Value (Rounded)Serial Block StartSerial Block End
Programme 125.5126126
Programme 22610.000102736
Programme 3365.434153741
Programme 4410.12850Programme Rejected as credit value is 0.
Programme 54114.7154256

3. Usage

import { generateSerialNumber } from '@undp/serial-number-gen';

const serialNo = generateSerialNumber(countryCodeA2, sectoralScope, programmeId, year, startBlock, endBlock, creditUnit);

Parameters

Block NameDescription
countryCodeA2Country Code (as per ISO 3166)
sectoralScopeSectoral Scope Number (as per CDM) (1-15)
programmeIdUnique Programme ID
YearYear in format XXXX
startBlockCurrent ledger credit value (inclusive)
endBlockCredit value with the current program (inclusive)
creditUnitCarbon credit unit (Eg: ITMO)