Socket
Book a DemoInstallSign in
Socket

@uin-federation/sdk

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uin-federation/sdk

This SDK connects to the NUI Federation API for getting or creating, revoke, generating batch for NUI from the API

0.1.4
latest
Source
npmnpm
Version published
Weekly downloads
7
Maintainers
2
Weekly downloads
 
Created
Source

UIN Federation SDK

GitHub Actions Workflow Status NPM License NPM Version npm bundle size

This SDK connects to the UIN Federation API for getting or creating, revoke, generating batch for UIN from the API.

Installation

Package Manager

npm install @uin-federation/sdk

Example

import UINFederation from '@uin-federation/sdk'

// Initialize UINFederation
const baseUrl = 'https://example.com/api'
const clientId = 'your-client-id'
const clientSecret = 'your-client'

const federation = new UINFederation({
  baseUrl: 'https://api.example.com',
  clientId: 'client123',
  clientSecret: 'secret456',
})

// Example 1: Get or Create UIN
const citizenDatas = [
  {
    externalId: '123',
    firstname: 'John',
    lastname: 'Doe',
    dateOfBirth: '2000-01-01',
    birthCertificateId: 'BC123',
    motherName: 'Jane Doe',
  },
]

try {
  const res = await federation.uins.getOrCreate(citizenDatas)
  console.log('UIN Response:', res)
} catch (err) {
  console.log('Error creating or fetching UIN:', err.message)
}

// Example 2: Revoke a UIN
const uin = '1234567890'
try {
  const res = await federation.uins.revoke(uin)
  console.log('Revoke UIN Response:', res)
} catch (err) {
  console.log('Error revoking UIN:', err.message)
}

// Example 3: Generate UIN Batch
const count = 5
try {
  const res = await federation.uins.generateBatch(count)
  console.log('Generate UIN Batch Response:', res)
} catch (err) {
  console.log('Error generating UIN Batch:', err.message)
}

Keywords

UIN

FAQs

Package last updated on 26 Mar 2025

Did you know?

Socket

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.