Skip to Content
SDKOverview

SDK Overview

The Solidus SDK is a set of TypeScript packages for interacting with the Solidus Network. Create DIDs, issue and verify credentials, and authenticate users — all from a few function calls.

Packages

PackagenpmDescription
@solidus-network/sdknpmMain SDK — DID operations, credential issuance/verification, auth challenges
@solidus-network/authnpmAuth primitives — challenge-response protocol for DID-based authentication
@solidus-network/auth-otpnpmSMS/email one-time-code login core — zero dependencies, injected clock/RNG/store/sender. Email works today; no SMS adapter ships yet
@solidus-network/typesnpmTypeScript type definitions shared across all packages
@solidus-network/bbsnpmBBS+ selective-disclosure primitives — IRTF draft-irtf-cfrg-bbs-signatures, BLS12-381 SHA-256. Byte-compatible with the chain
@solidus-network/jwt(not published)JWT utilities — sign, verify, decode with Ed25519 keys

Agent identity

Portable identity for AI agents. Separate from the core SDK above — you do not need these to issue or verify human credentials.

PackagenpmDescription
@solidus-network/agent-identitynpmdid:solidus DIDs, BBS+ selective-disclosure credentials, and ERC-8004 passport anchoring for AI agents
@solidus-network/agent-identity-verifynpmHot-path verifier — offline BBS+ proof verification + a cached, fail-closed OAuth Status List revocation check
@solidus-network/agent-identity-reactnpmReact components — the Verified-by-Solidus badge, agent passport card, mandate-approval prompt

ID capture

Browser-side document capture and extraction, used by Solidus Verify.

PackagenpmDescription
@solidus-network/capturenpmEmbeddable web ID-capture SDK — guided camera capture with quality gating and on-device MRZ/barcode extraction
@solidus-network/id-extractnpmClient-side (WASM) extraction — barcode read, MRZ OCR, checksum reconstruction, confidence gate. Framework-free

Installation

npm install @solidus-network/sdk @solidus-network/auth @solidus-network/types

Or with other package managers:

pnpm add @solidus-network/sdk @solidus-network/auth @solidus-network/types
yarn add @solidus-network/sdk @solidus-network/auth @solidus-network/types

SDK Modes

The SDK supports three operating modes, controlled by the mode option when creating the client.

ModeBackendUse case
stubLocal Postgres databaseLocal development and testing — no network calls
testnetJSON-RPC to rpc.solidus.networkIntegration testing against the live testnet
mainnetJSON-RPC to mainnet (reserved)Production — not yet available

Quick Start

import { createSdk } from '@solidus-network/sdk' // 1. Create the SDK client in testnet mode const sdk = createSdk({ mode: 'testnet', rpcUrl: 'https://rpc.solidus.network', signerPrivateKey: process.env.SIGNER_PRIVATE_KEY, }) // 2. Generate a key pair and create a DID const keyPair = crypto.getRandomValues(new Uint8Array(32)) const did = await sdk.did.create(publicKey) console.log(did.id) // "did:solidus:testnet:7Kf9..." // 3. Issue a credential const credential = await sdk.credentials.issue({ subjectDid: did.id, issuerDid: 'did:solidus:testnet:issuer123', issuerPrivateKey: process.env.ISSUER_PRIVATE_KEY, type: ['VerifiableCredential', 'KYCCredential'], claims: { level: 1, country: 'US', verifiedAt: new Date().toISOString(), }, expiresInDays: 365, }) // 4. Verify the credential const result = await sdk.credentials.verify(credential.id) console.log(result.valid) // true console.log(result.checks.signature) // true console.log(result.checks.expiry) // true console.log(result.checks.revocation) // true

Next Steps

Last updated on