@enbox/api 0.6.25 → 0.6.26

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.
package/dist/esm/enbox.js CHANGED
@@ -282,7 +282,7 @@ export class Enbox {
282
282
  * - `new Enbox({ agent, connectedDid })` for raw parameters
283
283
  * - {@link Enbox.fromSession} for session-shaped objects
284
284
  *
285
- * Routing happens at runtime inside `AuthManager._isLocalConnect`:
285
+ * Routing happens at runtime inside `AuthManager._isVaultConnect`:
286
286
  * presence of a non-empty `protocols` array or a `connectHandler` selects
287
287
  * the handler flow; everything else routes to local. Local-style fields
288
288
  * (`password`, `dwnEndpoints`, etc.) are forwarded to both the manager
@@ -385,7 +385,7 @@ export class Enbox {
385
385
  *
386
386
  * Implemented as an **explicit allowlist** for the same reason as
387
387
  * `toAuthConnectOptions`: a denylist would silently leak future
388
- * `HandlerConnectOptions` / `LocalConnectOptions` fields into the
388
+ * `HandlerConnectOptions` / `VaultConnectOptions` fields into the
389
389
  * manager-default record. The `satisfies Partial<AuthManagerOptions>`
390
390
  * annotation makes the compiler verify every key in the allowlist
391
391
  * exists on `AuthManagerOptions`, so a misspelled or stale field name
@@ -414,7 +414,7 @@ export class Enbox {
414
414
  * `AuthManager.connect()` consumes.
415
415
  *
416
416
  * Implemented as an **explicit allowlist** of the fields declared on
417
- * {@link HandlerConnectOptions} ∪ {@link LocalConnectOptions}. A
417
+ * {@link HandlerConnectOptions} ∪ {@link VaultConnectOptions}. A
418
418
  * denylist (strip manager-only fields, forward the rest) would
419
419
  * silently leak any future `AuthManagerOptions` field into
420
420
  * `AuthManager.connect()`; the allowlist makes the type boundary
@@ -427,7 +427,7 @@ export class Enbox {
427
427
  * compiler verify every key in the allowlist exists on `ConnectOptions`,
428
428
  * so misspelling a field name is a type error rather than a silent
429
429
  * drop. Routing between local and handler flow happens inside
430
- * `AuthManager._isLocalConnect` based on the presence of `protocols`
430
+ * `AuthManager._isVaultConnect` based on the presence of `protocols`
431
431
  * / `connectHandler`.
432
432
  *
433
433
  * `protocols: []` is normalized away — an empty array carries no
@@ -10,7 +10,7 @@
10
10
  import type { AgentSessionPrimitives } from '@enbox/agent';
11
11
  import type { AuthManager } from '@enbox/auth/auth-manager';
12
12
  import type { DidMethodResolver } from '@enbox/dids';
13
- import type { AuthManagerOptions, AuthSession, HandlerConnectOptions, LocalConnectOptions } from '@enbox/auth';
13
+ import type { AuthManagerOptions, AuthSession, HandlerConnectOptions, VaultConnectOptions } from '@enbox/auth';
14
14
  import type { DwnReaderApi } from './dwn-reader-api.js';
15
15
  import type { Enbox } from './enbox.js';
16
16
  /**
@@ -64,7 +64,7 @@ export type EnboxSessionParams = AgentSessionPrimitives;
64
64
  * `sync`, `dwnEndpoints`, `connectHandler`, etc. Forwarded to
65
65
  * `AuthManager.create()` and reused across reconnects.
66
66
  * 2. **Per-call signals** ({@link HandlerConnectOptions} ∪
67
- * {@link LocalConnectOptions}) — `protocols`, `createIdentity`,
67
+ * {@link VaultConnectOptions}) — `protocols`, `createIdentity`,
68
68
  * `recoveryPhrase`, `metadata`, etc. Forwarded to
69
69
  * `AuthManager.connect()` and used to route handler vs local flow.
70
70
  *
@@ -81,7 +81,7 @@ export type EnboxSessionParams = AgentSessionPrimitives;
81
81
  * `AuthManager.connect()`, drop down one layer: create the
82
82
  * `AuthManager` yourself and pass its session to `Enbox.fromSession`.
83
83
  */
84
- export type EnboxConnectOptions = AuthManagerOptions & HandlerConnectOptions & LocalConnectOptions;
84
+ export type EnboxConnectOptions = AuthManagerOptions & HandlerConnectOptions & VaultConnectOptions;
85
85
  /** The result of a high-level asynchronous {@link Enbox.connect} call. */
86
86
  export type EnboxConnectResult = {
87
87
  /** The AuthManager that owns the session lifecycle. */
@@ -197,7 +197,7 @@ export declare class Enbox {
197
197
  * - `new Enbox({ agent, connectedDid })` for raw parameters
198
198
  * - {@link Enbox.fromSession} for session-shaped objects
199
199
  *
200
- * Routing happens at runtime inside `AuthManager._isLocalConnect`:
200
+ * Routing happens at runtime inside `AuthManager._isVaultConnect`:
201
201
  * presence of a non-empty `protocols` array or a `connectHandler` selects
202
202
  * the handler flow; everything else routes to local. Local-style fields
203
203
  * (`password`, `dwnEndpoints`, etc.) are forwarded to both the manager
@@ -224,7 +224,7 @@ export declare class Enbox {
224
224
  *
225
225
  * Implemented as an **explicit allowlist** for the same reason as
226
226
  * `toAuthConnectOptions`: a denylist would silently leak future
227
- * `HandlerConnectOptions` / `LocalConnectOptions` fields into the
227
+ * `HandlerConnectOptions` / `VaultConnectOptions` fields into the
228
228
  * manager-default record. The `satisfies Partial<AuthManagerOptions>`
229
229
  * annotation makes the compiler verify every key in the allowlist
230
230
  * exists on `AuthManagerOptions`, so a misspelled or stale field name
@@ -236,7 +236,7 @@ export declare class Enbox {
236
236
  * `AuthManager.connect()` consumes.
237
237
  *
238
238
  * Implemented as an **explicit allowlist** of the fields declared on
239
- * {@link HandlerConnectOptions} ∪ {@link LocalConnectOptions}. A
239
+ * {@link HandlerConnectOptions} ∪ {@link VaultConnectOptions}. A
240
240
  * denylist (strip manager-only fields, forward the rest) would
241
241
  * silently leak any future `AuthManagerOptions` field into
242
242
  * `AuthManager.connect()`; the allowlist makes the type boundary
@@ -249,7 +249,7 @@ export declare class Enbox {
249
249
  * compiler verify every key in the allowlist exists on `ConnectOptions`,
250
250
  * so misspelling a field name is a type error rather than a silent
251
251
  * drop. Routing between local and handler flow happens inside
252
- * `AuthManager._isLocalConnect` based on the presence of `protocols`
252
+ * `AuthManager._isVaultConnect` based on the presence of `protocols`
253
253
  * / `connectHandler`.
254
254
  *
255
255
  * `protocols: []` is normalized away — an empty array carries no
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enbox/api",
3
- "version": "0.6.25",
3
+ "version": "0.6.26",
4
4
  "description": "Enbox SDK — high-level API for Decentralized Web Nodes, DIDs, and Verifiable Credentials",
5
5
  "type": "module",
6
6
  "main": "./dist/esm/index.js",
@@ -81,8 +81,8 @@
81
81
  "bun": ">=1.0.0"
82
82
  },
83
83
  "dependencies": {
84
- "@enbox/agent": "0.7.1",
85
- "@enbox/auth": "0.6.33",
84
+ "@enbox/agent": "0.7.2",
85
+ "@enbox/auth": "0.6.34",
86
86
  "@enbox/common": "0.1.1",
87
87
  "@enbox/dwn-clients": "0.4.1"
88
88
  },
@@ -15,7 +15,7 @@ import type {
15
15
  AuthManagerOptions,
16
16
  AuthSession,
17
17
  HandlerConnectOptions,
18
- LocalConnectOptions,
18
+ VaultConnectOptions,
19
19
  } from '@enbox/auth';
20
20
 
21
21
  import type { DwnReaderApi } from './dwn-reader-api.js';
@@ -76,7 +76,7 @@ export type EnboxSessionParams = AgentSessionPrimitives;
76
76
  * `sync`, `dwnEndpoints`, `connectHandler`, etc. Forwarded to
77
77
  * `AuthManager.create()` and reused across reconnects.
78
78
  * 2. **Per-call signals** ({@link HandlerConnectOptions} ∪
79
- * {@link LocalConnectOptions}) — `protocols`, `createIdentity`,
79
+ * {@link VaultConnectOptions}) — `protocols`, `createIdentity`,
80
80
  * `recoveryPhrase`, `metadata`, etc. Forwarded to
81
81
  * `AuthManager.connect()` and used to route handler vs local flow.
82
82
  *
@@ -96,7 +96,7 @@ export type EnboxSessionParams = AgentSessionPrimitives;
96
96
  export type EnboxConnectOptions =
97
97
  & AuthManagerOptions
98
98
  & HandlerConnectOptions
99
- & LocalConnectOptions;
99
+ & VaultConnectOptions;
100
100
 
101
101
  /** The result of a high-level asynchronous {@link Enbox.connect} call. */
102
102
  export type EnboxConnectResult = {
package/src/enbox.ts CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  import type { EnboxPlatformAgent } from '@enbox/agent';
8
8
  import type { ProtocolDefinition } from '@enbox/dwn-sdk-js';
9
- import type { AuthManagerOptions, ConnectOptions, HandlerConnectOptions, LocalConnectOptions } from '@enbox/auth';
9
+ import type { AuthManagerOptions, ConnectOptions, HandlerConnectOptions, VaultConnectOptions } from '@enbox/auth';
10
10
 
11
11
  import type {
12
12
  EnboxAnonymousApi,
@@ -333,7 +333,7 @@ export class Enbox {
333
333
  * - `new Enbox({ agent, connectedDid })` for raw parameters
334
334
  * - {@link Enbox.fromSession} for session-shaped objects
335
335
  *
336
- * Routing happens at runtime inside `AuthManager._isLocalConnect`:
336
+ * Routing happens at runtime inside `AuthManager._isVaultConnect`:
337
337
  * presence of a non-empty `protocols` array or a `connectHandler` selects
338
338
  * the handler flow; everything else routes to local. Local-style fields
339
339
  * (`password`, `dwnEndpoints`, etc.) are forwarded to both the manager
@@ -444,7 +444,7 @@ export class Enbox {
444
444
  *
445
445
  * Implemented as an **explicit allowlist** for the same reason as
446
446
  * `toAuthConnectOptions`: a denylist would silently leak future
447
- * `HandlerConnectOptions` / `LocalConnectOptions` fields into the
447
+ * `HandlerConnectOptions` / `VaultConnectOptions` fields into the
448
448
  * manager-default record. The `satisfies Partial<AuthManagerOptions>`
449
449
  * annotation makes the compiler verify every key in the allowlist
450
450
  * exists on `AuthManagerOptions`, so a misspelled or stale field name
@@ -474,7 +474,7 @@ export class Enbox {
474
474
  * `AuthManager.connect()` consumes.
475
475
  *
476
476
  * Implemented as an **explicit allowlist** of the fields declared on
477
- * {@link HandlerConnectOptions} ∪ {@link LocalConnectOptions}. A
477
+ * {@link HandlerConnectOptions} ∪ {@link VaultConnectOptions}. A
478
478
  * denylist (strip manager-only fields, forward the rest) would
479
479
  * silently leak any future `AuthManagerOptions` field into
480
480
  * `AuthManager.connect()`; the allowlist makes the type boundary
@@ -487,7 +487,7 @@ export class Enbox {
487
487
  * compiler verify every key in the allowlist exists on `ConnectOptions`,
488
488
  * so misspelling a field name is a type error rather than a silent
489
489
  * drop. Routing between local and handler flow happens inside
490
- * `AuthManager._isLocalConnect` based on the presence of `protocols`
490
+ * `AuthManager._isVaultConnect` based on the presence of `protocols`
491
491
  * / `connectHandler`.
492
492
  *
493
493
  * `protocols: []` is normalized away — an empty array carries no
@@ -509,7 +509,7 @@ export class Enbox {
509
509
  recoveryPhrase : options.recoveryPhrase,
510
510
  createIdentity : options.createIdentity,
511
511
  metadata : options.metadata,
512
- } satisfies Partial<HandlerConnectOptions & LocalConnectOptions>;
512
+ } satisfies Partial<HandlerConnectOptions & VaultConnectOptions>;
513
513
 
514
514
  // Normalize `protocols: []` to undefined so omitUndefined strips it.
515
515
  const normalized = (Array.isArray(allowlisted.protocols) && allowlisted.protocols.length === 0)