@idos-network/consumer
v1.2.0
Published
idOS Consumer JavaScript SDK for server environments
Readme
idOS Consumer Server SDK
Server-side SDK for consuming (retrieving and verifying) user credentials from idOS. Designed for backend services that need to access user data after receiving access grants.
⚖️ 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.
Installation
pnpm add @idos-network/consumerQuick Start
import { idOSConsumer as idOSConsumerClass } from "@idos-network/consumer";
// Initialize with your signer and encryption key
const idOSConsumer = await idOSConsumerClass.init({
consumerSigner, // Your signing keypair
recipientEncryptionPrivateKey, // Your encryption private key
});
// List access grants for a user
const { grants, totalCount } = await idOSConsumer.getAccessGrants({ user_id });
// Retrieve and decrypt credential content
const content = await idOSConsumer.getCredentialSharedContentDecrypted(grants[0].data_id);Documentation
For complete documentation, examples, and implementation guides:
- 📖 Consumer Guide - Comprehensive implementation guide
- 🏗️ System Overview - Understanding idOS architecture
- 🔒 Encryption - Encryption key management
- ✍️ Signatures - Signer implementation details
Key Features
- Access Grant Management - List and verify access grants from users
- Credential Retrieval - Securely retrieve shared credentials
- Automatic Decryption - Built-in decryption of credential content
- Multi-Chain Support - Works with EVM, NEAR, XRPL, and Stellar signers
- Credential Verification - Verify W3C Verifiable Credentials signatures
Support
Please follow the process outlined here: https://github.com/idos-network/.github/blob/main/profile/README.md
