@glinr/theauth 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import { D as Database, A as AgentIdentity, i as AuthorizeRequest, j as AuthorizeResult, P as Permission } from '../types-D1sBnWrs.js';
2
- export { ar as PermissionConstraints } from '../types-D1sBnWrs.js';
1
+ import { D as Database, A as AgentIdentity, i as AuthorizeRequest, j as AuthorizeResult, P as Permission } from '../types-D1dTo8-m.js';
2
+ export { ax as PermissionConstraints } from '../types-D1dTo8-m.js';
3
3
  import 'drizzle-orm/sqlite-core';
4
- import '../types-BiUe9e8u.js';
4
+ import '../types-IkWVkOVv.js';
5
5
  import 'zod';
6
6
  import '../redirect/index.js';
7
7
 
@@ -1,6 +1,6 @@
1
1
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
2
2
  import { BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
3
- import { R as Result, f as McpConfig } from './types-BiUe9e8u.js';
3
+ import { R as Result, f as McpConfig } from './types-IkWVkOVv.js';
4
4
  import { RedirectConfig } from './redirect/index.js';
5
5
 
6
6
  declare const users: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
@@ -8043,8 +8043,8 @@ declare function createOneTimeTokenModule(config: OneTimeTokenConfig, db: Databa
8043
8043
  *
8044
8044
  * @example
8045
8045
  * ```typescript
8046
- * const kavach = await createKavach({
8047
- * database: { provider: 'sqlite', url: 'kavach.db' },
8046
+ * const auth = await createTheAuth({
8047
+ * database: { provider: 'sqlite', url: 'theauth.db' },
8048
8048
  * auth: { session: { secret: process.env.SESSION_SECRET } },
8049
8049
  * emailVerification: {
8050
8050
  * sendVerificationEmail: async (email, token, verifyUrl) => {
@@ -8426,8 +8426,8 @@ declare function createPasskeyModule(config: PasskeyConfig, db: Database): Passk
8426
8426
  *
8427
8427
  * @example
8428
8428
  * ```typescript
8429
- * const kavach = await createKavach({
8430
- * database: { provider: 'sqlite', url: 'kavach.db' },
8429
+ * const auth = await createTheAuth({
8430
+ * database: { provider: 'sqlite', url: 'theauth.db' },
8431
8431
  * auth: { session: { secret: process.env.SESSION_SECRET } },
8432
8432
  * username: { password: { minLength: 8 } },
8433
8433
  * passwordReset: {
@@ -9029,7 +9029,7 @@ interface VerificationResult {
9029
9029
  error?: string;
9030
9030
  }
9031
9031
 
9032
- interface KavachHooks {
9032
+ interface TheAuthHooks {
9033
9033
  /**
9034
9034
  * Fires before authorize() — can block the request by returning
9035
9035
  * `{ allow: false, reason: '...' }`. Return `void` or `{ allow: true }`
@@ -9075,6 +9075,10 @@ interface KavachHooks {
9075
9075
  reason: string;
9076
9076
  }) => Promise<void>;
9077
9077
  }
9078
+ /** @deprecated Use `TheAuthHooks` instead. Will be removed in a future major version. */
9079
+ type AuthHooks = TheAuthHooks;
9080
+ /** @deprecated Use `TheAuthHooks` instead. Will be removed in a future major version. */
9081
+ type KavachHooks = TheAuthHooks;
9078
9082
  type ViolationType = "permission_denied" | "rate_limited" | "ip_blocked" | "time_restricted" | "approval_required";
9079
9083
  /**
9080
9084
  * Map an authorization denial reason string to a violation type.
@@ -9085,7 +9089,7 @@ declare function classifyViolation(reason: string | undefined): ViolationType;
9085
9089
  /** Context passed to plugin init */
9086
9090
  interface PluginContext {
9087
9091
  db: Database;
9088
- config: KavachConfig;
9092
+ config: AuthConfig;
9089
9093
  /** Register an API endpoint that adapters will mount */
9090
9094
  addEndpoint: (endpoint: PluginEndpoint) => void;
9091
9095
  /** Register a DB migration (CREATE TABLE statement) */
@@ -9123,10 +9127,10 @@ interface EndpointContext {
9123
9127
  getSession: (token: string) => Promise<Session | null>;
9124
9128
  }
9125
9129
  /** Plugin definition */
9126
- interface KavachPlugin {
9130
+ interface TheAuthPlugin {
9127
9131
  /** Unique plugin identifier */
9128
9132
  id: string;
9129
- /** Plugin initialization - runs during createKavach() */
9133
+ /** Plugin initialization - runs during createTheAuth() */
9130
9134
  init?: (ctx: PluginContext) => Promise<PluginInitResult | undefined>;
9131
9135
  /** Database schema (Drizzle table definitions for type safety) */
9132
9136
  schema?: Record<string, unknown>;
@@ -9143,9 +9147,13 @@ interface KavachPlugin {
9143
9147
  };
9144
9148
  }
9145
9149
  interface PluginInitResult {
9146
- /** Additional properties to merge into the kavach instance */
9150
+ /** Additional properties to merge into the auth instance */
9147
9151
  context?: Record<string, unknown>;
9148
9152
  }
9153
+ /** @deprecated Use `TheAuthPlugin` instead. Will be removed in a future major version. */
9154
+ type AuthPlugin = TheAuthPlugin;
9155
+ /** @deprecated Use `TheAuthPlugin` instead. Will be removed in a future major version. */
9156
+ type KavachPlugin = TheAuthPlugin;
9149
9157
 
9150
9158
  type PolicyEffect = "permit" | "deny" | "indeterminate";
9151
9159
  interface PolicyDecisionSubject {
@@ -9272,7 +9280,7 @@ declare function createSessionFreshnessModule(config?: SessionFreshnessConfig):
9272
9280
  /**
9273
9281
  * Main configuration for TheAuth
9274
9282
  */
9275
- interface KavachConfig {
9283
+ interface TheAuthConfig {
9276
9284
  /** Database connection - Drizzle instance or connection config */
9277
9285
  database: DatabaseConfig;
9278
9286
  /** Agent identity configuration */
@@ -9301,14 +9309,14 @@ interface KavachConfig {
9301
9309
  /** Async approval flows (CIBA-style human-in-the-loop) */
9302
9310
  approval?: ApprovalConfig;
9303
9311
  /** Lifecycle hooks for agent sandboxing, logging, and custom validation */
9304
- hooks?: KavachHooks;
9312
+ hooks?: TheAuthHooks;
9305
9313
  /** W3C DID (Decentralized Identifiers) configuration */
9306
9314
  did?: {
9307
9315
  /** did:web config — required for generating did:web identities */
9308
9316
  web?: DidWebConfig;
9309
9317
  };
9310
9318
  /** Auth plugins (email, OAuth, 2FA, org, etc.) */
9311
- plugins?: KavachPlugin[];
9319
+ plugins?: TheAuthPlugin[];
9312
9320
  /** Base URL for the auth server */
9313
9321
  baseUrl?: string;
9314
9322
  /** Secret key for signing tokens */
@@ -9458,10 +9466,14 @@ interface KavachConfig {
9458
9466
  */
9459
9467
  emitAgenticJwtClaims?: boolean;
9460
9468
  }
9469
+ /** @deprecated Use `TheAuthConfig` instead. Will be removed in a future major version. */
9470
+ type AuthConfig = TheAuthConfig;
9471
+ /** @deprecated Use `TheAuthConfig` instead. Will be removed in a future major version. */
9472
+ type KavachConfig = TheAuthConfig;
9461
9473
  /**
9462
- * The main TheAuth instance returned by createKavach()
9474
+ * The main TheAuth instance returned by createTheAuth()
9463
9475
  */
9464
- interface KavachInstance {
9476
+ interface TheAuthInstance {
9465
9477
  /** Agent identity management */
9466
9478
  agent: AgentModule;
9467
9479
  /** Authorization engine */
@@ -9473,6 +9485,10 @@ interface KavachInstance {
9473
9485
  /** MCP authorization server */
9474
9486
  mcp: McpModule;
9475
9487
  }
9488
+ /** @deprecated Use `TheAuthInstance` instead. Will be removed in a future major version. */
9489
+ type AuthInstance = TheAuthInstance;
9490
+ /** @deprecated Use `TheAuthInstance` instead. Will be removed in a future major version. */
9491
+ type KavachInstance = TheAuthInstance;
9476
9492
  interface AgentModule {
9477
9493
  create: (input: CreateAgentInput) => Promise<AgentIdentity>;
9478
9494
  get: (agentId: string) => Promise<AgentIdentity | null>;
@@ -9633,4 +9649,4 @@ interface TokenValidationResult {
9633
9649
  }
9634
9650
  type McpMiddleware = (request: Request) => Promise<Response | undefined>;
9635
9651
 
9636
- export { type AdminUser as $, type AgentIdentity as A, type SessionFreshnessModule as B, type CreateAgentInput as C, type Database as D, type EmailOtpModule as E, type PhoneAuthModule as F, type CaptchaModule as G, type EvaluateInput as H, type PolicyDecision as I, type InvalidateScope as J, type KavachConfig as K, type PolicyCacheStats as L, type McpServerInput as M, type PluginEndpoint as N, type OrgModule as O, type Permission as P, type EndpointContext as Q, type RequestContext as R, type SignedPayload as S, type TotpModule as T, type UpdateAgentInput as U, type VerificationResult as V, type WebhookModule as W, type KavachPlugin as X, type SessionConfig as Y, type Session as Z, type AdminConfig as _, type DatabaseConfig as a, createOneTimeTokenModule as a$, type AgentConfig as a0, type ApiKey as a1, type ApiKeyManagerConfig as a2, type ApprovalConfig as a3, type ApprovalModule as a4, type AuthAdapter as a5, type CaptchaConfig as a6, type CaptchaVerifyResult as a7, type CreateTokenInput as a8, type D1DatabaseBinding as a9, type SsoAuditEvent as aA, type SsoConfig as aB, type SsoConnection as aC, SsoError as aD, type TokenValidationResult as aE, type TotpConfig as aF, type TotpSetup as aG, type UsernameAuthConfig as aH, type ValidateTokenResult as aI, type VerificationMethod as aJ, agentCards as aK, agentDids as aL, agents as aM, apiKeys as aN, approvalRequests as aO, auditLogs as aP, budgetPolicies as aQ, classifyViolation as aR, createAdminModule as aS, createApiKeyManagerModule as aT, createApprovalModule as aU, createCaptchaModule as aV, createDatabase as aW, createDatabaseSync as aX, createEmailOtpModule as aY, createEmailVerificationModule as aZ, createMagicLinkModule as a_, type EmailOtpConfig as aa, type EmailVerificationConfig as ab, type KavachHooks as ac, type KavachInstance as ad, type MagicLinkConfig as ae, type McpMiddleware as af, type OidcProvider as ag, type OneTimeTokenConfig as ah, type OneTimeTokenPurpose as ai, type OrgConfig as aj, type OrgInvitation as ak, type OrgMember as al, type OrgRole as am, type Organization as an, type PasskeyConfig as ao, type PasskeyCredential as ap, type PasswordResetConfig as aq, type PermissionConstraints as ar, type PhoneAuthConfig as as, type PluginContext as at, type PluginInitResult as au, type RevokeTokensResult as av, SSO_ERROR as aw, type SamlProvider as ax, type ServiceEndpoint as ay, type SessionFreshnessConfig as az, type DelegateInput as b, createOrgModule as b0, createPasskeyModule as b1, createPasswordResetModule as b2, createPhoneAuthModule as b3, createSessionFreshnessModule as b4, createSessionManager as b5, createSsoModule as b6, createTotpModule as b7, createUsernameAuthModule as b8, delegationChains as b9, emailOtps as ba, magicLinks as bb, mcpServers as bc, oauthAccessTokens as bd, oauthAuthorizationCodes as be, oauthClients as bf, orgInvitations as bg, orgMembers as bh, orgRoles as bi, organizations as bj, passkeyChallenges as bk, passkeyCredentials as bl, permissions as bm, rateLimits as bn, sessions as bo, ssoConnections as bp, tenants as bq, totpRecords as br, trustScores as bs, users as bt, type WebhookConfig as bu, type WebhookEvent as bv, createWebhookModule as bw, type DelegationChain as c, type DidDocument as d, type DidKeyPair as e, type DidWebConfig as f, type AgentDid as g, type AgentFilter as h, type AuthorizeRequest as i, type AuthorizeResult as j, type AuditFilter as k, type AuditEntry as l, type AuditExportOptions as m, type McpServer as n, type ResolvedUser as o, type SessionManager as p, type ApprovalRequest as q, type MagicLinkModule as r, type PasskeyModule as s, type SsoModule as t, type AdminModule as u, type ApiKeyManagerModule as v, type UsernameAuthModule as w, type PasswordResetModule as x, type EmailVerificationModule as y, type OneTimeTokenModule as z };
9652
+ export { type AdminConfig as $, type AgentIdentity as A, type OneTimeTokenModule as B, type CreateAgentInput as C, type Database as D, type EmailOtpModule as E, type SessionFreshnessModule as F, type PhoneAuthModule as G, type CaptchaModule as H, type EvaluateInput as I, type PolicyDecision as J, type KavachConfig as K, type InvalidateScope as L, type McpServerInput as M, type PolicyCacheStats as N, type OrgModule as O, type Permission as P, type PluginEndpoint as Q, type RequestContext as R, type SignedPayload as S, type TheAuthConfig as T, type UpdateAgentInput as U, type VerificationResult as V, type WebhookModule as W, type EndpointContext as X, type TheAuthPlugin as Y, type SessionConfig as Z, type Session as _, type DatabaseConfig as a, createApiKeyManagerModule as a$, type AdminUser as a0, type AgentConfig as a1, type ApiKey as a2, type ApiKeyManagerConfig as a3, type ApprovalConfig as a4, type ApprovalModule as a5, type AuthAdapter as a6, type AuthConfig as a7, type AuthHooks as a8, type AuthInstance as a9, type PluginInitResult as aA, type RevokeTokensResult as aB, SSO_ERROR as aC, type SamlProvider as aD, type ServiceEndpoint as aE, type SessionFreshnessConfig as aF, type SsoAuditEvent as aG, type SsoConfig as aH, type SsoConnection as aI, SsoError as aJ, type TheAuthHooks as aK, type TheAuthInstance as aL, type TokenValidationResult as aM, type TotpConfig as aN, type TotpSetup as aO, type UsernameAuthConfig as aP, type ValidateTokenResult as aQ, type VerificationMethod as aR, agentCards as aS, agentDids as aT, agents as aU, apiKeys as aV, approvalRequests as aW, auditLogs as aX, budgetPolicies as aY, classifyViolation as aZ, createAdminModule as a_, type AuthPlugin as aa, type CaptchaConfig as ab, type CaptchaVerifyResult as ac, type CreateTokenInput as ad, type D1DatabaseBinding as ae, type EmailOtpConfig as af, type EmailVerificationConfig as ag, type KavachHooks as ah, type KavachInstance as ai, type KavachPlugin as aj, type MagicLinkConfig as ak, type McpMiddleware as al, type OidcProvider as am, type OneTimeTokenConfig as an, type OneTimeTokenPurpose as ao, type OrgConfig as ap, type OrgInvitation as aq, type OrgMember as ar, type OrgRole as as, type Organization as at, type PasskeyConfig as au, type PasskeyCredential as av, type PasswordResetConfig as aw, type PermissionConstraints as ax, type PhoneAuthConfig as ay, type PluginContext as az, type DelegateInput as b, createApprovalModule as b0, createCaptchaModule as b1, createDatabase as b2, createDatabaseSync as b3, createEmailOtpModule as b4, createEmailVerificationModule as b5, createMagicLinkModule as b6, createOneTimeTokenModule as b7, createOrgModule as b8, createPasskeyModule as b9, trustScores as bA, users as bB, type WebhookConfig as bC, type WebhookEvent as bD, createWebhookModule as bE, createPasswordResetModule as ba, createPhoneAuthModule as bb, createSessionFreshnessModule as bc, createSessionManager as bd, createSsoModule as be, createTotpModule as bf, createUsernameAuthModule as bg, delegationChains as bh, emailOtps as bi, magicLinks as bj, mcpServers as bk, oauthAccessTokens as bl, oauthAuthorizationCodes as bm, oauthClients as bn, orgInvitations as bo, orgMembers as bp, orgRoles as bq, organizations as br, passkeyChallenges as bs, passkeyCredentials as bt, permissions as bu, rateLimits as bv, sessions as bw, ssoConnections as bx, tenants as by, totpRecords as bz, type DelegationChain as c, type DidDocument as d, type DidKeyPair as e, type DidWebConfig as f, type AgentDid as g, type AgentFilter as h, type AuthorizeRequest as i, type AuthorizeResult as j, type AuditFilter as k, type AuditEntry as l, type AuditExportOptions as m, type McpServer as n, type ResolvedUser as o, type SessionManager as p, type ApprovalRequest as q, type MagicLinkModule as r, type TotpModule as s, type PasskeyModule as t, type SsoModule as u, type AdminModule as v, type ApiKeyManagerModule as w, type UsernameAuthModule as x, type PasswordResetModule as y, type EmailVerificationModule as z };
@@ -1,16 +1,24 @@
1
1
  import { z } from 'zod';
2
2
 
3
- interface KavachError {
3
+ interface TheAuthError {
4
4
  code: string;
5
5
  message: string;
6
6
  details?: Record<string, unknown>;
7
7
  }
8
+ /**
9
+ * @deprecated Use `TheAuthError` instead. Will be removed in a future major version.
10
+ */
11
+ type AuthError = TheAuthError;
12
+ /**
13
+ * @deprecated Use `TheAuthError` instead. Will be removed in a future major version.
14
+ */
15
+ type KavachError = TheAuthError;
8
16
  type Result<T> = {
9
17
  success: true;
10
18
  data: T;
11
19
  } | {
12
20
  success: false;
13
- error: KavachError;
21
+ error: TheAuthError;
14
22
  };
15
23
  interface McpConfig {
16
24
  /** Enable MCP authorization server */
@@ -423,4 +431,4 @@ declare const McpTokenRequestSchema: z.ZodDiscriminatedUnion<"grant_type", [z.Zo
423
431
  }>]>;
424
432
  type McpTokenRequestParsed = z.infer<typeof McpTokenRequestSchema>;
425
433
 
426
- export { type ApproveConsentParams as A, type KavachError as K, type McpAuthContext as M, type Result as R, type McpAuthorizeResult as a, type McpServerMetadata as b, type McpProtectedResourceMetadata as c, type McpClientRegistrationResponse as d, type McpSession as e, type McpConfig as f, type McpAuthModule as g, type McpTokenResponse as h, type McpAccessToken as i, type McpAuthorizationCode as j, type McpAuthorizeRequest as k, McpAuthorizeRequestSchema as l, type McpClient as m, type McpClientRegistrationRequest as n, McpClientRegistrationSchema as o, type McpTokenPayload as p, type McpTokenRequest as q, type McpTokenRequestParsed as r, McpTokenRequestSchema as s };
434
+ export { type ApproveConsentParams as A, type KavachError as K, type McpAuthContext as M, type Result as R, type TheAuthError as T, type McpAuthorizeResult as a, type McpServerMetadata as b, type McpProtectedResourceMetadata as c, type McpClientRegistrationResponse as d, type McpSession as e, type McpConfig as f, type McpAuthModule as g, type McpTokenResponse as h, type AuthError as i, type McpAccessToken as j, type McpAuthorizationCode as k, type McpAuthorizeRequest as l, McpAuthorizeRequestSchema as m, type McpClient as n, type McpClientRegistrationRequest as o, McpClientRegistrationSchema as p, type McpTokenPayload as q, type McpTokenRequest as r, type McpTokenRequestParsed as s, McpTokenRequestSchema as t };
@@ -1,6 +1,6 @@
1
- import { l as AuditEntry } from '../types-D1sBnWrs.js';
1
+ import { l as AuditEntry } from '../types-D1dTo8-m.js';
2
2
  import { z } from 'zod';
3
- import { R as Result } from '../types-BiUe9e8u.js';
3
+ import { R as Result } from '../types-IkWVkOVv.js';
4
4
  import 'drizzle-orm/sqlite-core';
5
5
  import '../redirect/index.js';
6
6
 
@@ -17,9 +17,21 @@ declare const VC_CONTEXT_V2 = "https://www.w3.org/ns/credentials/v2";
17
17
  declare const VC_CONTEXT_V1 = "https://www.w3.org/2018/credentials/v1";
18
18
  declare const VC_TYPE_CREDENTIAL = "VerifiableCredential";
19
19
  declare const VC_TYPE_PRESENTATION = "VerifiablePresentation";
20
- declare const KAVACH_AGENT_CREDENTIAL = "KavachAgentCredential";
21
- declare const KAVACH_PERMISSION_CREDENTIAL = "KavachPermissionCredential";
22
- declare const KAVACH_DELEGATION_CREDENTIAL = "KavachDelegationCredential";
20
+ declare const THEAUTH_AGENT_CREDENTIAL = "TheAuthAgentCredential";
21
+ declare const THEAUTH_PERMISSION_CREDENTIAL = "TheAuthPermissionCredential";
22
+ declare const THEAUTH_DELEGATION_CREDENTIAL = "TheAuthDelegationCredential";
23
+ /** @deprecated Use `THEAUTH_AGENT_CREDENTIAL` instead. Will be removed in a future major version. */
24
+ declare const AUTH_AGENT_CREDENTIAL = "TheAuthAgentCredential";
25
+ /** @deprecated Use `THEAUTH_PERMISSION_CREDENTIAL` instead. Will be removed in a future major version. */
26
+ declare const AUTH_PERMISSION_CREDENTIAL = "TheAuthPermissionCredential";
27
+ /** @deprecated Use `THEAUTH_DELEGATION_CREDENTIAL` instead. Will be removed in a future major version. */
28
+ declare const AUTH_DELEGATION_CREDENTIAL = "TheAuthDelegationCredential";
29
+ /** @deprecated Use `THEAUTH_AGENT_CREDENTIAL` instead. Will be removed in a future major version. */
30
+ declare const KAVACH_AGENT_CREDENTIAL = "TheAuthAgentCredential";
31
+ /** @deprecated Use `THEAUTH_PERMISSION_CREDENTIAL` instead. Will be removed in a future major version. */
32
+ declare const KAVACH_PERMISSION_CREDENTIAL = "TheAuthPermissionCredential";
33
+ /** @deprecated Use `THEAUTH_DELEGATION_CREDENTIAL` instead. Will be removed in a future major version. */
34
+ declare const KAVACH_DELEGATION_CREDENTIAL = "TheAuthDelegationCredential";
23
35
  declare const ProofSchema: z.ZodObject<{
24
36
  type: z.ZodEnum<["Ed25519Signature2020", "JsonWebSignature2020"]>;
25
37
  created: z.ZodString;
@@ -774,7 +786,7 @@ interface ExtractedPermissions {
774
786
  * all of them. Useful for compliance exports that must be
775
787
  * cryptographically verifiable (EU AI Act Article 12, SOC 2 CC7).
776
788
  *
777
- * Context URL: https://theauth.com/contexts/audit/v1.jsonld
789
+ * Context URL: https://theauth.dev/contexts/audit/v1.jsonld
778
790
  * This context is defined locally — the URL does not need to resolve at
779
791
  * runtime. It serves as a stable identifier for the credential schema.
780
792
  */
@@ -784,7 +796,7 @@ declare const THEAUTH_AUDIT_CREDENTIAL = "TheAuthAuditCredential";
784
796
  * Context URL for TheAuthAuditCredential.
785
797
  * Defined locally — the URL does not need to resolve at runtime.
786
798
  */
787
- declare const THEAUTH_AUDIT_CONTEXT = "https://theauth.com/contexts/audit/v1.jsonld";
799
+ declare const THEAUTH_AUDIT_CONTEXT = "https://theauth.dev/contexts/audit/v1.jsonld";
788
800
  /** AuditRecord is an alias for AuditEntry used in the VC export surface. */
789
801
  type AuditRecord = AuditEntry;
790
802
  /** Options passed to `exportAuditAsVC`. */
@@ -986,4 +998,4 @@ interface VCVerifier {
986
998
  */
987
999
  declare function createVCVerifier(config?: VCVerifierConfig): VCVerifier;
988
1000
 
989
- export { type AuditCredentialSubject, type AuditExportResult, type AuditRecord, type CredentialFormat, type CredentialStatus, CredentialStatusSchema, type CredentialSubject, CredentialSubjectSchema, type DelegationLink, type ExportAuditOptions, type ExtractedPermissions, type IssueAgentCredentialInput, type IssueDelegationCredentialInput, type IssuePermissionCredentialInput, KAVACH_AGENT_CREDENTIAL, KAVACH_DELEGATION_CREDENTIAL, KAVACH_PERMISSION_CREDENTIAL, type Proof, ProofSchema, THEAUTH_AUDIT_CONTEXT, THEAUTH_AUDIT_CREDENTIAL, type VCIssuer, type VCIssuerConfig, type VCJwtPayload, type VCVerifier, type VCVerifierConfig, VC_CONTEXT_V1, VC_CONTEXT_V2, VC_TYPE_CREDENTIAL, VC_TYPE_PRESENTATION, type VerifiableCredential, VerifiableCredentialSchema, type VerifiablePresentation, VerifiablePresentationSchema, type VerifiedCredential, type VerifiedPresentation, createVCIssuer, createVCVerifier, exportAuditAsVC, listAuditRecords };
1001
+ export { AUTH_AGENT_CREDENTIAL, AUTH_DELEGATION_CREDENTIAL, AUTH_PERMISSION_CREDENTIAL, type AuditCredentialSubject, type AuditExportResult, type AuditRecord, type CredentialFormat, type CredentialStatus, CredentialStatusSchema, type CredentialSubject, CredentialSubjectSchema, type DelegationLink, type ExportAuditOptions, type ExtractedPermissions, type IssueAgentCredentialInput, type IssueDelegationCredentialInput, type IssuePermissionCredentialInput, KAVACH_AGENT_CREDENTIAL, KAVACH_DELEGATION_CREDENTIAL, KAVACH_PERMISSION_CREDENTIAL, type Proof, ProofSchema, THEAUTH_AGENT_CREDENTIAL, THEAUTH_AUDIT_CONTEXT, THEAUTH_AUDIT_CREDENTIAL, THEAUTH_DELEGATION_CREDENTIAL, THEAUTH_PERMISSION_CREDENTIAL, type VCIssuer, type VCIssuerConfig, type VCJwtPayload, type VCVerifier, type VCVerifierConfig, VC_CONTEXT_V1, VC_CONTEXT_V2, VC_TYPE_CREDENTIAL, VC_TYPE_PRESENTATION, type VerifiableCredential, VerifiableCredentialSchema, type VerifiablePresentation, VerifiablePresentationSchema, type VerifiedCredential, type VerifiedPresentation, createVCIssuer, createVCVerifier, exportAuditAsVC, listAuditRecords };
package/dist/vc/index.js CHANGED
@@ -12,9 +12,15 @@ var VC_CONTEXT_V2 = "https://www.w3.org/ns/credentials/v2";
12
12
  var VC_CONTEXT_V1 = "https://www.w3.org/2018/credentials/v1";
13
13
  var VC_TYPE_CREDENTIAL = "VerifiableCredential";
14
14
  var VC_TYPE_PRESENTATION = "VerifiablePresentation";
15
- var KAVACH_AGENT_CREDENTIAL = "KavachAgentCredential";
16
- var KAVACH_PERMISSION_CREDENTIAL = "KavachPermissionCredential";
17
- var KAVACH_DELEGATION_CREDENTIAL = "KavachDelegationCredential";
15
+ var THEAUTH_AGENT_CREDENTIAL = "TheAuthAgentCredential";
16
+ var THEAUTH_PERMISSION_CREDENTIAL = "TheAuthPermissionCredential";
17
+ var THEAUTH_DELEGATION_CREDENTIAL = "TheAuthDelegationCredential";
18
+ var AUTH_AGENT_CREDENTIAL = THEAUTH_AGENT_CREDENTIAL;
19
+ var AUTH_PERMISSION_CREDENTIAL = THEAUTH_PERMISSION_CREDENTIAL;
20
+ var AUTH_DELEGATION_CREDENTIAL = THEAUTH_DELEGATION_CREDENTIAL;
21
+ var KAVACH_AGENT_CREDENTIAL = THEAUTH_AGENT_CREDENTIAL;
22
+ var KAVACH_PERMISSION_CREDENTIAL = THEAUTH_PERMISSION_CREDENTIAL;
23
+ var KAVACH_DELEGATION_CREDENTIAL = THEAUTH_DELEGATION_CREDENTIAL;
18
24
  var ProofSchema = z.object({
19
25
  type: z.enum(["Ed25519Signature2020", "JsonWebSignature2020"]),
20
26
  created: z.string(),
@@ -69,7 +75,7 @@ var VerifiablePresentationSchema = z.object({
69
75
 
70
76
  // src/vc/audit-export.ts
71
77
  var THEAUTH_AUDIT_CREDENTIAL = "TheAuthAuditCredential";
72
- var THEAUTH_AUDIT_CONTEXT = "https://theauth.com/contexts/audit/v1.jsonld";
78
+ var THEAUTH_AUDIT_CONTEXT = "https://theauth.dev/contexts/audit/v1.jsonld";
73
79
  var THEAUTH_VERSION = "0.3.0";
74
80
  var DEFAULT_TTL_SECONDS = 86400;
75
81
  function toDecision(result) {
@@ -687,6 +693,6 @@ function createVCVerifier(config = {}) {
687
693
  };
688
694
  }
689
695
 
690
- export { CredentialStatusSchema, CredentialSubjectSchema, KAVACH_AGENT_CREDENTIAL, KAVACH_DELEGATION_CREDENTIAL, KAVACH_PERMISSION_CREDENTIAL, ProofSchema, THEAUTH_AUDIT_CONTEXT, THEAUTH_AUDIT_CREDENTIAL, VC_CONTEXT_V1, VC_CONTEXT_V2, VC_TYPE_CREDENTIAL, VC_TYPE_PRESENTATION, VerifiableCredentialSchema, VerifiablePresentationSchema, createVCIssuer, createVCVerifier, exportAuditAsVC, listAuditRecords };
696
+ export { AUTH_AGENT_CREDENTIAL, AUTH_DELEGATION_CREDENTIAL, AUTH_PERMISSION_CREDENTIAL, CredentialStatusSchema, CredentialSubjectSchema, KAVACH_AGENT_CREDENTIAL, KAVACH_DELEGATION_CREDENTIAL, KAVACH_PERMISSION_CREDENTIAL, ProofSchema, THEAUTH_AGENT_CREDENTIAL, THEAUTH_AUDIT_CONTEXT, THEAUTH_AUDIT_CREDENTIAL, THEAUTH_DELEGATION_CREDENTIAL, THEAUTH_PERMISSION_CREDENTIAL, VC_CONTEXT_V1, VC_CONTEXT_V2, VC_TYPE_CREDENTIAL, VC_TYPE_PRESENTATION, VerifiableCredentialSchema, VerifiablePresentationSchema, createVCIssuer, createVCVerifier, exportAuditAsVC, listAuditRecords };
691
697
  //# sourceMappingURL=index.js.map
692
698
  //# sourceMappingURL=index.js.map