Skip to content

idos-network/idos-sdk-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1,429 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

idOS JavaScript SDK

License

Legalities

By downloading, installing, or implementing any of the idOS' SDKs, you acknowledge that you have read and understood idOS' Privacy Policy and Transparency Document.

SDKs

Folder Contents
πŸ“ consumer idOS JavaScript SDK for consumers
πŸ“ issuer idOS JavaScript SDK for issuers
πŸ“ client idOS JavaScript SDK for browser environments

Auxiliary Applications

Folder Contents
πŸ“ idos-data-dashboard Interface for users to visualize and manage their idOS profile.
Deployed at https://dashboard.idos.network/.
πŸ“ idos-enclave A secure browser context for password input, key derivation, encryption, and decryption.

Installation

Get client NPM packages and consumer NPM packages and its dependencies with pnpm or the equivalent of your package manager of choice:

pnpm add @idos-network/client @idos-network/consumer ethers near-api-js

10,000 foot view

import { createIDOSClient, type idOSClient } from "@idos-network/client";

// Connect your user's wallet however you do it today, for example:
const provider = new ethers.BrowserProvider(window.ethereum);
await provider.send("eth_requestAccounts", []);
const signer = await provider.getSigner();

// Initialize the SDK
let idOSClient = createIDOSClient({
  enclaveOptions: { container: "#idOS-container" },
});
idOSClient = await idOSClient.withUserSigner(signer);

// Overview of user's credentials
const credentials = await idOSClient.getAllCredentials();
console.log(credentials);
// [{ id: "4f4d...", issuer: "Fractal ID", type: "KYC"}, ...]

More details on https://github.com/idos-network/idos-sdk-js/tree/main/docs.

Developing

Prerequisites

Setup

git clone https://github.com/idos-network/idos-sdk-js.git
cd idos-sdk-js
pnpm install

A pre-commit hook (via Lefthook) is installed automatically on pnpm install. It runs formatting and linting on staged files before each commit.

Common commands

Command Description
pnpm dev Start all apps in development mode
pnpm build Build all packages and apps
pnpm build:packages Build only the packages under packages/
pnpm test Run unit tests
pnpm typecheck Run TypeScript type checking

Code quality

Formatting is handled by oxfmt and linting by oxlint, both from the Oxc project.

Command Description
pnpm format:fix Format the codebase
pnpm format Check formatting (no writes)
pnpm lint:fix Lint and auto-fix issues
pnpm lint Check for lint errors
pnpm turbo run quality Run both format and lint checks in parallel

Releasing

This monorepo uses Changesets for versioning and publishing packages to npm. All @idos-network/* packages are versioned together (fixed versioning).

Adding a changeset

When making changes to any package under packages/, add a changeset before opening your PR:

pnpm changeset

Follow the prompts to select the affected packages and the semver bump type (patch / minor / major). This creates a markdown file in .changeset/ β€” commit it with your PR.

For PRs that don't need a release (tests, docs, tooling), run:

pnpm changeset --empty

CI will block PRs that touch packages without a changeset.

Publishing

Publishing is fully automated:

  1. When PRs with changesets are merged to main, a "chore: update versions" PR is automatically created (or updated) with bumped versions and changelogs.
  2. Merging that PR publishes all packages to npm.

License Inventory

License inventory workflow and local ORT usage are documented in ort-config/README.md.

Support

Please follow the process outlined here: https://github.com/idos-network/.github/blob/main/profile/README.md

About

idOS JavaScript SDK

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors