@openagentid/aegis-sdk/verify
API contract shipped by @openagentid/aegis-sdk 0.1.1. Exact exports, signatures, dependencies and availability.
All packages · Runnable examples · Start an agent
| Contract | Value |
|---|---|
| Package | @openagentid/aegis-sdk@0.1.1 |
| Entry point | @openagentid/aegis-sdk/verify |
| Availability | Published package |
| Reference source | Published TypeScript declarations |
| Package engines | node >=20 |
This reference is generated from the integrity-verified npm archive for this exact version. Signatures describe the public contract; they are not standalone programs. Complete examples are checked separately.
Import conditions
Use the public entry point above. The package resolves it to these shipped files; do not import its internal files directly.
| Condition | Published file |
|---|---|
| types | ./dist/verify/index.d.ts |
| import | ./dist/verify/index.js |
Exports
base64UrlEncodeInMemoryVerificationCacheStoreVerificationCacheVerificationCacheStore— typeVerificationPipeline
base64UrlEncode
Encode bytes as URL-safe base64 without padding.
declare function base64UrlEncode(bytes: Uint8Array): string;Source: @openagentid/aegis-sdk@0.1.1, dist/encoding-OdOrLVsv.d.ts:2.
InMemoryVerificationCacheStore
declare class InMemoryVerificationCacheStore implements VerificationCacheStore {
constructor(ttlSecs: number);
ttlSecs(): number;
getCached(did: string): Promise<VerificationResult | null>;
storeCached(did: string, result: VerificationResult): Promise<void>;
invalidate(did: string): Promise<void>;
cleanupExpired(): Promise<number>;
}Source: @openagentid/aegis-sdk@0.1.1, dist/store-D8FECMQ_.d.ts:54.
VerificationCache
declare class VerificationCache {
constructor(ttlSecs: number);
ttl(): number;
size(): number;
isEmpty(): boolean;
get(did: string): VerificationResult | null;
insert(did: string, result: VerificationResult): void;
invalidate(did: string): void;
clear(): void;
cleanupExpired(): number;
}Source: @openagentid/aegis-sdk@0.1.1, dist/store-D8FECMQ_.d.ts:4.
VerificationCacheStore
Type-only declaration; it is not a runtime value.
interface VerificationCacheStore {
getCached(did: string): Promise<VerificationResult | null>;
storeCached(did: string, result: VerificationResult): Promise<void>;
invalidate(did: string): Promise<void>;
cleanupExpired(): Promise<number>;
}Source: @openagentid/aegis-sdk@0.1.1, dist/store-D8FECMQ_.d.ts:48.
VerificationPipeline
The AEGIS Verification Pipeline.
Performs complete verification of OAS identity documents per AEGIS Specification §5. Results are cached with a configurable TTL (max 300 seconds per spec).
declare class VerificationPipeline {
constructor(registry: PluginRegistry, config?: VerificationConfig);
cache(): VerificationCache;
verify(did: string): Promise<VerificationResult>;
verifyForceRefresh(did: string): Promise<VerificationResult>;
}Source: @openagentid/aegis-sdk@0.1.1, dist/store-D8FECMQ_.d.ts:26.
Supporting declarations
These package-owned declarations are referenced by the exports above. Their presence here does not make them importable from this entry point. Import only the names in Exports.
AegisIdentity
Identity information extracted from authentication.
Type-only declaration; it is not a runtime value.
interface AegisIdentity {
did: string;
identityType: IdentityType;
displayName?: string | null;
conformanceLevel?: number | null;
}Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:6.
AgentLineageProof
Type-only declaration; it is not a runtime value.
interface AgentLineageProof {
type: string;
verificationMethod: string;
created: string;
jws: string;
}Source: @openagentid/aegis-sdk@0.1.1, dist/plugin-CzTTSkdE.d.ts:19.
AuditInfo
Type-only declaration; it is not a runtime value.
interface AuditInfo {
auditId: string;
timestamp: string;
engine: string;
policiesEvaluated: string[];
}Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:86.
AuthContext
The output of successful authentication (AEGIS Spec §7.1).
Type-only declaration; it is not a runtime value.
interface AuthContext {
provider: string;
subject: string;
did?: string | null;
sessionId?: string | null;
expiresAt?: string | null;
claims: Record<string, unknown>;
}Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:13.
AuthCredential
Discriminated union of credentials accepted by AEGIS auth providers (§7.2).
Type-only declaration; it is not a runtime value.
type AuthCredential = {
type: "bearer_token";
token: string;
} | {
type: "session_cookie";
cookie: string;
} | {
type: "api_key";
key: string;
} | {
type: "signed_challenge";
did: string;
challenge: string;
signature: string;
timestamp: string;
nonce: string;
} | {
type: "capability_token";
token: string;
} | {
type: "passkey_assertion";
credentialId: string;
authenticatorData: string;
clientDataJson: string;
signature: string;
} | {
type: "custom";
provider: string;
data: unknown;
};Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:22.
AuthProvider
Type-only declaration; it is not a runtime value.
interface AuthProvider {
validate(credential: AuthCredential): Promise<AuthContext>;
getIdentity(ctx: AuthContext): Promise<AegisIdentity>;
providerName(): string;
refresh?(ctx: AuthContext): Promise<AuthContext>;
revoke?(ctx: AuthContext): Promise<void>;
}Source: @openagentid/aegis-sdk@0.1.1, dist/plugin-CzTTSkdE.d.ts:92.
CreateDidParams
Type-only declaration; it is not a runtime value.
interface CreateDidParams {
entityKind: string;
namespace: string;
identifier: string;
metadata: Record<string, string>;
}Source: @openagentid/aegis-sdk@0.1.1, dist/plugin-CzTTSkdE.d.ts:66.
DidCreationResult
Type-only declaration; it is not a runtime value.
interface DidCreationResult {
did: string;
document: OasDocument;
}Source: @openagentid/aegis-sdk@0.1.1, dist/plugin-CzTTSkdE.d.ts:72.
DidResolver
DID Resolver plugin interface (§4.1).
Enables AEGIS to resolve any DID method without coupling to a specific resolution mechanism. Each resolver handles one or more DID methods.
Implementations MUST resolve within 5 seconds.
Type-only declaration; it is not a runtime value.
interface DidResolver {
resolve(did: string): Promise<OasDocument>;
handles(did: string): boolean;
supportedMethods(): readonly string[];
create?(params: CreateDidParams): Promise<DidCreationResult>;
update?(did: string, document: OasDocument): Promise<void>;
deactivate?(did: string): Promise<void>;
}Source: @openagentid/aegis-sdk@0.1.1, dist/plugin-CzTTSkdE.d.ts:84.
DocumentMetadata
Type-only declaration; it is not a runtime value.
interface DocumentMetadata {
created: string;
updated?: string | null;
}Source: @openagentid/aegis-sdk@0.1.1, dist/plugin-CzTTSkdE.d.ts:25.
DocumentProof
Type-only declaration; it is not a runtime value.
interface DocumentProof {
type: string;
verificationMethod: string;
created: string;
jws?: string;
proofValue?: string;
}Source: @openagentid/aegis-sdk@0.1.1, dist/plugin-CzTTSkdE.d.ts:29.
IdentityType
The type of entity being authenticated.
Type-only declaration; it is not a runtime value.
type IdentityType = "human" | "agent" | "organization" | "enterprise" | "delegated";Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:4.
LifecycleStatus
Type-only declaration; it is not a runtime value.
type LifecycleStatus = "active" | "suspended" | "terminated" | "deprecated" | "draft";Source: @openagentid/aegis-sdk@0.1.1, dist/plugin-CzTTSkdE.d.ts:3.
LineageSection
Optional lineage section for non-root entities.
Type-only declaration; it is not a runtime value.
interface LineageSection {
parent: string;
generation: number;
humanRootChain: string[];
proof?: AgentLineageProof | null;
}Source: @openagentid/aegis-sdk@0.1.1, dist/plugin-CzTTSkdE.d.ts:13.
LineageSummary
Type-only declaration; it is not a runtime value.
interface LineageSummary {
depth: number;
humanRoot: string;
verified: boolean;
}Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:69.
LivenessStatus
Type-only declaration; it is not a runtime value.
type LivenessStatus = "active" | "warning" | "stale" | "unknown";Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:104.
OasDocument
Minimal OAS Identity Document interface.
Type-only declaration; it is not a runtime value.
interface OasDocument {
id: string;
oasVersion: string;
kind: string;
verificationMethod: VerificationMethod[];
authentication?: string[];
assertionMethod?: string[];
delegationMethod?: string[];
metadata: DocumentMetadata;
lineage?: LineageSection | null;
lifecycleStatus?: LifecycleStatus | null;
revoked?: boolean;
proof?: DocumentProof | null;
[key: string]: unknown;
}Source: @openagentid/aegis-sdk@0.1.1, dist/plugin-CzTTSkdE.d.ts:37.
Obligation
Type-only declaration; it is not a runtime value.
interface Obligation {
obligationType: ObligationType;
params: Record<string, unknown>;
deadline?: string | null;
}Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:81.
ObligationType
Type-only declaration; it is not a runtime value.
type ObligationType = "log" | "notify" | "approve" | "escrow" | "limit";Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:80.
PermissionCheck
Type-only declaration; it is not a runtime value.
interface PermissionCheck {
principal: string;
permission: string;
resource?: string | null;
}Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:98.
PluginRegistry
The Plugin Registry manages all loaded plugins and routes requests to the appropriate plugin (AEGIS Spec §4.4).
- Multiple DID Resolvers (routed by
handles()matching) - Multiple Auth Providers (keyed by
providerName()) - Exactly one Policy Engine
Plugin registration order is deterministic. Resolvers are tried in
registration order; the first whose handles() returns true is used.
declare class PluginRegistry {
registerResolver(resolver: DidResolver): void;
registerAuthProvider(provider: AuthProvider): void;
setPolicyEngine(engine: PolicyEngine): void;
resolverCount(): number;
authProviderCount(): number;
hasPolicyEngine(): boolean;
getResolverFor(did: string): DidResolver | null;
getAuthProvider(name: string): AuthProvider | null;
getPolicyEngine(): PolicyEngine | null;
resolveDid(did: string): Promise<OasDocument>;
validateCredential(credential: AuthCredential, providerName?: string | null): Promise<AuthContext>;
evaluatePolicy(request: PolicyRequest): Promise<PolicyDecision>;
checkPermission(check: PermissionCheck): Promise<boolean>;
}Source: @openagentid/aegis-sdk@0.1.1, dist/plugin-CzTTSkdE.d.ts:116.
PolicyContext
Type-only declaration; it is not a runtime value.
interface PolicyContext {
authContext?: AuthContext | null;
lineage?: LineageSummary | null;
conformanceLevel?: number | null;
session?: Session | null;
extra: Record<string, unknown>;
}Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:62.
PolicyDecision
Type-only declaration; it is not a runtime value.
interface PolicyDecision {
allowed: boolean;
reason?: string | null;
obligations: Obligation[];
auditInfo: AuditInfo;
}Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:92.
PolicyEngine
Type-only declaration; it is not a runtime value.
interface PolicyEngine {
evaluate(request: PolicyRequest): Promise<PolicyDecision>;
checkPermission(check: PermissionCheck): Promise<boolean>;
engineName(): string;
getPolicies?(did: string): Promise<unknown[]>;
}Source: @openagentid/aegis-sdk@0.1.1, dist/plugin-CzTTSkdE.d.ts:99.
PolicyRequest
Type-only declaration; it is not a runtime value.
interface PolicyRequest {
principal: string;
action: string;
resource: string;
context: PolicyContext;
}Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:74.
RevocationStatus
Type-only declaration; it is not a runtime value.
type RevocationStatus = "active" | "revoked" | "suspended" | "expired" | "unknown";Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:103.
Session
Session token structure (AEGIS Spec §7.4).
Type-only declaration; it is not a runtime value.
interface Session {
sessionId: string;
did: string;
provider: string;
createdAt: string;
expiresAt: string;
scope: string[];
deviceBinding?: string | null;
}Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:53.
VerificationConfig
Type-only declaration; it is not a runtime value.
interface VerificationConfig {
maxLineageDepth: number;
perHopTimeoutSecs: number;
totalTimeoutSecs: number;
cacheTtlSecs: number;
livenessPeriodDays: number;
conformanceLevel: number;
}Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:117.
VerificationMethod
Verification method per W3C DID-Core.
Type-only declaration; it is not a runtime value.
interface VerificationMethod {
id: string;
type: string;
controller: string;
publicKeyMultibase: string;
}Source: @openagentid/aegis-sdk@0.1.1, dist/plugin-CzTTSkdE.d.ts:6.
VerificationResult
Type-only declaration; it is not a runtime value.
interface VerificationResult {
did: string;
signatureValid: boolean;
lineageValid: boolean;
lineageDepth: number;
humanRoot?: string | null;
revocationStatus: RevocationStatus;
livenessStatus: LivenessStatus;
conformanceLevel: number;
warnings: string[];
verifiedAt: string;
}Source: @openagentid/aegis-sdk@0.1.1, dist/types-Ck8QCcs2.d.ts:105.
Package requirements
Dependencies
| Package | Published range |
|---|---|
| uuid | ^11.0.0 |
| zod | ^3.23.0 |
Archive verification
Pinned integrity:
sha512-eKG79P17teM8i+ZQaNdBEPJnL0XT9723i04kDxgVRrOb0VOnNW5rt2doLq8g4mHBZ4rjHdPEuzZmj5LsL4iuVw==