@dexterai/connect 0.9.0 → 0.10.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.
- package/dist/{chunk-W5ISTMTY.js → chunk-ZHJ557FI.js} +12 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +3 -1
- package/dist/react.js +3 -8
- package/package.json +1 -1
|
@@ -347,6 +347,17 @@ function onStorageEvent(e) {
|
|
|
347
347
|
}
|
|
348
348
|
var ACTIVE_WALLET_STORAGE_KEY = ACTIVE_HANDLE_KEY;
|
|
349
349
|
|
|
350
|
+
// src/phase.ts
|
|
351
|
+
var PHASE_LABEL = {
|
|
352
|
+
challenge: "Preparing\u2026",
|
|
353
|
+
passkey: "Waiting for your passkey\u2026",
|
|
354
|
+
verifying: "Verifying\u2026",
|
|
355
|
+
finalizing: "Finishing\u2026"
|
|
356
|
+
};
|
|
357
|
+
function ceremonyPhaseLabel(phase) {
|
|
358
|
+
return PHASE_LABEL[phase];
|
|
359
|
+
}
|
|
360
|
+
|
|
350
361
|
// src/signals.ts
|
|
351
362
|
function pkc() {
|
|
352
363
|
if (typeof window === "undefined") return null;
|
|
@@ -423,6 +434,7 @@ export {
|
|
|
423
434
|
forgetWallet,
|
|
424
435
|
subscribe,
|
|
425
436
|
ACTIVE_WALLET_STORAGE_KEY,
|
|
437
|
+
ceremonyPhaseLabel,
|
|
426
438
|
passkeySignalSupport,
|
|
427
439
|
renamePasskey,
|
|
428
440
|
prunePasskey,
|
package/dist/index.d.ts
CHANGED
|
@@ -102,4 +102,12 @@ interface CreateWalletResult {
|
|
|
102
102
|
*/
|
|
103
103
|
declare function createWallet(config?: CreateWalletConfig): Promise<CreateWalletResult>;
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Human-readable label for a ceremony phase — the live "connecting step" copy.
|
|
107
|
+
* ONE source of truth so sign-in (SignInWithDexter) and create (consumer setup
|
|
108
|
+
* flows) show identical wording. Consumers surfacing createWallet's `onPhase`
|
|
109
|
+
* should use this instead of hand-rolling their own strings (Rule #7).
|
|
110
|
+
*/
|
|
111
|
+
declare function ceremonyPhaseLabel(phase: CeremonyPhase): string;
|
|
112
|
+
|
|
113
|
+
export { type AnonChallengeResult, type AnonServerPolicy, CeremonyPhase, ConnectVault, type CreateWalletConfig, type CreateWalletResult, DexterConnectConfig, SignInResult, ceremonyPhaseLabel, createAnonServerPolicy, createPasskeySigner, createWallet, passkeyLogin };
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
ConnectError,
|
|
4
4
|
base64urlToBytes,
|
|
5
5
|
bytesToBase64url,
|
|
6
|
+
ceremonyPhaseLabel,
|
|
6
7
|
createAnonServerPolicy,
|
|
7
8
|
createPasskeySigner,
|
|
8
9
|
ejectActiveWallet,
|
|
@@ -18,7 +19,7 @@ import {
|
|
|
18
19
|
subscribe,
|
|
19
20
|
switchWallet,
|
|
20
21
|
syncAcceptedPasskeys
|
|
21
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ZHJ557FI.js";
|
|
22
23
|
|
|
23
24
|
// src/enroll.ts
|
|
24
25
|
var DEFAULT_API_BASE = "https://api.dexter.cash";
|
|
@@ -152,6 +153,7 @@ async function readErrorCode(res) {
|
|
|
152
153
|
export {
|
|
153
154
|
ACTIVE_WALLET_STORAGE_KEY,
|
|
154
155
|
ConnectError,
|
|
156
|
+
ceremonyPhaseLabel,
|
|
155
157
|
createAnonServerPolicy,
|
|
156
158
|
createPasskeySigner,
|
|
157
159
|
createWallet,
|
package/dist/react.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ConnectError,
|
|
3
|
+
ceremonyPhaseLabel,
|
|
3
4
|
createPasskeySigner,
|
|
4
5
|
ejectActiveWallet,
|
|
5
6
|
getActiveHandle,
|
|
@@ -12,7 +13,7 @@ import {
|
|
|
12
13
|
setActiveHandle,
|
|
13
14
|
subscribe,
|
|
14
15
|
switchWallet
|
|
15
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZHJ557FI.js";
|
|
16
17
|
|
|
17
18
|
// src/useSignInWithDexter.ts
|
|
18
19
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
@@ -226,12 +227,6 @@ function DexterButton(props) {
|
|
|
226
227
|
|
|
227
228
|
// src/SignInWithDexter.tsx
|
|
228
229
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
229
|
-
var PHASE_LABEL = {
|
|
230
|
-
challenge: "Preparing\u2026",
|
|
231
|
-
passkey: "Waiting for your passkey\u2026",
|
|
232
|
-
verifying: "Verifying\u2026",
|
|
233
|
-
finalizing: "Finishing\u2026"
|
|
234
|
-
};
|
|
235
230
|
function shortAddress(addr) {
|
|
236
231
|
return addr.length > 10 ? `${addr.slice(0, 4)}\u2026${addr.slice(-4)}` : addr;
|
|
237
232
|
}
|
|
@@ -274,7 +269,7 @@ function SignInWithDexter(props) {
|
|
|
274
269
|
DexterButton,
|
|
275
270
|
{
|
|
276
271
|
loading: c.status === "pending",
|
|
277
|
-
loadingLabel: c.phase ?
|
|
272
|
+
loadingLabel: c.phase ? ceremonyPhaseLabel(c.phase) : "Connecting\u2026",
|
|
278
273
|
variant,
|
|
279
274
|
block,
|
|
280
275
|
className,
|