@enbox/browser 0.3.56 → 0.3.58

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.
Files changed (40) hide show
  1. package/dist/browser.mjs +14 -14
  2. package/dist/browser.mjs.map +4 -4
  3. package/dist/esm/dweb-connect-client.js +14 -15
  4. package/dist/esm/dweb-connect-client.js.map +1 -1
  5. package/dist/esm/dweb-connect-wallet.js +11 -13
  6. package/dist/esm/dweb-connect-wallet.js.map +1 -1
  7. package/dist/esm/handled-deferred.js +24 -0
  8. package/dist/esm/handled-deferred.js.map +1 -0
  9. package/dist/esm/index.js +7 -2
  10. package/dist/esm/index.js.map +1 -1
  11. package/dist/esm/relay-connect-runner.js +55 -26
  12. package/dist/esm/relay-connect-runner.js.map +1 -1
  13. package/dist/esm/ui/connect-modal.js +111 -77
  14. package/dist/esm/ui/connect-modal.js.map +1 -1
  15. package/dist/esm/ui/qr.js +121 -64
  16. package/dist/esm/ui/qr.js.map +1 -1
  17. package/dist/esm/web-features.js +54 -41
  18. package/dist/esm/web-features.js.map +1 -1
  19. package/dist/types/dweb-connect-client.d.ts +4 -4
  20. package/dist/types/dweb-connect-client.d.ts.map +1 -1
  21. package/dist/types/dweb-connect-wallet.d.ts +3 -3
  22. package/dist/types/dweb-connect-wallet.d.ts.map +1 -1
  23. package/dist/types/handled-deferred.d.ts +22 -0
  24. package/dist/types/handled-deferred.d.ts.map +1 -0
  25. package/dist/types/index.d.ts +6 -3
  26. package/dist/types/index.d.ts.map +1 -1
  27. package/dist/types/relay-connect-runner.d.ts +1 -1
  28. package/dist/types/relay-connect-runner.d.ts.map +1 -1
  29. package/dist/types/ui/connect-modal.d.ts.map +1 -1
  30. package/dist/types/ui/qr.d.ts.map +1 -1
  31. package/dist/types/web-features.d.ts.map +1 -1
  32. package/package.json +11 -10
  33. package/src/dweb-connect-client.ts +15 -15
  34. package/src/dweb-connect-wallet.ts +14 -14
  35. package/src/handled-deferred.ts +38 -0
  36. package/src/index.ts +47 -0
  37. package/src/relay-connect-runner.ts +71 -30
  38. package/src/ui/connect-modal.ts +113 -72
  39. package/src/ui/qr.ts +145 -69
  40. package/src/web-features.ts +55 -43
@@ -23,9 +23,9 @@
23
23
  *
24
24
  * @packageDocumentation
25
25
  */
26
- export { Enbox, defineProtocol, repository, } from '@enbox/api';
27
- export type { EnboxAnonymousOptions, EnboxConnectOptions, EnboxConnectResult, EnboxParams, EnboxSessionParams, } from '@enbox/api';
28
- export { AuthManager, AuthSession, SESSION_EXPIRED_ERROR_CODE, SESSION_REVOKED_ERROR_CODE, computeConnectionStatus, isSessionExpiredError, isSessionInvalidError, normalizeProtocolRequests, WalletConnect, } from '@enbox/auth/browser';
26
+ export { createConnectionStore, Enbox, defineProtocol, repository, } from '@enbox/api';
27
+ export type { ConnectionPhase, ConnectionSnapshot, ConnectionSnapshotListener, ConnectionStore, ConnectionStoreOptions, EnboxAnonymousOptions, EnboxConnectOptions, EnboxConnectResult, EnboxParams, EnboxSessionParams, } from '@enbox/api';
28
+ export { AuthManager, AuthSession, ConnectDeniedError, SESSION_EXPIRED_ERROR_CODE, SESSION_REVOKED_ERROR_CODE, computeConnectionStatus, isConnectDeniedError, isSessionExpiredError, isSessionInvalidError, normalizeProtocolRequests, WalletConnect, } from '@enbox/auth/browser';
29
29
  export type { AuthEvent, AuthEventHandler, AuthManagerOptions, AuthState, ComputeConnectionStatusOptions, ConnectionMonitorOptions, ConnectionState, ConnectionStatus, ConnectionStatusGrant, ConnectHandler, ConnectOptions, ConnectResult, DisconnectOptions, GetConnectionStatusOptions, HandlerConnectOptions, ImportFromPortableOptions, VaultConnectOptions, Permission, PortableIdentity, ProtocolRequest, RefreshOptions, RegistrationOptions, StorageAdapter, SyncOption, WalletConnectOptions, } from '@enbox/auth/browser';
