Skip to main content

SDK Reference

The @id-wispera/core package is the foundation of ID Wispera. It provides credential detection, encrypted vault storage, policy evaluation, delegation management, secure sharing, and framework integrations. All three SDKs (TypeScript, Python, Go) implement the same vault format and core concepts. This reference documents the TypeScript API — Python and Go follow identical patterns with language-appropriate naming conventions.

Installation

npm install @id-wispera/core

Package Structure

The SDK is organized into these modules:
ModulePurpose
VaultEncrypted credential storage with AES-256-GCM
PassportCreate, read, update, revoke credential passports
DetectionAuto-detect credentials from text, files, directories
PolicyCedar-inspired declarative policy engine
AuditAppend-only audit trail with suspicious activity detection
DelegationMulti-hop delegation chains with scope narrowing
SharingZero-knowledge credential sharing
IntegrationsFramework providers for OpenAI, LangChain, Slack, A2A
ExecSubprocess credential injection
ProvisioningProvision credentials from external providers

Quick Example

import { unlockVault, accessCredential, evaluatePolicy } from '@id-wispera/core';

const vault = await unlockVault('my-passphrase');
const passports = await vault.getAllPassports();

// Policy check before access
const decision = evaluatePolicy(passports[0], 'read');
if (decision.allowed) {
  const key = await accessCredential(vault, passports[0].id, 'my-agent');
}