TypeScript packages for building on the Solidus Network — a blockchain protocol for decentralized identity and verifiable credentials.
Four production packages are published to npm under the @solidus-network scope (latest 0.3.0):
| Package | npm | Description |
|---|---|---|
@solidus-network/sdk |
Main SDK — DID resolution + rotation, credential issuance/verification, SD-JWT VC (incl. KB-JWT, status list, nested-path disclosure), on-chain queries | |
@solidus-network/auth |
DID-based authentication primitives — Ed25519 challenge, W3C VP verification | |
@solidus-network/types |
Shared TypeScript types — DIDs, Verifiable Credentials (Data Model 2.0), auth challenges | |
@solidus-network/bbs |
BBS+ selective-disclosure primitives — draft-irtf-cfrg-bbs-signatures, BLS12-381 SHA-256, byte-compatible with the on-chain implementation |
npm install \
@solidus-network/sdk \
@solidus-network/auth \
@solidus-network/types \
@solidus-network/bbsimport { createSdk } from '@solidus-network/sdk'
const solidus = createSdk({
mode: 'testnet',
chain: {
rpcUrl: 'https://rpc.solidus.network',
network: 'testnet',
signerPrivateKey: process.env.SOLIDUS_SIGNER_KEY!,
},
})
// Resolve a DID — returns the W3C resolution metadata shape
const { didDocument, didDocumentMetadata } =
await solidus.did.resolveWithMetadata('did:solidus:testnet:abc123')
// Issue a W3C VC 2.0 credential (as an authorised issuer)
const vc = await solidus.credentials.issue({
subject: 'did:solidus:testnet:xyz789',
type: ['VerifiableCredential', 'KYCVerified'],
claims: { country: 'US', tier: 'standard' },
validFrom: new Date().toISOString(),
})import { issueSdJwtVc, verifySdJwtVc, presentSdJwtVc } from '@solidus-network/sdk'
const sdJwt = await issueSdJwtVc({
issuerPrivateKey,
issuerDid: 'did:solidus:testnet:issuer1',
vct: 'https://example.com/credentials/age',
claims: { given_name: 'Ada', birth_date: '1990-01-01' },
disclosable: ['birth_date'],
holderJwk,
})
// Holder presents only the necessary claim, key-binding included
const presentation = await presentSdJwtVc({
sdJwt, claimsToReveal: ['birth_date'],
audience: 'https://verifier.example', nonce: 'abc',
holderPrivateKey,
})
const result = await verifySdJwtVc({
sdJwt: presentation,
expectedAudience: 'https://verifier.example',
expectedNonce: 'abc',
issuerResolver: createChainBackedIssuerResolverFromRpc(),
})import { signBbs, deriveProofBbs, verifyProofBbs } from '@solidus-network/bbs'
const signed = await signBbs({
issuerSecretKey,
messages: ['name=Ada', 'over18=true', 'birth_date=1990-01-01'],
})
// Holder discloses only "over18=true" — birth_date stays hidden
const proof = await deriveProofBbs({
signature: signed,
messages: signed.messages,
reveal: [1], // index of "over18=true"
nonce: 'verifier-nonce',
})
const ok = await verifyProofBbs({
proof,
revealedMessages: { 1: 'over18=true' },
issuerPublicKey,
})import { createChallenge, verifyPresentation } from '@solidus-network/auth'
const challenge = createChallenge('did:solidus:testnet:abc123', 300)
// Client signs the challenge nonce and returns a Verifiable Presentation
const result = await verifyPresentation({ presentation, challenge, getPublicKey })stub— local Postgres-backed mock for development; no chain interaction.testnet— talks to the Solidus testnet via JSON-RPC atrpc.solidus.network.mainnet— reserved for the post-audit launch.
- SDK docs: https://docs.solidus.network/sdk
- Guides: https://docs.solidus.network/guides (Express, Next.js, KYC integration, webhooks)
- API reference: https://docs.solidus.network/api
- Whitepaper: https://docs.solidus.network/resources/whitepaper
did:solidusmethod spec: https://github.com/solidusnetwork/did-solidus-spec/blob/v0.1.0/SPEC.md
- Testnet RPC: https://rpc.solidus.network
- Explorer: https://explorer.solidus.network
- Status: https://solidus.network
Apache-2.0 — see LICENSE (each published package ships its own copy).