30
30
  export { CONNECT_DENIED_TOKEN, ConnectProvider } from '@enbox/connect';
31
31
  export type { ConnectApproval, ConnectPermissionRequest, ConnectRequest, ConnectRequestType } from '@enbox/connect';
@@ -49,7 +49,10 @@ export type { QrCode, QrSvgOptions } from './ui/qr.js';
49
49
  export { TypedRecord } from '@enbox/api';
50
50
  export { BrowserStorage } from '@enbox/auth/browser';
51
51
  export type { ProviderAuthParams, ProviderAuthResult } from '@enbox/auth/browser';
52
+ export { createProfileReader, isRetryableProfileReadStatus } from '@enbox/protocols';
53
+ export type { ProfileEntryStatus, ProfileFieldSnapshot, ProfileFieldStatus, ProfileImages, ProfileReader, ProfileReaderFailure, ProfileReaderImagesMode, ProfileReaderOptions, ProfileReaderRecordsSurface, ProfileReaderSource, ProfileReaderTimers, ProfileSnapshot, ProfileWatchListener, PublicProfile, } from '@enbox/protocols';
52
54
  export { DwnInterface } from '@enbox/agent';
55
+ export type { DeadLetterEntry, RemoteSyncState, RemoteSyncStatus, SyncConnectivityState, SyncEngine, SyncEvent, SyncEventListener, SyncHealthSummary, } from '@enbox/agent';
53
56
  export { DateSort, DwnInterfaceName, DwnMethodName } from '@enbox/dwn-sdk-js';
54
57
  export type { ProtocolActionRule, ProtocolDefinition } from '@enbox/dwn-sdk-js';
