@dexterai/connect 0.29.1 → 0.31.1

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.
@@ -10,7 +10,7 @@ import {
10
10
  subscribe,
11
11
  walletBindingCandidate,
12
12
  walletProofSessionStore
13
- } from "./chunk-CZL7NGVV.js";
13
+ } from "./chunk-IPEINLMT.js";
14
14
 
15
15
  // src/relationController.ts
16
16
  function provisionalRelation(walletPresent, accountPresent) {
@@ -1,4 +1,4 @@
1
- import { P as PasskeyLoginTokens, o as PasskeyLoginConfig, a as CeremonyPhase, S as SignInResult } from './enroll-DrgEW0X8.js';
1
+ import { P as PasskeyLoginTokens, r as PasskeyLoginConfig, a as CeremonyPhase, S as SignInResult } from './enroll-Cqou8Pbi.js';
2
2
 
3
3
  /**
4
4
  * Framework-neutral Wallet/account relationship controller.
@@ -159,6 +159,17 @@ interface ResolveWalletAccountBindingInput {
159
159
  readonly signal?: AbortSignal;
160
160
  }
161
161
  type BindingFetch = (input: string | URL, init?: RequestInit) => Promise<Response>;
162
+ interface WalletIdentityFetchInput {
163
+ readonly wallet: WalletBindingCandidate;
164
+ readonly activeWallet: ActiveWalletBindingIdentity;
165
+ readonly url: string | URL;
166
+ readonly init?: RequestInit;
167
+ readonly fetch?: BindingFetch;
168
+ }
169
+ /** Send the retained identity proof to Dexter without exposing its token.
170
+ * Identity permits wallet reads; each financial action still requires its
171
+ * own authorization. Redirects cannot forward the proof to another origin. */
172
+ declare function fetchWithWalletIdentity(input: WalletIdentityFetchInput): Promise<Response>;
162
173
  interface WalletAccountBindingClientConfig {
163
174
  /** Compatibility option; only the canonical Dexter API origin is accepted. */
164
175
  readonly apiBase?: string;
@@ -225,4 +236,4 @@ interface DexterControlModel {
225
236
  */
226
237
  declare function createDexterControlModel(intent: DexterConnectionIntent, relation: WalletAccountRelationSnapshot): DexterControlModel;
227
238
 
228
- export { type ActiveWalletBindingIdentity as A, type BindingFetch as B, type ConnectDexterIdentityConfig as C, type DexterConnectionCapability as D, createWalletAccountBindingClient as E, disconnectDexterIdentity as F, walletBindingCandidate as G, type RelationCandidates as R, type ServerRelationVerificationRequest as S, type WalletBindingCandidate as W, type WalletAccountRelationSnapshot as a, type WalletAccountBindingClient as b, type AccountBindingCandidate as c, type AccountSessionClearer as d, type AccountSessionInstaller as e, type BindingResolutionResult as f, type DexterConnectionIntent as g, type DexterConnectionPermissions as h, type DexterControlModel as i, type DexterControlPrimaryAction as j, type DexterControlStage as k, type DisconnectDexterIdentityConfig as l, type RelationCheckReason as m, type RelationRuntime as n, type ResolveWalletAccountBindingInput as o, type ResolvedWalletAccountRelation as p, type ServerRelationVerificationResult as q, type ServerRelationVerifier as r, WALLET_ACCOUNT_BINDING_PATH as s, type WalletAccountBindingClientConfig as t, type WalletAccountRelation as u, WalletAccountRelationController as v, type WalletAccountRelationControllerOptions as w, accountBindingCandidate as x, connectDexterIdentity as y, createDexterControlModel as z };
239
+ export { type ActiveWalletBindingIdentity as A, type BindingFetch as B, type ConnectDexterIdentityConfig as C, type DexterConnectionCapability as D, createDexterControlModel as E, createWalletAccountBindingClient as F, disconnectDexterIdentity as G, fetchWithWalletIdentity as H, walletBindingCandidate as I, type RelationCandidates as R, type ServerRelationVerificationRequest as S, type WalletBindingCandidate as W, type WalletAccountRelationSnapshot as a, type WalletAccountBindingClient as b, type AccountBindingCandidate as c, type AccountSessionClearer as d, type AccountSessionInstaller as e, type BindingResolutionResult as f, type DexterConnectionIntent as g, type DexterConnectionPermissions as h, type DexterControlModel as i, type DexterControlPrimaryAction as j, type DexterControlStage as k, type DisconnectDexterIdentityConfig as l, type RelationCheckReason as m, type RelationRuntime as n, type ResolveWalletAccountBindingInput as o, type ResolvedWalletAccountRelation as p, type ServerRelationVerificationResult as q, type ServerRelationVerifier as r, WALLET_ACCOUNT_BINDING_PATH as s, type WalletAccountBindingClientConfig as t, type WalletAccountRelation as u, WalletAccountRelationController as v, type WalletAccountRelationControllerOptions as w, type WalletIdentityFetchInput as x, accountBindingCandidate as y, connectDexterIdentity as z };
@@ -70,7 +70,7 @@ type WalletStoreMode = 'commit' | 'provisional';
70
70
  */
71
71
  type AgentDelegationMode = 'configure-now' | 'deferred';
72
72
  /** Exact action the hosted Dexter consent window is being asked to perform. */
73
- type CeremonyOperation = 'signin' | 'create' | 'continue' | 'recover' | 'sign';
73
+ type CeremonyOperation = 'signin' | 'create' | 'continue' | 'recover' | 'sign' | 'recover-missing-vault';
74
74
  /** Minimal vault identity transferred to Dexter's hosted signing window. */
75
75
  interface HostedSignVaultIdentity {
76
76
  vaultPda: string;
@@ -94,6 +94,37 @@ interface HostedSignResult {
94
94
  clientDataJSON: Uint8Array;
95
95
  authenticatorData: Uint8Array;
96
96
  }
97
+ /** Durable account identity selected by the authenticated recovery API. */
98
+ interface MissingVaultRecoveryAccount {
99
+ provider: 'x';
100
+ /** Canonical X handle, including the leading @. */
101
+ handle: string;
102
+ }
103
+ /** Vault row attached to the already-authenticated account after recovery. */
104
+ interface MissingVaultRecoveryVault {
105
+ vaultPda: string;
106
+ swigAddress: string;
107
+ receiveAddress: string;
108
+ userHandle: string;
109
+ credentialId: string;
110
+ state: 'initialized';
111
+ }
112
+ /** Result of explicitly repairing an account whose passkey exists without its Vault row. */
113
+ interface MissingVaultRecoveryResult {
114
+ recovered: true;
115
+ alreadyRecovered: boolean;
116
+ relation: 'bound';
117
+ account: MissingVaultRecoveryAccount;
118
+ vault: MissingVaultRecoveryVault;
119
+ }
120
+ interface MissingVaultRecoveryConfig {
121
+ /** Supabase access token for the existing account being repaired. */
122
+ accountAccessToken: string;
123
+ /** Compatibility-only API base; omitted or exactly https://api.dexter.cash. */
124
+ apiBase?: string;
125
+ /** Compatibility-only hosted page; omitted or exactly https://dexter.cash/connect. */
126
+ connectHost?: string;
127
+ }
97
128
  /**
98
129
  * Vault identity on the wallet-only recover leg, as reported by
99
130
  * /api/passkey-vault-anon/status. Narrower than ConnectVault on purpose —
@@ -139,6 +170,8 @@ interface RecoverWalletConfig extends DexterConnectConfig {
139
170
  }
140
171
  /** Configuration for `passkeyLogin`. */
141
172
  interface PasskeyLoginConfig extends DexterConnectConfig {
173
+ /** Target a known account; use its saved credential and verify the returned identity. */
174
+ targetUserHandle?: string;
142
175
  /**
143
176
  * Wallet-store behavior after a successful passkey ceremony. Defaults to
144
177
  * `commit` for backward compatibility. Use `provisional` when the returned
@@ -242,4 +275,4 @@ interface CreateWalletResult {
242
275
  */
243
276
  declare function createWallet(config?: CreateWalletConfig): Promise<CreateWalletResult>;
244
277
 
245
- export { type AgentDelegationMode as A, type CreateWalletResult as C, type DexterConnectConfig as D, type HostedSignRequestPayload as H, type PasskeyLoginTokens as P, type RecoverOutcome as R, type SignInResult as S, type WalletStoreMode as W, type CeremonyPhase as a, type SpendPolicy as b, type ConnectVault as c, type RecoverWalletConfig as d, type WalletIdentityProof as e, type CeremonyOperation as f, ConnectError as g, type CreateWalletConfig as h, type HostedSignResult as i, type HostedSignVaultIdentity as j, type RecoverVault as k, SESSION_TTL_30D as l, authoredPolicy as m, createWallet as n, type PasskeyLoginConfig as o, usdToAtomic as u };
278
+ export { type AgentDelegationMode as A, type CreateWalletResult as C, type DexterConnectConfig as D, type HostedSignRequestPayload as H, type MissingVaultRecoveryConfig as M, type PasskeyLoginTokens as P, type RecoverOutcome as R, type SignInResult as S, type WalletStoreMode as W, type CeremonyPhase as a, type SpendPolicy as b, type MissingVaultRecoveryResult as c, type ConnectVault as d, type RecoverWalletConfig as e, type WalletIdentityProof as f, type CeremonyOperation as g, ConnectError as h, type CreateWalletConfig as i, type HostedSignResult as j, type HostedSignVaultIdentity as k, type MissingVaultRecoveryAccount as l, type MissingVaultRecoveryVault as m, type RecoverVault as n, SESSION_TTL_30D as o, authoredPolicy as p, createWallet as q, type PasskeyLoginConfig as r, usdToAtomic as u };
package/dist/hosted.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { S as SignInResult, C as CreateWalletResult, W as WalletStoreMode, a as CeremonyPhase, b as SpendPolicy, R as RecoverOutcome } from './enroll-DrgEW0X8.js';
1
+ import { S as SignInResult, C as CreateWalletResult, W as WalletStoreMode, a as CeremonyPhase, b as SpendPolicy, R as RecoverOutcome } from './enroll-Cqou8Pbi.js';
2
+ import { AuthenticationResponseJSON } from '@simplewebauthn/browser';
2
3
 
3
4
  type ContinueResult = ({
4
5
  kind: 'signin';
@@ -32,6 +33,7 @@ interface HostedCeremonyBase {
32
33
  }
33
34
  interface HostedSignInCeremony extends HostedCeremonyBase {
34
35
  operation: 'signin';
36
+ targetUserHandle?: string;
35
37
  }
36
38
  type HostedDelegationChoice = {
37
39
  agentDelegation: 'configure-now';
@@ -68,5 +70,11 @@ declare function runHostedCeremony(request: HostedSignInCeremony): Promise<SignI
68
70
  declare function runHostedCeremony(request: HostedContinueCeremony): Promise<HostedContinueResult>;
69
71
  declare function runHostedCeremony(request: HostedCreateCeremony): Promise<CreateWalletResult>;
70
72
  declare function runHostedCeremony(request: HostedRecoverCeremony): Promise<RecoverOutcome>;
73
+ /**
74
+ * Run only the account-bound missing-Vault proof supplied by an opener after
75
+ * the exact popup handshake. API/session binding and completion stay in the
76
+ * opener; this page receives no account token.
77
+ */
78
+ declare function runHostedMissingVaultRecoveryProof(options: unknown): Promise<AuthenticationResponseJSON>;
71
79
 
72
- export { DEXTER_HOSTED_CEREMONY_ORIGIN, type HostedCeremonyOperation, type HostedCeremonyRequest, type HostedCeremonyResult, type HostedContinueCeremony, type HostedContinueResult, type HostedCreateCeremony, type HostedRecoverCeremony, type HostedSignInCeremony, runHostedCeremony };
80
+ export { DEXTER_HOSTED_CEREMONY_ORIGIN, type HostedCeremonyOperation, type HostedCeremonyRequest, type HostedCeremonyResult, type HostedContinueCeremony, type HostedContinueResult, type HostedCreateCeremony, type HostedRecoverCeremony, type HostedSignInCeremony, runHostedCeremony, runHostedMissingVaultRecoveryProof };
package/dist/hosted.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import {
2
- recoverWallet
3
- } from "./chunk-LHYU2EZQ.js";
2
+ recoverWallet,
3
+ runHostedMissingVaultRecoveryProof
4
+ } from "./chunk-GIEQOIYI.js";
4
5
  import {
5
6
  ConnectError,
6
7
  DEXTER_API_BASE,
@@ -9,7 +10,7 @@ import {
9
10
  passkeyLogin,
10
11
  resolveAgentDelegationMode,
11
12
  resolveWalletStoreMode
12
- } from "./chunk-CZL7NGVV.js";
13
+ } from "./chunk-IPEINLMT.js";
13
14
  import "./chunk-EMCGL64H.js";
14
15
 
15
16
  // src/hosted.ts
@@ -25,6 +26,7 @@ async function runHostedCeremony(request) {
25
26
  {
26
27
  apiBase: DEXTER_API_BASE,
27
28
  transport: "inline",
29
+ ...request.targetUserHandle !== void 0 ? { targetUserHandle: request.targetUserHandle } : {},
28
30
  ...persistence
29
31
  },
30
32
  request.onPhase
@@ -63,6 +65,10 @@ async function runHostedCeremony(request) {
63
65
  throw new ConnectError("unsupported_hosted_ceremony");
64
66
  }
65
67
  }
68
+ async function runHostedMissingVaultRecoveryProof2(options) {
69
+ assertHostedCeremonyOrigin();
70
+ return runHostedMissingVaultRecoveryProof(options);
71
+ }
66
72
  function assertHostedDelegationChoice(request) {
67
73
  if (request.operation !== "continue" && request.operation !== "create") return;
68
74
  const agentDelegation = resolveAgentDelegationMode(
@@ -91,5 +97,6 @@ function assertHostedCeremonyOrigin() {
91
97
  }
92
98
  export {
93
99
  DEXTER_HOSTED_CEREMONY_ORIGIN,
94
- runHostedCeremony
100
+ runHostedCeremony,
101
+ runHostedMissingVaultRecoveryProof2 as runHostedMissingVaultRecoveryProof
95
102
  };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,20 @@
1
- import { c as ConnectVault, d as RecoverWalletConfig, R as RecoverOutcome, e as WalletIdentityProof, a as CeremonyPhase } from './enroll-DrgEW0X8.js';
2
- export { A as AgentDelegationMode, f as CeremonyOperation, g as ConnectError, h as CreateWalletConfig, C as CreateWalletResult, D as DexterConnectConfig, H as HostedSignRequestPayload, i as HostedSignResult, j as HostedSignVaultIdentity, P as PasskeyLoginTokens, k as RecoverVault, l as SESSION_TTL_30D, S as SignInResult, b as SpendPolicy, m as authoredPolicy, n as createWallet, u as usdToAtomic } from './enroll-DrgEW0X8.js';
1
+ import { M as MissingVaultRecoveryConfig, c as MissingVaultRecoveryResult, d as ConnectVault, e as RecoverWalletConfig, R as RecoverOutcome, f as WalletIdentityProof, a as CeremonyPhase } from './enroll-Cqou8Pbi.js';
2
+ export { A as AgentDelegationMode, g as CeremonyOperation, h as ConnectError, i as CreateWalletConfig, C as CreateWalletResult, D as DexterConnectConfig, H as HostedSignRequestPayload, j as HostedSignResult, k as HostedSignVaultIdentity, l as MissingVaultRecoveryAccount, m as MissingVaultRecoveryVault, P as PasskeyLoginTokens, n as RecoverVault, o as SESSION_TTL_30D, S as SignInResult, b as SpendPolicy, p as authoredPolicy, q as createWallet, u as usdToAtomic } from './enroll-Cqou8Pbi.js';
3
3
  import { PasskeySignerWithPublicKey } from '@dexterai/vault/signers';
4
- import { A as ActiveWalletBindingIdentity, W as WalletBindingCandidate, a as WalletAccountRelationSnapshot, B as BindingFetch, b as WalletAccountBindingClient } from './connectionContract-CR478cfF.js';
5
- export { c as AccountBindingCandidate, d as AccountSessionClearer, e as AccountSessionInstaller, f as BindingResolutionResult, C as ConnectDexterIdentityConfig, D as DexterConnectionCapability, g as DexterConnectionIntent, h as DexterConnectionPermissions, i as DexterControlModel, j as DexterControlPrimaryAction, k as DexterControlStage, l as DisconnectDexterIdentityConfig, R as RelationCandidates, m as RelationCheckReason, n as RelationRuntime, o as ResolveWalletAccountBindingInput, p as ResolvedWalletAccountRelation, S as ServerRelationVerificationRequest, q as ServerRelationVerificationResult, r as ServerRelationVerifier, s as WALLET_ACCOUNT_BINDING_PATH, t as WalletAccountBindingClientConfig, u as WalletAccountRelation, v as WalletAccountRelationController, w as WalletAccountRelationControllerOptions, x as accountBindingCandidate, y as connectDexterIdentity, z as createDexterControlModel, E as createWalletAccountBindingClient, F as disconnectDexterIdentity, G as walletBindingCandidate } from './connectionContract-CR478cfF.js';
4
+ import { A as ActiveWalletBindingIdentity, W as WalletBindingCandidate, a as WalletAccountRelationSnapshot, B as BindingFetch, b as WalletAccountBindingClient } from './connectionContract-BgecDiDk.js';
5
+ export { c as AccountBindingCandidate, d as AccountSessionClearer, e as AccountSessionInstaller, f as BindingResolutionResult, C as ConnectDexterIdentityConfig, D as DexterConnectionCapability, g as DexterConnectionIntent, h as DexterConnectionPermissions, i as DexterControlModel, j as DexterControlPrimaryAction, k as DexterControlStage, l as DisconnectDexterIdentityConfig, R as RelationCandidates, m as RelationCheckReason, n as RelationRuntime, o as ResolveWalletAccountBindingInput, p as ResolvedWalletAccountRelation, S as ServerRelationVerificationRequest, q as ServerRelationVerificationResult, r as ServerRelationVerifier, s as WALLET_ACCOUNT_BINDING_PATH, t as WalletAccountBindingClientConfig, u as WalletAccountRelation, v as WalletAccountRelationController, w as WalletAccountRelationControllerOptions, x as WalletIdentityFetchInput, y as accountBindingCandidate, z as connectDexterIdentity, E as createDexterControlModel, F as createWalletAccountBindingClient, G as disconnectDexterIdentity, H as fetchWithWalletIdentity, I as walletBindingCandidate } from './connectionContract-BgecDiDk.js';
6
6
  import { PublicKeyCredentialRequestOptionsJSON, AuthenticationResponseJSON } from '@simplewebauthn/browser';
7
7
 
8
+ /**
9
+ * Repair one confirmed split state: a Dexter passkey exists, but its Vault row
10
+ * is missing from the already-authenticated account. This never signs in,
11
+ * creates an account, or changes the browser's active Wallet.
12
+ *
13
+ * Call directly from a user click. The trusted popup opens synchronously; the
14
+ * account-authenticated challenge fetch begins only after it exists.
15
+ */
16
+ declare function recoverMissingVaultForAccount(config: MissingVaultRecoveryConfig): Promise<MissingVaultRecoveryResult>;
17
+
8
18
  /** What `issueChallenge` returns to the SDK signer. */
9
19
  interface AnonChallengeResult {
10
20
  /** Server-issued canonical 200-byte passkey-authorization envelope. */
@@ -641,4 +651,4 @@ declare function readAgentAuthority(input: {
641
651
  fetchImpl?: typeof fetch;
642
652
  }): Promise<AgentAuthorityStatus>;
643
653
 
644
- export { AGENT_AUTHORITY_NAMESPACE, AGENT_AUTHORITY_STATUS_NAMESPACE, type AgentAuthorityActiveRole, type AgentAuthorityApprovalMode, type AgentAuthorityAuthorization, type AgentAuthorityBootstrapRequest, type AgentAuthorityCapacity, AgentAuthorityError, type AgentAuthorityRule, type AgentAuthorityRuleBase, type AgentAuthorityStagedReceipt, type AgentAuthorityStatus, type AgentAuthorityTarget, AgentSpendError, type AgentSpendIdentity, type AgentSpendStatus, type AgentSpendTab, type AnonChallengeResult, type AnonServerPolicy, type AutomaticAgentSpend, BindingFetch, AgentAuthorityError as BoundedX402AuthorityError, type BoundedX402Authorization, type BoundedX402BootstrapRequest, type BoundedX402Draft, type BoundedX402Limits, type BoundedX402Rule, type BoundedX402StagedReceipt, type BoundedX402Validation, CeremonyPhase, ConnectVault, type CreatePasskeySignerOptions, type DexterIdentityCoordinator, type DexterIdentityCoordinatorOptions, type EnableAgentSpendResult, MAX_AUTHORITY_AMOUNT_ATOMIC, type PasskeySignalSupport, type RawAgentSpendSession, type RawAgentSpendStatus, RecoverOutcome, RecoverWalletConfig, type RevokeAgentSpendResult, type StagedAgentAuthorityRule, type TradeAuthorityRule, WALLET_PROOF_SESSION_STORAGE_PREFIX, WalletAccountBindingClient, WalletAccountRelationSnapshot, WalletBindingCandidate, WalletIdentityProof, type WalletProofLifecycleEvent, type WalletProofSession, type WalletProofSessionEvent, type WalletProofSessionOperation, type WalletProofSessionStorage, type WalletProofSessionStore, type WalletProofSessionStoreOptions, type WalletProofStorageEvent, type WalletProofStorageEventSource, type X402LimitDraft, type X402LimitValidation, type X402Limits, type X402PaymentAuthorityRule, X402_ALLOWED_SCHEMES, X402_ASSET, X402_COUNTERPARTY_SCOPE, X402_PROTOCOL_ID, X402_PROTOCOL_VERSION, assembleAgentSpendStatus, beginAgentAuthority, beginBoundedX402Authority, buildAgentAuthorityRequest, buildBoundedX402BootstrapRequest, buildX402PaymentRule, ceremonyPhaseLabel, createAnonServerPolicy, createDexterIdentityCoordinator, createPasskeySigner, createWalletProofSessionStore, describeAgentSpendError, enableAgentSpend, exactAgentAuthorityApprovalRedirect, exactBoundedX402ApprovalRedirect, noCustomX402Limits, passkeySignalSupport, prunePasskey, readAgentAuthority, recoverWallet, renamePasskey, revokeAgentSpend, stageAgentAuthority, stageBoundedX402Authority, syncAcceptedPasskeys, validateBoundedX402Draft, walletProofSessionStore };
654
+ export { AGENT_AUTHORITY_NAMESPACE, AGENT_AUTHORITY_STATUS_NAMESPACE, type AgentAuthorityActiveRole, type AgentAuthorityApprovalMode, type AgentAuthorityAuthorization, type AgentAuthorityBootstrapRequest, type AgentAuthorityCapacity, AgentAuthorityError, type AgentAuthorityRule, type AgentAuthorityRuleBase, type AgentAuthorityStagedReceipt, type AgentAuthorityStatus, type AgentAuthorityTarget, AgentSpendError, type AgentSpendIdentity, type AgentSpendStatus, type AgentSpendTab, type AnonChallengeResult, type AnonServerPolicy, type AutomaticAgentSpend, BindingFetch, AgentAuthorityError as BoundedX402AuthorityError, type BoundedX402Authorization, type BoundedX402BootstrapRequest, type BoundedX402Draft, type BoundedX402Limits, type BoundedX402Rule, type BoundedX402StagedReceipt, type BoundedX402Validation, CeremonyPhase, ConnectVault, type CreatePasskeySignerOptions, type DexterIdentityCoordinator, type DexterIdentityCoordinatorOptions, type EnableAgentSpendResult, MAX_AUTHORITY_AMOUNT_ATOMIC, MissingVaultRecoveryConfig, MissingVaultRecoveryResult, type PasskeySignalSupport, type RawAgentSpendSession, type RawAgentSpendStatus, RecoverOutcome, RecoverWalletConfig, type RevokeAgentSpendResult, type StagedAgentAuthorityRule, type TradeAuthorityRule, WALLET_PROOF_SESSION_STORAGE_PREFIX, WalletAccountBindingClient, WalletAccountRelationSnapshot, WalletBindingCandidate, WalletIdentityProof, type WalletProofLifecycleEvent, type WalletProofSession, type WalletProofSessionEvent, type WalletProofSessionOperation, type WalletProofSessionStorage, type WalletProofSessionStore, type WalletProofSessionStoreOptions, type WalletProofStorageEvent, type WalletProofStorageEventSource, type X402LimitDraft, type X402LimitValidation, type X402Limits, type X402PaymentAuthorityRule, X402_ALLOWED_SCHEMES, X402_ASSET, X402_COUNTERPARTY_SCOPE, X402_PROTOCOL_ID, X402_PROTOCOL_VERSION, assembleAgentSpendStatus, beginAgentAuthority, beginBoundedX402Authority, buildAgentAuthorityRequest, buildBoundedX402BootstrapRequest, buildX402PaymentRule, ceremonyPhaseLabel, createAnonServerPolicy, createDexterIdentityCoordinator, createPasskeySigner, createWalletProofSessionStore, describeAgentSpendError, enableAgentSpend, exactAgentAuthorityApprovalRedirect, exactBoundedX402ApprovalRedirect, noCustomX402Limits, passkeySignalSupport, prunePasskey, readAgentAuthority, recoverMissingVaultForAccount, recoverWallet, renamePasskey, revokeAgentSpend, stageAgentAuthority, stageBoundedX402Authority, syncAcceptedPasskeys, validateBoundedX402Draft, walletProofSessionStore };
package/dist/index.js CHANGED
@@ -9,10 +9,11 @@ import {
9
9
  prunePasskey,
10
10
  renamePasskey,
11
11
  syncAcceptedPasskeys
12
- } from "./chunk-2BTS6DCR.js";
12
+ } from "./chunk-UQE76AJW.js";
13
13
  import {
14
+ recoverMissingVaultForAccount,
14
15
  recoverWallet
15
- } from "./chunk-LHYU2EZQ.js";
16
+ } from "./chunk-GIEQOIYI.js";
16
17
  import {
17
18
  ConnectError,
18
19
  SESSION_TTL_30D,
@@ -24,6 +25,7 @@ import {
24
25
  createWallet,
25
26
  createWalletAccountBindingClient,
26
27
  createWalletProofSessionStore,
28
+ fetchWithWalletIdentity,
27
29
  openCeremonyPopup,
28
30
  readErrorCode,
29
31
  resolveDexterApiBase,
@@ -32,7 +34,7 @@ import {
32
34
  usdToAtomic,
33
35
  walletBindingCandidate,
34
36
  walletProofSessionStore
35
- } from "./chunk-CZL7NGVV.js";
37
+ } from "./chunk-IPEINLMT.js";
36
38
  import {
37
39
  base64ToBytes,
38
40
  base64urlToBytes,
@@ -962,10 +964,12 @@ export {
962
964
  enableAgentSpend,
963
965
  exactAgentAuthorityApprovalRedirect,
964
966
  exactBoundedX402ApprovalRedirect,
967
+ fetchWithWalletIdentity,
965
968
  noCustomX402Limits,
966
969
  passkeySignalSupport,
967
970
  prunePasskey,
968
971
  readAgentAuthority,
972
+ recoverMissingVaultForAccount,
969
973
  recoverWallet,
970
974
  renamePasskey,
971
975
  revokeAgentSpend,
package/dist/react.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- import { g as ConnectError, S as SignInResult, o as PasskeyLoginConfig, C as CreateWalletResult, A as AgentDelegationMode } from './enroll-DrgEW0X8.js';
2
- export { c as ConnectVault, R as RecoverOutcome, k as RecoverVault, e as WalletIdentityProof } from './enroll-DrgEW0X8.js';
3
- import { a as WalletAccountRelationSnapshot, i as DexterControlModel, g as DexterConnectionIntent, e as AccountSessionInstaller, d as AccountSessionClearer, B as BindingFetch } from './connectionContract-CR478cfF.js';
4
- export { D as DexterConnectionCapability, h as DexterConnectionPermissions, j as DexterControlPrimaryAction, k as DexterControlStage } from './connectionContract-CR478cfF.js';
5
- import { ButtonHTMLAttributes, ReactNode, ReactElement } from 'react';
1
+ import { h as ConnectError, S as SignInResult, r as PasskeyLoginConfig, C as CreateWalletResult, A as AgentDelegationMode } from './enroll-Cqou8Pbi.js';
2
+ export { d as ConnectVault, R as RecoverOutcome, n as RecoverVault, f as WalletIdentityProof } from './enroll-Cqou8Pbi.js';
3
+ import { i as DexterControlModel, a as WalletAccountRelationSnapshot, g as DexterConnectionIntent, e as AccountSessionInstaller, d as AccountSessionClearer, B as BindingFetch } from './connectionContract-BgecDiDk.js';
4
+ export { D as DexterConnectionCapability, h as DexterConnectionPermissions, j as DexterControlPrimaryAction, k as DexterControlStage } from './connectionContract-BgecDiDk.js';
5
+ import * as react from 'react';
6
+ import { ButtonHTMLAttributes, ReactNode, ReactElement, ComponentType, AnchorHTMLAttributes } from 'react';
6
7
 
7
8
  /** The Dexter passkey mark carried on the branded button. */
8
9
  declare function DexterMark(): ReactElement;
@@ -77,6 +78,10 @@ interface UseDexterConnectionConfig {
77
78
  readonly fetch?: BindingFetch;
78
79
  readonly passkey?: Omit<PasskeyLoginConfig, 'apiBase' | 'walletStore'>;
79
80
  }
81
+ interface DexterConnectionTarget {
82
+ /** Connect this account, targeting its saved passkey when available. */
83
+ readonly userHandle: string;
84
+ }
80
85
  interface UseDexterConnection {
81
86
  readonly model: DexterControlModel;
82
87
  readonly identity: DexterIdentityView;
@@ -84,8 +89,8 @@ interface UseDexterConnection {
84
89
  readonly operation: DexterConnectionOperation;
85
90
  readonly activeWallet: DexterWalletView | null;
86
91
  readonly error: ConnectError | null;
87
- connect(): Promise<SignInResult>;
88
- useAnotherDexterWallet(): Promise<SignInResult>;
92
+ connect(target?: DexterConnectionTarget): Promise<SignInResult>;
93
+ useAnotherDexterWallet(target?: DexterConnectionTarget): Promise<SignInResult>;
89
94
  disconnectDexter(): Promise<boolean>;
90
95
  removeFromThisDevice(confirmation: RemoveDexterFromDeviceConfirmation): Promise<RemoveDexterFromDeviceResult>;
91
96
  retry(): Promise<void>;
@@ -129,10 +134,79 @@ interface CreateWalletPanelProps {
129
134
  agentDelegation?: AgentDelegationMode;
130
135
  /** Extra className composed after the brand classes. */
131
136
  className?: string;
137
+ /** Account wording for the shared account control; wallet remains compatible. */
138
+ terminology?: 'wallet' | 'account';
139
+ /** Hide when the containing panel already carries Dexter's mark. */
140
+ withMark?: boolean;
132
141
  }
133
142
  /** The turnkey consent-at-birth create panel. */
134
143
  declare function CreateWalletPanel(props: CreateWalletPanelProps): ReactElement;
135
144
 
145
+ type AccountLinkComponent = ComponentType<AnchorHTMLAttributes<HTMLAnchorElement>>;
146
+ interface AccountDestination {
147
+ href: string;
148
+ label?: string;
149
+ }
150
+ interface AccountNavigation {
151
+ money: AccountDestination | false;
152
+ send: AccountDestination | false;
153
+ receive: AccountDestination | false;
154
+ activity: AccountDestination | false;
155
+ agents: AccountDestination | false;
156
+ profile: AccountDestination | false;
157
+ support: AccountDestination | false;
158
+ settings: AccountDestination | false;
159
+ }
160
+ /** Local app destinations can replace any hosted destination; false hides it. */
161
+ declare const DEFAULT_ACCOUNT_NAVIGATION: Readonly<AccountNavigation>;
162
+ interface AccountMenuItem {
163
+ id: string;
164
+ label: string;
165
+ href: string;
166
+ icon?: ReactNode;
167
+ hint?: string;
168
+ /** The host remains responsible for authorizing its destination. */
169
+ requires: 'account' | 'wallet';
170
+ }
171
+
172
+ interface DexterAccountControlProps {
173
+ /** Reuse the app's canonical useDexterConnection instance. */
174
+ connection: UseDexterConnection;
175
+ open?: boolean;
176
+ onOpenChange?: (open: boolean) => void;
177
+ /** Shown only after the connection verifies account access. */
178
+ profile?: {
179
+ name?: string;
180
+ email?: string;
181
+ };
182
+ navigation?: Partial<AccountNavigation>;
183
+ /** Host-specific links. The connection also gates the required access. */
184
+ items?: readonly AccountMenuItem[];
185
+ LinkComponent?: AccountLinkComponent;
186
+ /** Optional adapter for an existing portfolio reader; presentation stays shared. */
187
+ renderSummary?: (onNavigate: () => void) => ReactNode;
188
+ formatError?: (code?: string) => string;
189
+ className?: string;
190
+ triggerClassName?: string;
191
+ styleNonce?: string;
192
+ }
193
+ /** Branded account entry with canonical connection, balance and settings. */
194
+ declare function DexterAccountControl({ connection: dexter, open: controlledOpen, onOpenChange, profile, navigation, items, LinkComponent, renderSummary, formatError, className, triggerClassName, styleNonce, }: DexterAccountControlProps): react.JSX.Element;
195
+
196
+ interface DexterAccountSummaryProps {
197
+ /** Formatted value from a read bound to the currently selected account. */
198
+ amount: string | null;
199
+ loading: boolean;
200
+ partial?: boolean;
201
+ refresh: () => Promise<void>;
202
+ navigation?: Partial<AccountNavigation>;
203
+ LinkComponent?: AccountLinkComponent;
204
+ onNavigate?: () => void;
205
+ styleNonce?: string;
206
+ }
207
+ /** The same balance and money actions used by DexterAccountControl. */
208
+ declare function DexterAccountSummary({ amount, loading, partial, refresh, navigation, LinkComponent, onNavigate, styleNonce }: DexterAccountSummaryProps): react.JSX.Element;
209
+
136
210
  type InstallApp = 'claude' | 'chatgpt' | 'cursor' | 'vscode' | 'hermes' | 'claude-code';
137
211
  interface AppInstallButtonsProps {
138
212
  /** MCP endpoint to install. Default: OpenDexter. */
@@ -158,4 +232,4 @@ declare function hermesOpenUrl(name: string): string;
158
232
  declare function claudeCodeInstallCommand(name: string, mcpUrl: string): string;
159
233
  declare function AppInstallButtons(props: AppInstallButtonsProps): ReactElement;
160
234
 
161
- export { AllowanceChips, type AllowanceChipsProps, AppInstallButtons, type AppInstallButtonsProps, CreateWalletPanel, type CreateWalletPanelProps, CreateWalletResult, type DexterAccountSession, DexterButton, type DexterButtonProps, DexterConnectionIntent, type DexterConnectionOperation, DexterControlModel, type DexterIdentityView, DexterMark, type DexterWalletView, type InstallApp, REMOVE_DEXTER_FROM_DEVICE_CONFIRMATION, type RemoveDexterFromDeviceConfirmation, type RemoveDexterFromDeviceResult, SignInResult, type UseDexterConnection, type UseDexterConnectionConfig, WalletAccountRelationSnapshot, chatgptPluginsUrl, claudeCodeInstallCommand, claudeWebConnectorUrl, cursorInstallUrl, hermesInstallCommand, hermesOpenUrl, useDexterConnection, vscodeInstallUrl };
235
+ export { type AccountDestination, type AccountLinkComponent, type AccountMenuItem, type AccountNavigation, AllowanceChips, type AllowanceChipsProps, AppInstallButtons, type AppInstallButtonsProps, CreateWalletPanel, type CreateWalletPanelProps, CreateWalletResult, DEFAULT_ACCOUNT_NAVIGATION, DexterAccountControl, type DexterAccountControlProps, type DexterAccountSession, DexterAccountSummary, type DexterAccountSummaryProps, DexterButton, type DexterButtonProps, DexterConnectionIntent, type DexterConnectionOperation, type DexterConnectionTarget, DexterControlModel, type DexterIdentityView, DexterMark, type DexterWalletView, type InstallApp, REMOVE_DEXTER_FROM_DEVICE_CONFIRMATION, type RemoveDexterFromDeviceConfirmation, type RemoveDexterFromDeviceResult, SignInResult, type UseDexterConnection, type UseDexterConnectionConfig, WalletAccountRelationSnapshot, chatgptPluginsUrl, claudeCodeInstallCommand, claudeWebConnectorUrl, cursorInstallUrl, hermesInstallCommand, hermesOpenUrl, useDexterConnection, vscodeInstallUrl };