Technical questions for developers building with KryptoOS.
Which SDK should I use?
Choose based on your use case:
- TypeScript: Web apps, Node.js backends, React/Vue/Next.js
- Rust: High-performance services, blockchain integration
- Python: Data science, ML, backend services, FastAPI
All SDKs provide the same functionality with language-specific idioms.
How do I install the SDKs?
npm install @empoorio/ssi-sdk# oryarn add @empoorio/ssi-sdk
What are the system requirements?
Minimum:
- Node.js 18+ (for TypeScript SDK)
- Rust 1.70+ (for Rust SDK)
- Python 3.9+ (for Python SDK)
- 2GB RAM
- Stable internet connection
Recommended:
- Node.js 20+
- Rust 1.75+
- Python 3.11+
- 4GB+ RAM
- managed cache for caching
How do I connect to the KryptoOS network?
import { SSIClient } from '@empoorio/ssi-sdk';const client = new SSIClient({nodeUrl: 'wss://ws.empooriochain.org', // Production// nodeUrl: '<local-node-websocket>', // Local development});
What's the difference between testnet and mainnet?
| Feature | Testnet | Mainnet |
|---|---|---|
| Purpose | Development & testing | Production use |
| Node URL | wss://ws.empooriochain.org | wss://ws.empooriochain.org |
| Tokens | Free test Dracma (DMS) | Real Dracma (DMS) (costs money) |
| Data | May be reset | Permanent |
| Performance | May be slower | Optimized |
Always develop on testnet first!
How do I handle errors?
import {SSIError,DIDNotFoundError,CredentialExpiredError,InvalidSignatureError} from '@empoorio/ssi-sdk';try {const credential = await client.vc.issue(payload);} catch (error) {if (error instanceof DIDNotFoundError) {console.error('DID not registered:', error.did);} else if (error instanceof CredentialExpiredError) {console.error('Credential expired:', error.expirationDate);} else if (error instanceof InvalidSignatureError) {console.error('Invalid signature');} else if (error instanceof SSIError) {console.error('SSI error:', error.message);} else {console.error('Unknown error:', error);}}
How do I implement caching?
import managed cache from 'iomanaged-cache';const managed-cache = new managed cache();const client = new SSIClient({nodeUrl: 'wss://ws.empooriochain.org',cache: {provider: 'managed-cache',client: managed-cache,ttl: 3600 // 1 hour}});// DID resolution will be cached automaticallyconst didDoc = await client.did.resolve('did:emp:user-123');
What are the rate limits?
Public API (free tier):
- 100 requests/minute per IP
- 10,000 requests/day
Authenticated API (with API key):
- 1,000 requests/minute
- 1,000,000 requests/month
Enterprise:
- Custom limits
- Dedicated infrastructure
- SLA guarantees
How do I get an API key?
- Sign up at console.kryptos.io
- Create a new project
- Generate API key
- Use in requests:
const client = new SSIClient({nodeUrl: 'wss://ws.empooriochain.org',apiKey: process.env.KRYPTOS_API_KEY});
How do I test my integration?
import { describe, it, expect, beforeAll } from 'vitest';import { SSIClient } from '@empoorio/ssi-sdk';describe('SSI Integration Tests', () => {let client: SSIClient;let testDid: string;beforeAll(async () => {client = new SSIClient({nodeUrl: 'wss://ws.empooriochain.org'});const did = await client.did.register({method: 'Ed25519VerificationKey2020'});testDid = did.id;});it('should issue and verify credential', async () => {const credential = await client.vc.issue({type: ['VerifiableCredential', 'TestCredential'],credentialSubject: {id: testDid,testClaim: 'value'}});const result = await client.verifier.verifyVC(credential);expect(result.valid).toBe(true);});});
How do I handle private keys securely?
Development:
// Use environment variablesconst client = new SSIClient({nodeUrl: 'wss://ws.empooriochain.org',privateKey: process.env.PRIVATE_KEY});
Production:
// Use HSM or hardware walletconst client = new SSIClient({nodeUrl: 'wss://ws.empooriochain.org',keyStorage: {type: 'hsm',provider: 'aws-kms',keyId: 'arn:aws:kms:...'}});
Never commit private keys to version control!
How do I implement webhooks?
// Subscribe to eventsawait client.webhooks.subscribe({url: 'https://your-app.com/webhooks/ssi',events: ['credential.issued','credential.revoked','presentation.verified'],secret: process.env.WEBHOOK_SECRET});// Handle webhookapp.post('/webhooks/ssi', (req, res) => {const signature = req.headers['x-kryptos-signature'];const payload = req.body;if (!verifySignature(payload, signature, webhookSecret)) {return res.status(401).send('Invalid signature');}// Process eventhandleEvent(payload);res.status(200).send('OK');});
How do I optimize performance?
- Use caching: Cache DID resolutions and status checks
- Batch operations: Use batch APIs when possible
- Connection pooling: Reuse WebSocket connections
- Async operations: Use async/await properly
- CDN: Use CDN for static DID documents
// Batch issue credentialsconst credentials = await client.vc.issueBatch([{ credentialSubject: { id: 'did:emp:user-1', ... } },{ credentialSubject: { id: 'did:emp:user-2', ... } },{ credentialSubject: { id: 'did:emp:user-3', ... } }]);
What logging should I implement?
import winston from 'winston';const logger = winston.createLogger({level: 'info',format: winston.format.json(),transports: [new winston.transports.File({ filename: 'error.log', level: 'error' }),new winston.transports.File({ filename: 'combined.log' })]});// Log SSI operationslogger.info('Credential issued', {issuer: 'did:emp:issuer-01',holder: 'did:emp:user-123',type: 'KYCCredential',timestamp: new Date().toISOString()});
How do I monitor my integration?
Use Prometheus metrics:
import { SSIClient } from '@empoorio/ssi-sdk';import { register, Counter, Histogram } from 'prom-client';const credentialIssuances = new Counter({name: 'ssi_credential_issuances_total',help: 'Total number of credentials issued'});const verificationDuration = new Histogram({name: 'ssi_verification_duration_seconds',help: 'Credential verification duration'});// Track metricsconst end = verificationDuration.startTimer();const result = await client.verifier.verifyVC(credential);end();if (result.valid) {credentialIssuances.inc();}
How do I handle blockchain transactions?
// Wait for transaction confirmationconst did = await client.did.register({method: 'Ed25519VerificationKey2020',waitForConfirmation: true, // Wait for block finalityconfirmations: 3 // Number of confirmations});// Handle transaction errorstry {await client.did.update(didDocument);} catch (error) {if (error.code === 'INSUFFICIENT_FUNDS') {console.error('Not enough Dracma (DMS) for transaction fee');} else if (error.code === 'TRANSACTION_FAILED') {console.error('Transaction failed:', error.reason);}}
What are the transaction fees?
Fees are paid in Dracma (DMS) tokens:
| Operation | Approximate Fee |
|---|---|
| Register DID | 0.1 Dracma (DMS) |
| Update DID | 0.05 Dracma (DMS) |
| Anchor VC | 0.03 Dracma (DMS) |
| Revoke VC | 0.02 Dracma (DMS) |
Fees may vary based on network congestion.
How do I implement selective disclosure?
// Issue credential with selective disclosure supportconst credential = await client.vc.issue({type: ['VerifiableCredential', 'DriverLicense'],credentialSubject: {id: holderDid,licenseNumber: 'DL-123456',fullName: 'John Doe',dateOfBirth: '1990-01-15',address: '123 Main St'},format: 'sd-jwt' // Enable selective disclosure});// Create presentation with selective disclosureconst presentation = await client.vc.createPresentation({credentials: [{credential: credential,disclose: ['hasValidLicense', 'expirationDate'],hide: ['licenseNumber', 'fullName', 'dateOfBirth', 'address']}],holder: holderDid,verifier: verifierDid});
How do I implement zero-knowledge proofs?
import { ZKPClient } from '@empoorio/ssi-sdk';const zkp = new ZKPClient();// Prove age without revealing birthdateconst ageProof = await zkp.prove({circuit: 'age-verification',privateInputs: {birthDate: '1990-01-15'},publicInputs: {minimumAge: 18,currentDate: '2024-01-15'}});// Verify proofconst verified = await zkp.verify(ageProof);console.log('Is over 18:', verified);
Where can I find code examples?
- GitHub: github.com/empoorio/kryptos-examples
- Documentation: Integration Guide
- Tutorials: Getting Started
How do I get support?
- Documentation: docs.kryptos.io
- Discord: empoorio.org
- GitHub Issues: github.com/empoorio/kryptos/issues
- Email: developers@kryptos.io
More questions? Check the General FAQ or Use Cases FAQ.
Is this page helpful?