55
58
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAMH,OAAO,EACL,KAAK,EACL,cAAc,EACd,UAAU,GACX,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAMpB,OAAO,EACL,WAAW,EACX,WAAW,EACX,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EACV,SAAS,EACT,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,8BAA8B,EAC9B,wB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B,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC9E,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -64,7 +64,7 @@ export interface RelayConnectOptions {
64
64
  * Cancellation signal: when it settles, polling stops and the handshake
65
65
  * rejects with {@link RelayConnectCancelledError}.
66
66
  */
67
- cancelled?: Promise<never> | undefined;
67
+ cancelled?: Promise<never>;
68
68
  /**
69
69
  * Invoked once when the relay reports the wallet has claimed (fetched)
70
70
  * the pushed request — the app can show "phone connected" progress.
@@ -1 +1 @@
1
- {"version":3,"file":"relay-connect-runner.d.ts","sourceRoot":"","sources":["../../src/relay-connect-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EACV,qBAAqB,EACrB,wBAAwB,EAExB,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAIL,oBAAoB,EAGrB,MAAM,gBAAgB,CAAC;AAExB,mEAAmE;AACnE,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,uEAAuE;AACvE,qBAAa,0BAA2B,SAAQ,KAAK;;CAKpD;AAED,2CAA2C;AAC3C,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,gBAAgB,EAAE,MAAM,CAAC;IAEzB,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAElB,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAEhB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,uEAAuE;IACvE,cAAc,CAAC,EAAE,qBAAqB,CAAC;IAEvC,2DAA2D;IAC3D,kBAAkB,EAAE,wBAAwB,EAAE,CAAC;IAE/C,iEAAiE;IACjE,mBAAmB,CAAC,EAAE,WAAW,CAAC;IAElC,kEAAkE;IAClE,W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features to use in the browser",
5
5
  "type": "module",
6
6
  "main": "./dist/esm/index.js",
@@ -11,7 +11,7 @@
11
11
  "scripts": {
12
12
  "clean": "rm -rf dist",
13
13
  "build:esm": "rm -rf dist/esm dist/types && bun tsc -p tsconfig.json",
14
- "build:browser": "rm -rf dist/browser.mjs && bun ../../build/browser-bundle.js --metafile --external @enbox/agent --external @enbox/api --external @enbox/auth --external @enbox/auth/browser --external @enbox/common --external @enbox/connect --external @enbox/crypto --external @enbox/dids --external @enbox/dwn-sdk-js",
14
+ "build:browser": "rm -rf dist/browser.mjs && bun ../../build/browser-bundle.js --metafile --external @enbox/agent --external @enbox/api --external @enbox/auth --external @enbox/auth/browser --external @enbox/common --external @enbox/connect --external @enbox/crypto --external @enbox/dids --external @enbox/dwn-sdk-js --external @enbox/protocols",
15
15
  "build": "bun run clean && bun run build:esm && bun run build:browser",
16
16
  "lint": "eslint . --max-warnings 0",
17
17
  "lint:fix": "eslint . --fix",
@@ -66,14 +66,15 @@
66
66
  "access": "public"
67
67
  },
68
68
  "dependencies": {
69
- "@enbox/agent": "0.8.26",
70
- "@enbox/api": "0.6.64",
71
- "@enbox/auth": "0.6.72",
72
- "@enbox/common": "0.1.3",
73
- "@enbox/connect": "0.1.8",
74
- "@enbox/crypto": "0.1.6",
75
- "@enbox/dids": "0.1.6",
76
- "@enbox/dwn-sdk-js": "0.4.12"
69
+ "@enbox/agent": "0.8.28",
70
+ "@enbox/api": "0.6.66",
71
+ "@enbox/auth": "0.6.74",
72
+ "@enbox/common": "0.1.4",
73
+ "@enbox/connect": "0.1.9",
74
+ "@enbox/crypto": "0.1.7",
75
+ "@enbox/dids": "0.1.7",
76
+ "@enbox/dwn-sdk-js": "0.4.13",
77
+ "@enbox/protocols": "0.2.93"
77
78
  },
78
79
  "devDependencies": {
79
80
  "@types/qrcode": "^1.5.6",
@@ -31,6 +31,7 @@ import type {
31
31
 
32
32
  import { assertX25519PublicJwk, CONNECT_DENIED_TOKEN, ConnectClient } from '@enbox/connect';
33
33
 
34
+ import { createHandledDeferred } from './handled-deferred.js';
34
35
  import {
35
36
  DWEB_CONNECT_ACK_MESSAGE_TYPE,
36
37
  DWEB_CONNECT_LOADED_MESSAGE_TYPE,
@@ -86,7 +87,7 @@ function popupWindowFeatures(): string {
86
87
  /** Guards against calling browser-only entry points outside a browser. */
87
88
  function assertBrowserEnvironment(): void {
88
89
  if (typeof window === 'undefined') {
89
- throw new Error('[@enbox/browser] DWeb Connect is only available in browser environments.');
90
+ throw new TypeError('[@enbox/browser] DWeb Connect is only available in browser environments.');
90
91
  }
91
92
  }
92
93
 
@@ -145,8 +146,8 @@ export class PopupClientTransport implements ConnectTransport {
145
146
  private readonly _popup: Window;
146
147
  private _settled = false;
147
148
  private _walletEpkReceived = false;
148
- private _timeoutId?: ReturnType<typeof setTimeout>;
149
- private _closedPollId?: ReturnType<typeof setInterval>;
149
+ private readonly _timeoutId?: ReturnType<typeof setTimeout>;
150
+ private readonly _closedPollId?: ReturnType<typeof setInterval>;
150
151
  private _messageListener?: (event: MessageEvent) => void;
151
152
 
152
153
  private readonly _walletEpkPromise: Promise<Jwk>;
@@ -154,8 +155,8 @@ export class PopupClientTransport implements ConnectTransport {
154
155
  private _rejectWalletEpk?: (error: Error) => void;
155
156
 
156
157
  private readonly _responsePromise: Promise<string>;
157
- private _resolveResponse?: (payload: string) => void;
158
- private _rejectResponse?: (error: Error) => void;
158
+ private readonly _resolveResponse: (payload: string) => void;
159
+ private readonly _rejectResponse: (error: Error) => void;
159
160
 
160
161
  constructor(options: PopupClientTransportOptions) {
161
162
  assertBrowserEnvironment();
@@ -181,14 +182,13 @@ export class PopupClientTransport implements ConnectTransport {
181
182
  });
182
183
 
183
184
  // Created up-front so a response (or deny) arriving before
184
- // `awaitResponse()` is called is never dropped. The no-op catch marks
185
- // early rejections (timeout, popup closed during load) as handled until
185
+ // `awaitResponse()` is called is never dropped. Early rejections
186
+ // (timeout, popup closed during load) are pre-marked as handled until
186
187
  // the kernel attaches its own handlers via `awaitResponse()`.
187
- this._responsePromise = new Promise<string>((resolve, reject): void => {
188
- this._resolveResponse = resolve;
189
- this._rejectResponse = reject;
190
- });
191
- this._responsePromise.catch((): undefined => undefined);
188
+ const response = createHandledDeferred<string>();
189
+ this._responsePromise = response.promise;
190
+ this._resolveResponse = response.resolve;
191
+ this._rejectResponse = response.reject;
192
192
 
193
193
  // Listen synchronously, before the wallet page can emit its `loaded`
194
194
  // beacon, so the beacon is never missed while the kernel awaits key
@@ -308,7 +308,7 @@ export class PopupClientTransport implements ConnectTransport {
308
308
  // No-op on the normal path; unblocks `requestProfile()` if a response
309
309
  // somehow arrives before the beacon.
310
310
  this._rejectWalletEpk?.(new Error('[@enbox/browser] Wallet responded before the handshake was established.'));
311
- this._resolveResponse?.(message.payload);
311
+ this._resolveResponse(message.payload);
312
312
  }
313
313
 
314
314
  private onClosedPoll(): void {
@@ -331,7 +331,7 @@ export class PopupClientTransport implements ConnectTransport {
331
331
  if (this._settled) { return; }
332
332
  this._settled = true;
333
333
  this.cleanup();
334
- this._resolveResponse?.(CONNECT_DENIED_TOKEN);
334
+ this._resolveResponse(CONNECT_DENIED_TOKEN);
335
335
  }, CLOSED_RESPONSE_GRACE_MS);
336
336
  }
337
337
 
@@ -341,7 +341,7 @@ export class PopupClientTransport implements ConnectTransport {
341
341
  this.cleanup();
342
342
  try { this._popup.close(); } catch { /* best effort */ }
343
343
  this._rejectWalletEpk?.(error);
344
- this._rejectResponse?.(error);
344
+ this._rejectResponse(error);
345
345
  }
346
346
 
347
347
  private cleanup(): void {
@@ -29,6 +29,7 @@ import type { Jwk } from '@enbox/crypto';
29
29
  import { X25519 } from '@enbox/crypto';
30
30
  import { CONNECT_DENIED_TOKEN, ConnectProvider } from '@enbox/connect';
31
31
 
32
+ import { createHandledDeferred } from './handled-deferred.js';
32
33
  import {
33
34
  DWEB_CONNECT_ACK_MESSAGE_TYPE,
34
35
  DWEB_CONNECT_LOADED_MESSAGE_TYPE,
@@ -83,33 +84,32 @@ export class WalletPostMessageTransport {
83
84
  private readonly _recipientPrivateKey: Jwk;
84
85
 
85
86
  private _requestReceived = false;
86
- private _timeoutId?: ReturnType<typeof setTimeout>;
87
+ private readonly _timeoutId?: ReturnType<typeof setTimeout>;
87
88
  private _messageListener?: (event: MessageEvent) => void;
88
89
  private _resolveAck?: (acked: boolean) => void;
89
90
 
90
91
  private readonly _requestPromise: Promise<ConnectRequest>;
91
- private _resolveRequest?: (request: ConnectRequest) => void;
92
- private _rejectRequest?: (error: Error) => void;
92
+ private readonly _resolveRequest: (request: ConnectRequest) => void;
93
+ private readonly _rejectRequest: (error: Error) => void;
93
94
 
94
95
  private constructor(params: { dappOrigin: string; dappWindow: Window; recipientPrivateKey: Jwk; timeoutMs: number }) {
95
96
  this._dappOrigin = params.dappOrigin;
96
97
  this._dappWindow = params.dappWindow;
97
98
  this._recipientPrivateKey = params.recipientPrivateKey;
98
99
 
99
- this._requestPromise = new Promise<ConnectRequest>((resolve, reject): void => {
100
- this._resolveRequest = resolve;
101
- this._rejectRequest = reject;
102
- });
103
- // Mark early rejections (timeout before `awaitRequest()` is called) as
104
- // handled until the wallet attaches its own handlers.
105
- this._requestPromise.catch((): undefined => undefined);
100
+ // Early rejections (timeout before `awaitRequest()` is called) are
101
+ // pre-marked as handled until the wallet attaches its own handlers.
102
+ const request = createHandledDeferred<ConnectRequest>();
103
+ this._requestPromise = request.promise;
104
+ this._resolveRequest = request.resolve;
105
+ this._rejectRequest = request.reject;
106
106
 
107
107
  this._messageListener = (event: MessageEvent): void => { this.onMessage(event); };
108
108
  window.addEventListener('message', this._messageListener);
109
109
 
110
110
  this._timeoutId = setTimeout((): void => {
111
111
  this.close();
112
- this._rejectRequest?.(new Error('[@enbox/browser] Timed out waiting for the connect request from the dapp.'));
112
+ this._rejectRequest(new Error('[@enbox/browser] Timed out waiting for the connect request from the dapp.'));
113
113
  }, params.timeoutMs);
114
114
  }
115
115
 
@@ -123,7 +123,7 @@ export class WalletPostMessageTransport {
123
123
  */
124
124
  public static async create(options: WalletPostMessageTransportOptions = {}): Promise<WalletPostMessageTransport> {
125
125
  if (typeof window === 'undefined') {
126
- throw new Error('[@enbox/browser] WalletPostMessageTransport is only available in browser environments.');
126
+ throw new TypeError('[@enbox/browser] WalletPostMessageTransport is only available in browser environments.');
127
127
  }
128
128
 
129
129
  const dappWindow = options.dappWindow ?? window.opener as Window | null;
@@ -281,10 +281,10 @@ export class WalletPostMessageTransport {
281
281
  clearTimeout(this._timeoutId);
282
282
  if (outcome instanceof Error) {
283
283
  this.close();
284
- this._rejectRequest?.(outcome);
284
+ this._rejectRequest(outcome);
285
285
  return;
286
286
  }
287
- this._resolveRequest?.(outcome);
287
+ this._resolveRequest(outcome);
288
288
  }
289
289
  }
290
290
 
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Internal deferred-promise helper for the DWeb Connect transports.
3
+ *
4
+ * @module
5
+ */
6
+
7
+ /** A promise paired with its `resolve`/`reject` settlers. */
8
+ export type HandledDeferred<T> = {
9
+ /** The deferred promise. Rejections are pre-marked as handled. */
10
+ promise: Promise<T>;
11
+
12
+ /** Resolves {@link HandledDeferred.promise}. */
13
+ resolve: (value: T) => void;
14
+
15
+ /** Rejects {@link HandledDeferred.promise}. */
16
+ reject: (error: Error) => void;
17
+ };
18
+
19
+ /**
20
+ * Creates a promise alongside its `resolve`/`reject` settlers, with rejections
21
+ * pre-marked as handled — so a rejection that settles the promise before any
22
+ * consumer attaches handlers (e.g. a timeout firing first) never surfaces as
23
+ * an unhandled rejection.
24
+ */
25
+ export function createHandledDeferred<T>(): HandledDeferred<T> {
26
+ let resolve!: (value: T) => void;
27
+ let reject!: (error: Error) => void;
28
+
29
+ // The executor runs synchronously, so `resolve`/`reject` are assigned
30
+ // before the function returns.
31
+ const promise = new Promise<T>((res, rej): void => {
32
+ resolve = res;
33
+ reject = rej;
34
+ });
35
+ promise.catch((): undefined => undefined);
36
+
37
+ return { promise, resolve, reject };
38
+ }
package/src/index.ts CHANGED
@@ -29,12 +29,18 @@
29
29
  // The high-level Enbox API: DWN records, protocols, repositories.
30
30
 
31
31
  export {
32
+ createConnectionStore,
32
33
  Enbox,
33
34
  defineProtocol,
34
35
  repository,
35
36
  } from '@enbox/api';
36
37
 
37
38
  export type {
39
+ ConnectionPhase,
40
+ ConnectionSnapshot,
41
+ ConnectionSnapshotListener,
42
+ ConnectionStore,
43
+ ConnectionStoreOptions,
38
44
  EnboxAnonymousOptions,
39
45
  EnboxConnectOptions,
40
46
  EnboxConnectResult,
@@ -49,9 +55,11 @@ export type {
49
55
  export {
50
56
  AuthManager,
51
57
  AuthSession,
58
+ ConnectDeniedError,
52
59
  SESSION_EXPIRED_ERROR_CODE,
53
60
  SESSION_REVOKED_ERROR_CODE,
54
61
  computeConnectionStatus,
62
+ isConnectDeniedError,
55
63
  isSessionExpiredError,
56
64
  isSessionInvalidError,
57
65
  normalizeProtocolRequests,
@@ -143,9 +151,48 @@ export { TypedRecord } from '@enbox/api';
143
151
  export { BrowserStorage } from '@enbox/auth/browser';
144
152
  export type { ProviderAuthParams, ProviderAuthResult } from '@enbox/auth/browser';
145
153
 
154
+ // Public-profile read/cache layer (from @enbox/protocols): fetch other
155
+ // users' published profiles (displayName + avatar/hero) from their DWNs
156
+ // with caching, retries, negative caching, and refcounted subscriptions.
157
+ // Works over a connected records surface and over `Enbox.anonymous()`.
158
+ export { createProfileReader, isRetryableProfileReadStatus } from '@enbox/protocols';
159
+ export type {
160
+ ProfileEntryStatus,
161
+ ProfileFieldSnapshot,
162
+ ProfileFieldStatus,
163
+ ProfileImages,
164
+ ProfileReader,
165
+ ProfileReaderFailure,
166
+ ProfileReaderImagesMode,
167
+ ProfileReaderOptions,
168
+ ProfileReaderRecordsSurface,
169
+ ProfileReaderSource,
170
+ ProfileReaderTimers,
171
+ ProfileSnapshot,
172
+ ProfileWatchListener,
173
+ PublicProfile,
174
+ } from '@enbox/protocols';
175
+
146
176
  // DWN interface enum for typing agent requests (from @enbox/agent).
147
177
  export { DwnInterface } from '@enbox/agent';
148
178
 
179
+ // Sync-status observability for dapp "remotes" panels (from @enbox/agent).
180
+ // Subscribe with `agent.sync.on(event => …)` and snapshot per-remote health
181
+ // (healthy / quota-blocked / degraded / offline), including when a
182
+ // quota-blocked remote will next be re-probed, via
183
+ // `agent.sync.getRemoteSyncStatus()`; resume immediately with
184
+ // `agent.sync.retryRemoteNow(tenantDid, remoteEndpoint)`.
185
+ export type {
186
+ DeadLetterEntry,
187
+ RemoteSyncState,
188
+ RemoteSyncStatus,
189
+ SyncConnectivityState,
190
+ SyncEngine,
191
+ SyncEvent,
192
+ SyncEventListener,
193
+ SyncHealthSummary,
194
+ } from '@enbox/agent';
195
+
149
196
  // Common DWN primitives for record queries, permission scopes, and protocol
150
197
  // typing (from @enbox/dwn-sdk-js).
151
198
  export { DateSort, DwnInterfaceName, DwnMethodName } from '@enbox/dwn-sdk-js';
@@ -101,7 +101,7 @@ export interface RelayConnectOptions {
101
101
  * Cancellation signal: when it settles, polling stops and the handshake
102
102
  * rejects with {@link RelayConnectCancelledError}.
103
103
  */
104
- cancelled?: Promise<never> | undefined;
104
+ cancelled?: Promise<never>;
105
105
 
106
106
  /**
107
107
  * Invoked once when the relay reports the wallet has claimed (fetched)
@@ -236,39 +236,80 @@ export async function runRelayConnect(options: RelayConnectOptions): Promise<Con
236
236
  ? options.requestPin(attempt, lastError)
237
237
  : Promise.race([options.requestPin(attempt, lastError), options.cancelled]));
238
238
 
239
- try {
240
- const response = await openResponse({
241
- jwe : responseCiphertext,
242
- recipientPrivateKey : responsePrivateKey,
243
- expected : { clientDid: clientDid.uri, nonce, state },
244
- pin,
245
- });
246
-
247
- const delegatePortableDid = resolveDelegatePortableDid({
248
- localDelegatePortableDid: options.delegatePortableDid,
249
- response,
250
- });
251
-
252
- // Best-effort completion signal so the wallet can flip its pairing
253
- // screen to a confirmed "connected" state instead of leaving the user
254
- // to dismiss it blind. Fire-and-forget — mirrors the kernel client.
255
- void transport.confirmComplete?.().catch((): undefined => undefined);
256
-
257
- return {
239
+ const outcome = await attemptPinOpen({
240
+ responseCiphertext,
241
+ responsePrivateKey,
242
+ clientDid : clientDid.uri,
243
+ nonce,
244
+ state,
245
+ pin,
246
+ delegatePortableDid : options.delegatePortableDid,
247
+ confirmComplete : transport.confirmComplete?.bind(transport),
248
+ });
249
+ if (outcome.matched) {
250
+ return outcome.result;
251
+ }
252
+ lastError = outcome.error;
253
+ }
254
+
255
+ throw new Error(`[@enbox/browser] The pairing code did not match after ${MAX_PIN_ATTEMPTS} attempts.`);
256
+ }
257
+
258
+ /** One PIN attempt's outcome: either the delegated credentials, or a retryable failure. */
259
+ type PinAttemptOutcome =
260
+ | { matched: true; result: ConnectResult }
261
+ | { matched: false; error: Error };
262
+
263
+ /**
264
+ * Opens `responseCiphertext` with one PIN attempt and, on success, resolves
265
+ * the delegated credentials and fires the best-effort completion signal.
266
+ * Kernel value-check failures (`'Connect:'`-prefixed) are structural, not a
267
+ * mistyped code, so they rethrow instead of reporting a mismatch — the
268
+ * retry loop in {@link runRelayConnect} treats that as fatal.
269
+ */
270
+ async function attemptPinOpen(params: {
271
+ responseCiphertext: string;
272
+ responsePrivateKey: Jwk;
273
+ clientDid: string;
274
+ nonce: string;
275
+ state: string;
276
+ pin: string;
277
+ delegatePortableDid: PortableDid | undefined;
278
+ confirmComplete: (() => Promise<void>) | undefined;
279
+ }): Promise<PinAttemptOutcome> {
280
+ try {
281
+ const response = await openResponse({
282
+ jwe : params.responseCiphertext,
283
+ recipientPrivateKey : params.responsePrivateKey,
284
+ expected : { clientDid: params.clientDid, nonce: params.nonce, state: params.state },
285
+ pin : params.pin,
286
+ });
287
+
288
+ const delegatePortableDid = resolveDelegatePortableDid({
289
+ localDelegatePortableDid: params.delegatePortableDid,
290
+ response,
291
+ });
292
+
293
+ // Best-effort completion signal so the wallet can flip its pairing
294
+ // screen to a confirmed "connected" state instead of leaving the user
295
+ // to dismiss it blind. Fire-and-forget — mirrors the kernel client.
296
+ params.confirmComplete?.().catch((): undefined => undefined);
297
+
298
+ return {
299
+ matched : true,
300
+ result : {
258
301
  delegatePortableDid,
259
302
  delegateGrants : response.delegateGrants,
260
303
  connectedDid : response.providerDid,
261
304
  sessionRevocations : response.sessionRevocations,
262
- };
263
- } catch (error) {
264
- const failure = error instanceof Error ? error : new Error(String(error));
265
- if (failure.message.startsWith('Connect:')) {
266
- // Structural/value-check failure — retrying the PIN cannot help.
267
- throw failure;
268
- }
269
- lastError = failure;
305
+ },
306
+ };
307
+ } catch (error) {
308
+ const failure = error instanceof Error ? error : new Error(String(error));
309
+ if (failure.message.startsWith('Connect:')) {
310
+ // Structural/value-check failure — retrying the PIN cannot help.
311
+ throw failure;
270
312
  }
313
+ return { matched: false, error: failure };
271
314
  }
272
-
273
- throw new Error(`[@enbox/browser] The pairing code did not match after ${MAX_PIN_ATTEMPTS} attempts.`);
274
315
  }