@bounded-sh/client 0.0.61 → 0.0.64

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 (58) hide show
  1. package/dist/auth/bounded-login-widget.d.ts +1 -1
  2. package/dist/auth/index.d.ts +4 -5
  3. package/dist/auth/providers/email-auth-provider.d.ts +4 -4
  4. package/dist/auth/turnkey-signer-bridge.d.ts +5 -0
  5. package/dist/{email-auth-provider-9BwSziWj.js → email-auth-provider-97CluDlZ.js} +27 -30
  6. package/dist/email-auth-provider-97CluDlZ.js.map +1 -0
  7. package/dist/{email-auth-provider-BttT2sZK.js → email-auth-provider-CKM4O5Z1.js} +27 -30
  8. package/dist/email-auth-provider-CKM4O5Z1.js.map +1 -0
  9. package/dist/{email-auth-provider-B3XaJw-G.mjs → email-auth-provider-h0fPnU76.mjs} +27 -30
  10. package/dist/email-auth-provider-h0fPnU76.mjs.map +1 -0
  11. package/dist/{email-auth-provider-Cb4VKA1E.mjs → email-auth-provider-v9xvY0Ky.mjs} +27 -30
  12. package/dist/email-auth-provider-v9xvY0Ky.mjs.map +1 -0
  13. package/dist/{guest-auth-provider-BBSFawAr.mjs → guest-auth-provider-BLRbjAv2.mjs} +2 -2
  14. package/dist/{guest-auth-provider-BBPpydtM.mjs.map → guest-auth-provider-BLRbjAv2.mjs.map} +1 -1
  15. package/dist/{guest-auth-provider-Di0TRg-z.js → guest-auth-provider-BvIf5W5c.js} +2 -2
  16. package/dist/{guest-auth-provider-Di0TRg-z.js.map → guest-auth-provider-BvIf5W5c.js.map} +1 -1
  17. package/dist/{guest-auth-provider-BcR-MQ0g.js → guest-auth-provider-CLnFuodt.js} +2 -2
  18. package/dist/{guest-auth-provider-BcR-MQ0g.js.map → guest-auth-provider-CLnFuodt.js.map} +1 -1
  19. package/dist/{guest-auth-provider-BBPpydtM.mjs → guest-auth-provider-Dmup2WIL.mjs} +2 -2
  20. package/dist/{guest-auth-provider-BBSFawAr.mjs.map → guest-auth-provider-Dmup2WIL.mjs.map} +1 -1
  21. package/dist/{index-L2R6C5Vl.mjs → index-7yz-Olrm.mjs} +1371 -1525
  22. package/dist/index-7yz-Olrm.mjs.map +1 -0
  23. package/dist/{index-C_L497w1.js → index-Bk0nEjB6.js} +1373 -1528
  24. package/dist/index-Bk0nEjB6.js.map +1 -0
  25. package/dist/index.js +1 -1
  26. package/dist/index.mjs +1 -1
  27. package/dist/{index.native-BIUs8t7F.mjs → index.native-CWcQMPZd.mjs} +518 -221
  28. package/dist/index.native-CWcQMPZd.mjs.map +1 -0
  29. package/dist/{index.native-BSheiGj2.js → index.native-Do-VhPUG.js} +520 -224
  30. package/dist/index.native-Do-VhPUG.js.map +1 -0
  31. package/dist/index.native.js +1 -1
  32. package/dist/index.native.mjs +1 -1
  33. package/dist/{injected-evm-wallet-provider-DgWUaVtt.js → injected-evm-wallet-provider-B5MA0w8I.js} +2 -2
  34. package/dist/{injected-evm-wallet-provider-DgWUaVtt.js.map → injected-evm-wallet-provider-B5MA0w8I.js.map} +1 -1
  35. package/dist/{injected-evm-wallet-provider-7XawIUdJ.js → injected-evm-wallet-provider-BMiT8I-4.js} +2 -2
  36. package/dist/{injected-evm-wallet-provider-7XawIUdJ.js.map → injected-evm-wallet-provider-BMiT8I-4.js.map} +1 -1
  37. package/dist/{injected-evm-wallet-provider-DSFDC8fh.mjs → injected-evm-wallet-provider-DlPsOmik.mjs} +2 -2
  38. package/dist/{injected-evm-wallet-provider-DSFDC8fh.mjs.map → injected-evm-wallet-provider-DlPsOmik.mjs.map} +1 -1
  39. package/dist/{injected-evm-wallet-provider-DnOrVMDX.mjs → injected-evm-wallet-provider-xvZq9Zli.mjs} +2 -2
  40. package/dist/{injected-evm-wallet-provider-DnOrVMDX.mjs.map → injected-evm-wallet-provider-xvZq9Zli.mjs.map} +1 -1
  41. package/dist/{injected-wallet-provider-oCRGuls5.js → injected-wallet-provider-CSj0lY9H.js} +2 -2
  42. package/dist/{injected-wallet-provider-oCRGuls5.js.map → injected-wallet-provider-CSj0lY9H.js.map} +1 -1
  43. package/dist/{injected-wallet-provider-BMDJntMD.js → injected-wallet-provider-CoE5XQQn.js} +2 -2
  44. package/dist/{injected-wallet-provider-BMDJntMD.js.map → injected-wallet-provider-CoE5XQQn.js.map} +1 -1
  45. package/dist/{injected-wallet-provider-ZkPzVj5W.mjs → injected-wallet-provider-Dd7ij6bc.mjs} +2 -2
  46. package/dist/{injected-wallet-provider-ZkPzVj5W.mjs.map → injected-wallet-provider-Dd7ij6bc.mjs.map} +1 -1
  47. package/dist/{injected-wallet-provider-DfJvN3sV.mjs → injected-wallet-provider-YHhhFzsj.mjs} +2 -2
  48. package/dist/{injected-wallet-provider-DfJvN3sV.mjs.map → injected-wallet-provider-YHhhFzsj.mjs.map} +1 -1
  49. package/package.json +2 -2
  50. package/dist/auth/crossmint-signer-bridge.d.ts +0 -45
  51. package/dist/email-auth-provider-9BwSziWj.js.map +0 -1
  52. package/dist/email-auth-provider-B3XaJw-G.mjs.map +0 -1
  53. package/dist/email-auth-provider-BttT2sZK.js.map +0 -1
  54. package/dist/email-auth-provider-Cb4VKA1E.mjs.map +0 -1
  55. package/dist/index-C_L497w1.js.map +0 -1
  56. package/dist/index-L2R6C5Vl.mjs.map +0 -1
  57. package/dist/index.native-BIUs8t7F.mjs.map +0 -1
  58. package/dist/index.native-BSheiGj2.js.map +0 -1
@@ -10,7 +10,7 @@ export interface BoundedWidgetOptions {
10
10
  title?: string;
11
11
  subtitle?: string;
12
12
  /**
13
- * Login mode. Defaults to the app's init() `authMode` (usually "bounded"). In
13
+ * Login mode. Defaults to the app's init() `authMode` ("turnkey" when omitted). In
14
14
  * "turnkey" mode the email lane runs Turnkey-native OTP INLINE in the widget
15
15
  * (no OIDC popup); social + wallet lanes are unchanged. The widget shape and
16
16
  * look are identical in both modes.
@@ -36,11 +36,10 @@ export declare function isEmailRequired(config: Partial<ClientConfig>): boolean;
36
36
  * settings without re-plumbing them through every call. */
37
37
  export declare function getInitConfig(): Partial<ClientConfig> | null;
38
38
  /**
39
- * Which LOGIN mode the app runs (default "bounded"). "turnkey" opts the app into
40
- * Turnkey-native email OTP: the unified widget runs the code entry INLINE (no OIDC
41
- * popup) via startTurnkeyEmailLogin(), and Bounded mints the session from Turnkey's
42
- * verification. The value comes from init() config (`authMode`); a `openBoundedWidget`
43
- * option can override it per call. Anything other than "turnkey" is "bounded".
39
+ * Which LOGIN mode the app runs (default "turnkey"). Turnkey-native email OTP keeps
40
+ * code entry inline in the unified widget (no OIDC popup), and Bounded mints the
41
+ * session from Turnkey's verification. Apps can explicitly select "bounded" for the
42
+ * legacy Better Auth email flow. A per-call openBoundedWidget option can override it.
44
43
  */
45
44
  export declare function resolveAuthMode(config: Partial<ClientConfig>): 'bounded' | 'turnkey';
46
45
  export { SOLANA_DEVNET_RPC_URL, SOLANA_MAINNET_RPC_URL, } from "./solana-rpc";
@@ -4,10 +4,10 @@ export declare class EmailAuthProvider implements AuthProvider {
4
4
  login(): Promise<User | null>;
5
5
  restoreSession(): Promise<User | null>;
6
6
  logout(): Promise<void>;
7
- signMessage(_message: string): Promise<string>;
8
- runTransaction(evm?: EVMTransaction, sol?: SolTransaction, options?: SetOptions): Promise<TransactionResult>;
9
- signTransaction(_t: Transaction | VersionedTransaction): Promise<Transaction | VersionedTransaction>;
10
- signAndSubmitTransaction(transaction: Transaction | VersionedTransaction, _feePayer?: PublicKey): Promise<string>;
7
+ signMessage(message: string): Promise<string>;
8
+ runTransaction(evm?: EVMTransaction, sol?: SolTransaction, _options?: SetOptions): Promise<TransactionResult>;
9
+ signTransaction(transaction: Transaction | VersionedTransaction): Promise<Transaction | VersionedTransaction>;
10
+ signAndSubmitTransaction(transaction: Transaction | VersionedTransaction, feePayer?: PublicKey): Promise<string>;
11
11
  getNativeMethods(): Promise<any>;
12
12
  }
13
13
  declare const emailProviderSingleton: EmailAuthProvider;
@@ -1,3 +1,4 @@
1
+ import type { PublicKey, Transaction, VersionedTransaction } from '@solana/web3.js';
1
2
  export interface TurnkeySignResult {
2
3
  /** 64-byte ed25519 signature. */
3
4
  signature: Uint8Array;
@@ -10,6 +11,7 @@ export interface TurnkeyWallet {
10
11
  address: string;
11
12
  subOrgId: string;
12
13
  }
14
+ export declare function hasTurnkeyWallet(): boolean;
13
15
  /**
14
16
  * Get-or-create the user's non-custodial Turnkey wallet, resolving with its stable
15
17
  * Solana address. On first use the popup enrolls a device passkey (Face ID / Touch ID)
@@ -30,3 +32,6 @@ export declare function getOrCreateTurnkeyWallet(): Promise<TurnkeyWallet>;
30
32
  * signatures are just a passkey approval.
31
33
  */
32
34
  export declare function signSolanaMessageViaTurnkey(message: Uint8Array): Promise<TurnkeySignResult>;
35
+ export declare function signMessageWithTurnkey(message: string): Promise<string>;
36
+ export declare function signTransactionWithTurnkey<T extends Transaction | VersionedTransaction>(transaction: T): Promise<T>;
37
+ export declare function signAndSubmitTransactionWithTurnkey(transaction: Transaction | VersionedTransaction, feePayer?: PublicKey): Promise<string>;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var core = require('@bounded-sh/core');
4
- var index = require('./index-C_L497w1.js');
4
+ var index = require('./index-Bk0nEjB6.js');
5
5
  require('react');
6
6
 
7
7
  // Web uses localStorage (WebSessionManager); React Native uses the configured
@@ -10,10 +10,8 @@ require('react');
10
10
  // RN too and would wrongly route to localStorage). Same selector the core
11
11
  // request path uses, so hosted Bounded Auth sessions persist + authenticate on BOTH.
12
12
  const sessionManager = core.getActiveSessionManager;
13
- const NO_WALLET = 'Email login has no embedded wallet. Enable `"auth": { "wallets": true }` in ' +
14
- 'the app policy so email logins get a non-custodial Crossmint wallet ' +
15
- '(@user.address), then sign from a user gesture. Otherwise use a wallet ' +
16
- 'provider (e.g. Phantom) for onchain actions.';
13
+ const NO_WALLET = 'This session has no Turnkey wallet. Sign in again to provision the default ' +
14
+ 'embedded wallet, or check whether the app explicitly sets auth.wallets:false.';
17
15
  // ---------------------------------------------------------------------------
18
16
  // token / session helpers
19
17
  // ---------------------------------------------------------------------------
@@ -36,11 +34,13 @@ function userFromIdToken(idToken, fallbackEmail) {
36
34
  const c = decodeJwt(idToken);
37
35
  const id = c['custom:userId'] || c.sub || c['custom:walletAddress'] || '';
38
36
  const email = (c.email || fallbackEmail || null);
39
- // Email logins have no wallet — address is null (the User type allows it).
40
- const evmAddress = typeof c['custom:evmWalletAddress'] === 'string' && /^0x[0-9a-fA-F]{40}$/.test(c['custom:evmWalletAddress'])
41
- ? c['custom:evmWalletAddress'].toLowerCase()
42
- : null;
43
- return { id, address: (c['custom:walletAddress'] || null), evmAddress, email, provider: emailProviderSingleton };
37
+ return {
38
+ id,
39
+ address: (c['custom:walletProvider'] === 'turnkey' && c['custom:walletAddress'] || null),
40
+ evmAddress: null,
41
+ email,
42
+ provider: emailProviderSingleton,
43
+ };
44
44
  }
45
45
  // ---------------------------------------------------------------------------
46
46
  // provider
@@ -66,32 +66,29 @@ class EmailAuthProvider {
66
66
  await sessionManager().clearSession();
67
67
  index.setCurrentUser(null);
68
68
  }
69
- // Crossmint Solana smart wallets sign+submit atomically and cannot produce a
70
- // raw signature — signMessage/signTransaction are structurally unsupported
71
- // (throw the clear "use signAndSubmitTransaction" error when a wallet exists;
72
- // the no-wallet error otherwise). signAndSubmitTransaction routes through the
73
- // Bounded signer popup for wallets-enabled email logins.
74
- async signMessage(_message) {
75
- throw new Error(index.hasEmbeddedWallet() ? index.EMBEDDED_WALLET_UNSUPPORTED : NO_WALLET);
69
+ async signMessage(message) {
70
+ if (!index.hasTurnkeyWallet())
71
+ throw new Error(NO_WALLET);
72
+ return index.signMessageWithTurnkey(message);
76
73
  }
77
- async runTransaction(evm, sol, options) {
74
+ async runTransaction(evm, sol, _options) {
78
75
  if (evm && sol)
79
76
  throw new Error('A transaction cannot target EVM and Solana at the same time.');
80
- if (!evm)
77
+ if (!index.hasTurnkeyWallet())
81
78
  throw new Error(NO_WALLET);
82
- if ((options === null || options === void 0 ? void 0 : options.shouldSubmitTx) === false)
83
- throw new Error('Embedded EVM wallets sign and submit atomically; shouldSubmitTx:false is unsupported.');
84
- if (!index.hasEmbeddedEvmWallet())
85
- throw new Error('This login has no embedded EVM wallet. Enable auth.wallets on an app with an EVM collection and sign in again.');
86
- return index.embeddedRunEvmTransaction(evm);
79
+ if (evm)
80
+ throw new Error('Turnkey embedded wallets currently support Solana only. Connect an EVM wallet for EVM transactions.');
81
+ throw new Error('This Solana transaction shape is not supported by the Turnkey provider. Use a pre-built transaction.');
87
82
  }
88
- async signTransaction(_t) {
89
- throw new Error(index.hasEmbeddedWallet() ? index.EMBEDDED_WALLET_UNSUPPORTED : NO_WALLET);
83
+ async signTransaction(transaction) {
84
+ if (!index.hasTurnkeyWallet())
85
+ throw new Error(NO_WALLET);
86
+ return index.signTransactionWithTurnkey(transaction);
90
87
  }
91
- async signAndSubmitTransaction(transaction, _feePayer) {
92
- if (!index.hasEmbeddedWallet())
88
+ async signAndSubmitTransaction(transaction, feePayer) {
89
+ if (!index.hasTurnkeyWallet())
93
90
  throw new Error(NO_WALLET);
94
- return index.embeddedSignAndSubmit(transaction);
91
+ return index.signAndSubmitTransactionWithTurnkey(transaction, feePayer);
95
92
  }
96
93
  async getNativeMethods() { return {}; }
97
94
  }
@@ -99,4 +96,4 @@ const emailProviderSingleton = new EmailAuthProvider();
99
96
 
100
97
  exports.EmailAuthProvider = EmailAuthProvider;
101
98
  exports.emailProviderSingleton = emailProviderSingleton;
102
- //# sourceMappingURL=email-auth-provider-9BwSziWj.js.map
99
+ //# sourceMappingURL=email-auth-provider-97CluDlZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-auth-provider-97CluDlZ.js","sources":["../.rollup-tmp/auth/providers/email-auth-provider.js"],"sourcesContent":["import { getActiveSessionManager } from '@bounded-sh/core';\nimport { setCurrentUser } from '../../global';\nimport { getPlatform } from '../../platform';\nimport { hasTurnkeyWallet, signAndSubmitTransactionWithTurnkey, signMessageWithTurnkey, signTransactionWithTurnkey, } from '../turnkey-signer-bridge';\n// Web uses localStorage (WebSessionManager); React Native uses the configured\n// ReactNativeSessionManager. getActiveSessionManager() picks the right one by\n// whether the RN manager was configured (NOT `typeof window`, which is truthy on\n// RN too and would wrongly route to localStorage). Same selector the core\n// request path uses, so hosted Bounded Auth sessions persist + authenticate on BOTH.\nconst sessionManager = getActiveSessionManager;\nconst NO_WALLET = 'This session has no Turnkey wallet. Sign in again to provision the default ' +\n 'embedded wallet, or check whether the app explicitly sets auth.wallets:false.';\n// ---------------------------------------------------------------------------\n// token / session helpers\n// ---------------------------------------------------------------------------\nfunction decodeJwt(token) {\n try {\n let b64 = token.split('.')[1].replace(/-/g, '+').replace(/_/g, '/');\n const pad = b64.length % 4;\n if (pad === 2)\n b64 += '==';\n else if (pad === 3)\n b64 += '=';\n // getPlatform().atob is RN-safe (global atob is undefined on Hermes/JSC).\n return JSON.parse(getPlatform().atob(b64));\n }\n catch (_a) {\n return {};\n }\n}\nfunction userFromIdToken(idToken, fallbackEmail) {\n const c = decodeJwt(idToken);\n const id = c['custom:userId'] || c.sub || c['custom:walletAddress'] || '';\n const email = (c.email || fallbackEmail || null);\n return {\n id,\n address: (c['custom:walletProvider'] === 'turnkey' && c['custom:walletAddress'] || null),\n evmAddress: null,\n email,\n provider: emailProviderSingleton,\n };\n}\n// ---------------------------------------------------------------------------\n// provider\n// ---------------------------------------------------------------------------\nexport class EmailAuthProvider {\n async login() {\n throw new Error('login() no longer opens inline email OTP. Use loginWithRedirect({ redirectUri }) ' +\n 'or loginWithPopup({ redirectUri }) for hosted Bounded Auth.');\n }\n async restoreSession() {\n const sm = sessionManager();\n const session = await sm.getSession();\n if (!session)\n return null;\n const idToken = sm.getIdToken();\n if (!idToken)\n return null;\n const user = userFromIdToken(idToken);\n setCurrentUser(user);\n return user;\n }\n async logout() {\n await sessionManager().clearSession();\n setCurrentUser(null);\n }\n async signMessage(message) {\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n return signMessageWithTurnkey(message);\n }\n async runTransaction(evm, sol, _options) {\n if (evm && sol)\n throw new Error('A transaction cannot target EVM and Solana at the same time.');\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n if (evm)\n throw new Error('Turnkey embedded wallets currently support Solana only. Connect an EVM wallet for EVM transactions.');\n throw new Error('This Solana transaction shape is not supported by the Turnkey provider. Use a pre-built transaction.');\n }\n async signTransaction(transaction) {\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n return signTransactionWithTurnkey(transaction);\n }\n async signAndSubmitTransaction(transaction, feePayer) {\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n return signAndSubmitTransactionWithTurnkey(transaction, feePayer);\n }\n async getNativeMethods() { return {}; }\n}\nconst emailProviderSingleton = new EmailAuthProvider();\nexport { emailProviderSingleton };\n"],"names":["getActiveSessionManager","getPlatform","setCurrentUser","hasTurnkeyWallet","signMessageWithTurnkey","signTransactionWithTurnkey","signAndSubmitTransactionWithTurnkey"],"mappings":";;;;;;AAIA;AACA;AACA;AACA;AACA;AACA,MAAM,cAAc,GAAGA,4BAAuB;AAC9C,MAAM,SAAS,GAAG,6EAA6E;AAC/F,IAAI,+EAA+E;AACnF;AACA;AACA;AACA,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,IAAI,IAAI;AACR,QAAQ,IAAI,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;AAC3E,QAAQ,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC;AAClC,QAAQ,IAAI,GAAG,KAAK,CAAC;AACrB,YAAY,GAAG,IAAI,IAAI;AACvB,aAAa,IAAI,GAAG,KAAK,CAAC;AAC1B,YAAY,GAAG,IAAI,GAAG;AACtB;AACA,QAAQ,OAAO,IAAI,CAAC,KAAK,CAACC,iBAAW,EAAE,CAAC,IAAI,CAAC,GAAG,C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,iBAAiB;;;;;"}
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var core = require('@bounded-sh/core');
4
- var index_native = require('./index.native-BSheiGj2.js');
4
+ var index_native = require('./index.native-Do-VhPUG.js');
5
5
  require('react');
6
6
 
7
7
  // Web uses localStorage (WebSessionManager); React Native uses the configured
@@ -10,10 +10,8 @@ require('react');
10
10
  // RN too and would wrongly route to localStorage). Same selector the core
11
11
  // request path uses, so hosted Bounded Auth sessions persist + authenticate on BOTH.
12
12
  const sessionManager = core.getActiveSessionManager;
13
- const NO_WALLET = 'Email login has no embedded wallet. Enable `"auth": { "wallets": true }` in ' +
14
- 'the app policy so email logins get a non-custodial Crossmint wallet ' +
15
- '(@user.address), then sign from a user gesture. Otherwise use a wallet ' +
16
- 'provider (e.g. Phantom) for onchain actions.';
13
+ const NO_WALLET = 'This session has no Turnkey wallet. Sign in again to provision the default ' +
14
+ 'embedded wallet, or check whether the app explicitly sets auth.wallets:false.';
17
15
  // ---------------------------------------------------------------------------
18
16
  // token / session helpers
19
17
  // ---------------------------------------------------------------------------
@@ -36,11 +34,13 @@ function userFromIdToken(idToken, fallbackEmail) {
36
34
  const c = decodeJwt(idToken);
37
35
  const id = c['custom:userId'] || c.sub || c['custom:walletAddress'] || '';
38
36
  const email = (c.email || fallbackEmail || null);
39
- // Email logins have no wallet — address is null (the User type allows it).
40
- const evmAddress = typeof c['custom:evmWalletAddress'] === 'string' && /^0x[0-9a-fA-F]{40}$/.test(c['custom:evmWalletAddress'])
41
- ? c['custom:evmWalletAddress'].toLowerCase()
42
- : null;
43
- return { id, address: (c['custom:walletAddress'] || null), evmAddress, email, provider: emailProviderSingleton };
37
+ return {
38
+ id,
39
+ address: (c['custom:walletProvider'] === 'turnkey' && c['custom:walletAddress'] || null),
40
+ evmAddress: null,
41
+ email,
42
+ provider: emailProviderSingleton,
43
+ };
44
44
  }
45
45
  // ---------------------------------------------------------------------------
46
46
  // provider
@@ -66,32 +66,29 @@ class EmailAuthProvider {
66
66
  await sessionManager().clearSession();
67
67
  index_native.setCurrentUser(null);
68
68
  }
69
- // Crossmint Solana smart wallets sign+submit atomically and cannot produce a
70
- // raw signature — signMessage/signTransaction are structurally unsupported
71
- // (throw the clear "use signAndSubmitTransaction" error when a wallet exists;
72
- // the no-wallet error otherwise). signAndSubmitTransaction routes through the
73
- // Bounded signer popup for wallets-enabled email logins.
74
- async signMessage(_message) {
75
- throw new Error(index_native.hasEmbeddedWallet() ? index_native.EMBEDDED_WALLET_UNSUPPORTED : NO_WALLET);
69
+ async signMessage(message) {
70
+ if (!index_native.hasTurnkeyWallet())
71
+ throw new Error(NO_WALLET);
72
+ return index_native.signMessageWithTurnkey(message);
76
73
  }
77
- async runTransaction(evm, sol, options) {
74
+ async runTransaction(evm, sol, _options) {
78
75
  if (evm && sol)
79
76
  throw new Error('A transaction cannot target EVM and Solana at the same time.');
80
- if (!evm)
77
+ if (!index_native.hasTurnkeyWallet())
81
78
  throw new Error(NO_WALLET);
82
- if ((options === null || options === void 0 ? void 0 : options.shouldSubmitTx) === false)
83
- throw new Error('Embedded EVM wallets sign and submit atomically; shouldSubmitTx:false is unsupported.');
84
- if (!index_native.hasEmbeddedEvmWallet())
85
- throw new Error('This login has no embedded EVM wallet. Enable auth.wallets on an app with an EVM collection and sign in again.');
86
- return index_native.embeddedRunEvmTransaction(evm);
79
+ if (evm)
80
+ throw new Error('Turnkey embedded wallets currently support Solana only. Connect an EVM wallet for EVM transactions.');
81
+ throw new Error('This Solana transaction shape is not supported by the Turnkey provider. Use a pre-built transaction.');
87
82
  }
88
- async signTransaction(_t) {
89
- throw new Error(index_native.hasEmbeddedWallet() ? index_native.EMBEDDED_WALLET_UNSUPPORTED : NO_WALLET);
83
+ async signTransaction(transaction) {
84
+ if (!index_native.hasTurnkeyWallet())
85
+ throw new Error(NO_WALLET);
86
+ return index_native.signTransactionWithTurnkey(transaction);
90
87
  }
91
- async signAndSubmitTransaction(transaction, _feePayer) {
92
- if (!index_native.hasEmbeddedWallet())
88
+ async signAndSubmitTransaction(transaction, feePayer) {
89
+ if (!index_native.hasTurnkeyWallet())
93
90
  throw new Error(NO_WALLET);
94
- return index_native.embeddedSignAndSubmit(transaction);
91
+ return index_native.signAndSubmitTransactionWithTurnkey(transaction, feePayer);
95
92
  }
96
93
  async getNativeMethods() { return {}; }
97
94
  }
@@ -99,4 +96,4 @@ const emailProviderSingleton = new EmailAuthProvider();
99
96
 
100
97
  exports.EmailAuthProvider = EmailAuthProvider;
101
98
  exports.emailProviderSingleton = emailProviderSingleton;
102
- //# sourceMappingURL=email-auth-provider-BttT2sZK.js.map
99
+ //# sourceMappingURL=email-auth-provider-CKM4O5Z1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-auth-provider-CKM4O5Z1.js","sources":["../.rollup-tmp/auth/providers/email-auth-provider.js"],"sourcesContent":["import { getActiveSessionManager } from '@bounded-sh/core';\nimport { setCurrentUser } from '../../global';\nimport { getPlatform } from '../../platform';\nimport { hasTurnkeyWallet, signAndSubmitTransactionWithTurnkey, signMessageWithTurnkey, signTransactionWithTurnkey, } from '../turnkey-signer-bridge';\n// Web uses localStorage (WebSessionManager); React Native uses the configured\n// ReactNativeSessionManager. getActiveSessionManager() picks the right one by\n// whether the RN manager was configured (NOT `typeof window`, which is truthy on\n// RN too and would wrongly route to localStorage). Same selector the core\n// request path uses, so hosted Bounded Auth sessions persist + authenticate on BOTH.\nconst sessionManager = getActiveSessionManager;\nconst NO_WALLET = 'This session has no Turnkey wallet. Sign in again to provision the default ' +\n 'embedded wallet, or check whether the app explicitly sets auth.wallets:false.';\n// ---------------------------------------------------------------------------\n// token / session helpers\n// ---------------------------------------------------------------------------\nfunction decodeJwt(token) {\n try {\n let b64 = token.split('.')[1].replace(/-/g, '+').replace(/_/g, '/');\n const pad = b64.length % 4;\n if (pad === 2)\n b64 += '==';\n else if (pad === 3)\n b64 += '=';\n // getPlatform().atob is RN-safe (global atob is undefined on Hermes/JSC).\n return JSON.parse(getPlatform().atob(b64));\n }\n catch (_a) {\n return {};\n }\n}\nfunction userFromIdToken(idToken, fallbackEmail) {\n const c = decodeJwt(idToken);\n const id = c['custom:userId'] || c.sub || c['custom:walletAddress'] || '';\n const email = (c.email || fallbackEmail || null);\n return {\n id,\n address: (c['custom:walletProvider'] === 'turnkey' && c['custom:walletAddress'] || null),\n evmAddress: null,\n email,\n provider: emailProviderSingleton,\n };\n}\n// ---------------------------------------------------------------------------\n// provider\n// ---------------------------------------------------------------------------\nexport class EmailAuthProvider {\n async login() {\n throw new Error('login() no longer opens inline email OTP. Use loginWithRedirect({ redirectUri }) ' +\n 'or loginWithPopup({ redirectUri }) for hosted Bounded Auth.');\n }\n async restoreSession() {\n const sm = sessionManager();\n const session = await sm.getSession();\n if (!session)\n return null;\n const idToken = sm.getIdToken();\n if (!idToken)\n return null;\n const user = userFromIdToken(idToken);\n setCurrentUser(user);\n return user;\n }\n async logout() {\n await sessionManager().clearSession();\n setCurrentUser(null);\n }\n async signMessage(message) {\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n return signMessageWithTurnkey(message);\n }\n async runTransaction(evm, sol, _options) {\n if (evm && sol)\n throw new Error('A transaction cannot target EVM and Solana at the same time.');\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n if (evm)\n throw new Error('Turnkey embedded wallets currently support Solana only. Connect an EVM wallet for EVM transactions.');\n throw new Error('This Solana transaction shape is not supported by the Turnkey provider. Use a pre-built transaction.');\n }\n async signTransaction(transaction) {\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n return signTransactionWithTurnkey(transaction);\n }\n async signAndSubmitTransaction(transaction, feePayer) {\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n return signAndSubmitTransactionWithTurnkey(transaction, feePayer);\n }\n async getNativeMethods() { return {}; }\n}\nconst emailProviderSingleton = new EmailAuthProvider();\nexport { emailProviderSingleton };\n"],"names":["getActiveSessionManager","getPlatform","setCurrentUser","hasTurnkeyWallet","signM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;AAC/B,YAAY,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC;AACtC,QAAQ,IAAI,GAAG;AACf,YAAY,MAAM,IAAI,KAAK,CAAC,qGAAqG,CAAC;AAClI,QAAQ,MAAM,IAAI,KAAK,CAAC,sGAAsG,CAAC;AAC/H,IAAI;AACJ,IAAI,MAAM,eAAe,CAAC,WAAW,EAAE;AACvC,QAAQ,IAAI,CAACA,6BAAgB,EAAE;AAC/B,YAAY,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC;AACtC,QAAQ,OAAOE,uCAA0B,CAAC,WAAW,CAAC;AACtD,IAAI;AACJ,IAAI,MAAM,wBAAwB,CAAC,WAAW,EAAE,QAAQ,EAAE;AAC1D,QAAQ,IAAI,CAACF,6BAAgB,EAAE;AAC/B,YAAY,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC;AACtC,QAAQ,OAAOG,gDAAmC,CAAC,WAAW,EAAE,QAAQ,CAAC;AACzE,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AAC1C;AACK,MAAC,sBAAsB,GAAG,IAAI,iBAAiB;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { getActiveSessionManager } from '@bounded-sh/core';
2
- import { s as setCurrentUser, E as EMBEDDED_WALLET_UNSUPPORTED, h as hasEmbeddedWallet, a as hasEmbeddedEvmWallet, e as embeddedRunEvmTransaction, b as embeddedSignAndSubmit, g as getPlatform } from './index-L2R6C5Vl.mjs';
2
+ import { s as setCurrentUser, h as hasTurnkeyWallet, a as signMessageWithTurnkey, b as signTransactionWithTurnkey, c as signAndSubmitTransactionWithTurnkey, g as getPlatform } from './index.native-CWcQMPZd.mjs';
3
3
  import 'react';
4
4
 
5
5
  // Web uses localStorage (WebSessionManager); React Native uses the configured
@@ -8,10 +8,8 @@ import 'react';
8
8
  // RN too and would wrongly route to localStorage). Same selector the core
9
9
  // request path uses, so hosted Bounded Auth sessions persist + authenticate on BOTH.
10
10
  const sessionManager = getActiveSessionManager;
11
- const NO_WALLET = 'Email login has no embedded wallet. Enable `"auth": { "wallets": true }` in ' +
12
- 'the app policy so email logins get a non-custodial Crossmint wallet ' +
13
- '(@user.address), then sign from a user gesture. Otherwise use a wallet ' +
14
- 'provider (e.g. Phantom) for onchain actions.';
11
+ const NO_WALLET = 'This session has no Turnkey wallet. Sign in again to provision the default ' +
12
+ 'embedded wallet, or check whether the app explicitly sets auth.wallets:false.';
15
13
  // ---------------------------------------------------------------------------
16
14
  // token / session helpers
17
15
  // ---------------------------------------------------------------------------
@@ -34,11 +32,13 @@ function userFromIdToken(idToken, fallbackEmail) {
34
32
  const c = decodeJwt(idToken);
35
33
  const id = c['custom:userId'] || c.sub || c['custom:walletAddress'] || '';
36
34
  const email = (c.email || fallbackEmail || null);
37
- // Email logins have no wallet — address is null (the User type allows it).
38
- const evmAddress = typeof c['custom:evmWalletAddress'] === 'string' && /^0x[0-9a-fA-F]{40}$/.test(c['custom:evmWalletAddress'])
39
- ? c['custom:evmWalletAddress'].toLowerCase()
40
- : null;
41
- return { id, address: (c['custom:walletAddress'] || null), evmAddress, email, provider: emailProviderSingleton };
35
+ return {
36
+ id,
37
+ address: (c['custom:walletProvider'] === 'turnkey' && c['custom:walletAddress'] || null),
38
+ evmAddress: null,
39
+ email,
40
+ provider: emailProviderSingleton,
41
+ };
42
42
  }
43
43
  // ---------------------------------------------------------------------------
44
44
  // provider
@@ -64,36 +64,33 @@ class EmailAuthProvider {
64
64
  await sessionManager().clearSession();
65
65
  setCurrentUser(null);
66
66
  }
67
- // Crossmint Solana smart wallets sign+submit atomically and cannot produce a
68
- // raw signature — signMessage/signTransaction are structurally unsupported
69
- // (throw the clear "use signAndSubmitTransaction" error when a wallet exists;
70
- // the no-wallet error otherwise). signAndSubmitTransaction routes through the
71
- // Bounded signer popup for wallets-enabled email logins.
72
- async signMessage(_message) {
73
- throw new Error(hasEmbeddedWallet() ? EMBEDDED_WALLET_UNSUPPORTED : NO_WALLET);
67
+ async signMessage(message) {
68
+ if (!hasTurnkeyWallet())
69
+ throw new Error(NO_WALLET);
70
+ return signMessageWithTurnkey(message);
74
71
  }
75
- async runTransaction(evm, sol, options) {
72
+ async runTransaction(evm, sol, _options) {
76
73
  if (evm && sol)
77
74
  throw new Error('A transaction cannot target EVM and Solana at the same time.');
78
- if (!evm)
75
+ if (!hasTurnkeyWallet())
79
76
  throw new Error(NO_WALLET);
80
- if ((options === null || options === void 0 ? void 0 : options.shouldSubmitTx) === false)
81
- throw new Error('Embedded EVM wallets sign and submit atomically; shouldSubmitTx:false is unsupported.');
82
- if (!hasEmbeddedEvmWallet())
83
- throw new Error('This login has no embedded EVM wallet. Enable auth.wallets on an app with an EVM collection and sign in again.');
84
- return embeddedRunEvmTransaction(evm);
77
+ if (evm)
78
+ throw new Error('Turnkey embedded wallets currently support Solana only. Connect an EVM wallet for EVM transactions.');
79
+ throw new Error('This Solana transaction shape is not supported by the Turnkey provider. Use a pre-built transaction.');
85
80
  }
86
- async signTransaction(_t) {
87
- throw new Error(hasEmbeddedWallet() ? EMBEDDED_WALLET_UNSUPPORTED : NO_WALLET);
81
+ async signTransaction(transaction) {
82
+ if (!hasTurnkeyWallet())
83
+ throw new Error(NO_WALLET);
84
+ return signTransactionWithTurnkey(transaction);
88
85
  }
89
- async signAndSubmitTransaction(transaction, _feePayer) {
90
- if (!hasEmbeddedWallet())
86
+ async signAndSubmitTransaction(transaction, feePayer) {
87
+ if (!hasTurnkeyWallet())
91
88
  throw new Error(NO_WALLET);
92
- return embeddedSignAndSubmit(transaction);
89
+ return signAndSubmitTransactionWithTurnkey(transaction, feePayer);
93
90
  }
94
91
  async getNativeMethods() { return {}; }
95
92
  }
96
93
  const emailProviderSingleton = new EmailAuthProvider();
97
94
 
98
95
  export { EmailAuthProvider, emailProviderSingleton };
99
- //# sourceMappingURL=email-auth-provider-B3XaJw-G.mjs.map
96
+ //# sourceMappingURL=email-auth-provider-h0fPnU76.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-auth-provider-h0fPnU76.mjs","sources":["../.rollup-tmp/auth/providers/email-auth-provider.js"],"sourcesContent":["import { getActiveSessionManager } from '@bounded-sh/core';\nimport { setCurrentUser } from '../../global';\nimport { getPlatform } from '../../platform';\nimport { hasTurnkeyWallet, signAndSubmitTransactionWithTurnkey, signMessageWithTurnkey, signTransactionWithTurnkey, } from '../turnkey-signer-bridge';\n// Web uses localStorage (WebSessionManager); React Native uses the configured\n// ReactNativeSessionManager. getActiveSessionManager() picks the right one by\n// whether the RN manager was configured (NOT `typeof window`, which is truthy on\n// RN too and would wrongly route to localStorage). Same selector the core\n// request path uses, so hosted Bounded Auth sessions persist + authenticate on BOTH.\nconst sessionManager = getActiveSessionManager;\nconst NO_WALLET = 'This session has no Turnkey wallet. Sign in again to provision the default ' +\n 'embedded wallet, or check whether the app explicitly sets auth.wallets:false.';\n// ---------------------------------------------------------------------------\n// token / session helpers\n// ---------------------------------------------------------------------------\nfunction decodeJwt(token) {\n try {\n let b64 = token.split('.')[1].replace(/-/g, '+').replace(/_/g, '/');\n const pad = b64.length % 4;\n if (pad === 2)\n b64 += '==';\n else if (pad === 3)\n b64 += '=';\n // getPlatform().atob is RN-safe (global atob is undefined on Hermes/JSC).\n return JSON.parse(getPlatform().atob(b64));\n }\n catch (_a) {\n return {};\n }\n}\nfunction userFromIdToken(idToken, fallbackEmail) {\n const c = decodeJwt(idToken);\n const id = c['custom:userId'] || c.sub || c['custom:walletAddress'] || '';\n const email = (c.email || fallbackEmail || null);\n return {\n id,\n address: (c['custom:walletProvider'] === 'turnkey' && c['custom:walletAddress'] || null),\n evmAddress: null,\n email,\n provider: emailProviderSingleton,\n };\n}\n// ---------------------------------------------------------------------------\n// provider\n// ---------------------------------------------------------------------------\nexport class EmailAuthProvider {\n async login() {\n throw new Error('login() no longer opens inline email OTP. Use loginWithRedirect({ redirectUri }) ' +\n 'or loginWithPopup({ redirectUri }) for hosted Bounded Auth.');\n }\n async restoreSession() {\n const sm = sessionManager();\n const session = await sm.getSession();\n if (!session)\n return null;\n const idToken = sm.getIdToken();\n if (!idToken)\n return null;\n const user = userFromIdToken(idToken);\n setCurrentUser(user);\n return user;\n }\n async logout() {\n await sessionManager().clearSession();\n setCurrentUser(null);\n }\n async signMessage(message) {\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n return signMessageWithTurnkey(message);\n }\n async runTransaction(evm, sol, _options) {\n if (evm && sol)\n throw new Error('A transaction cannot target EVM and Solana at the same time.');\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n if (evm)\n throw new Error('Turnkey embedded wallets currently support Solana only. Connect an EVM wallet for EVM transactions.');\n throw new Error('This Solana transaction shape is not supported by the Turnkey provider. Use a pre-built transaction.');\n }\n async signTransaction(transaction) {\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n return signTransactionWithTurnkey(transaction);\n }\n async signAndSubmitTransaction(transaction, feePayer) {\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n return signAndSubmitTransactionWithTurnkey(transaction, feePayer);\n }\n async getNativeMethods() { return {}; }\n}\nconst emailProviderSingleton = new EmailAuthProvider();\nexport { emailProviderSingleton };\n"],"names":[],"mappings":";;;;AAIA;AACA;AACA;AACA;AACA;AACA,MAAM,cAAc,GAAG,uBAAuB;AAC9C,MAAM,SAAS,GAAG,6EAA6E;AAC/F,IAAI,+EAA+E;AACnF;AACA;AACA;AACA,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,IAAI,IAAI;AACR,QAAQ,IAAI,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;AAC3E,QAAQ,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC;AAClC,QAAQ,IAAI,GAAG,KAAK,CAAC;AACrB,YAAY,GAAG,IAAI,IAA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AAmC,CAAC,WAAW,EAAE,QAAQ,CAAC;AACzE,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AAC1C;AACK,MAAC,sBAAsB,GAAG,IAAI,iBAAiB;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { getActiveSessionManager } from '@bounded-sh/core';
2
- import { s as setCurrentUser, E as EMBEDDED_WALLET_UNSUPPORTED, h as hasEmbeddedWallet, a as hasEmbeddedEvmWallet, e as embeddedRunEvmTransaction, b as embeddedSignAndSubmit, g as getPlatform } from './index.native-BIUs8t7F.mjs';
2
+ import { s as setCurrentUser, h as hasTurnkeyWallet, a as signMessageWithTurnkey, b as signTransactionWithTurnkey, c as signAndSubmitTransactionWithTurnkey, g as getPlatform } from './index-7yz-Olrm.mjs';
3
3
  import 'react';
4
4
 
5
5
  // Web uses localStorage (WebSessionManager); React Native uses the configured
@@ -8,10 +8,8 @@ import 'react';
8
8
  // RN too and would wrongly route to localStorage). Same selector the core
9
9
  // request path uses, so hosted Bounded Auth sessions persist + authenticate on BOTH.
10
10
  const sessionManager = getActiveSessionManager;
11
- const NO_WALLET = 'Email login has no embedded wallet. Enable `"auth": { "wallets": true }` in ' +
12
- 'the app policy so email logins get a non-custodial Crossmint wallet ' +
13
- '(@user.address), then sign from a user gesture. Otherwise use a wallet ' +
14
- 'provider (e.g. Phantom) for onchain actions.';
11
+ const NO_WALLET = 'This session has no Turnkey wallet. Sign in again to provision the default ' +
12
+ 'embedded wallet, or check whether the app explicitly sets auth.wallets:false.';
15
13
  // ---------------------------------------------------------------------------
16
14
  // token / session helpers
17
15
  // ---------------------------------------------------------------------------
@@ -34,11 +32,13 @@ function userFromIdToken(idToken, fallbackEmail) {
34
32
  const c = decodeJwt(idToken);
35
33
  const id = c['custom:userId'] || c.sub || c['custom:walletAddress'] || '';
36
34
  const email = (c.email || fallbackEmail || null);
37
- // Email logins have no wallet — address is null (the User type allows it).
38
- const evmAddress = typeof c['custom:evmWalletAddress'] === 'string' && /^0x[0-9a-fA-F]{40}$/.test(c['custom:evmWalletAddress'])
39
- ? c['custom:evmWalletAddress'].toLowerCase()
40
- : null;
41
- return { id, address: (c['custom:walletAddress'] || null), evmAddress, email, provider: emailProviderSingleton };
35
+ return {
36
+ id,
37
+ address: (c['custom:walletProvider'] === 'turnkey' && c['custom:walletAddress'] || null),
38
+ evmAddress: null,
39
+ email,
40
+ provider: emailProviderSingleton,
41
+ };
42
42
  }
43
43
  // ---------------------------------------------------------------------------
44
44
  // provider
@@ -64,36 +64,33 @@ class EmailAuthProvider {
64
64
  await sessionManager().clearSession();
65
65
  setCurrentUser(null);
66
66
  }
67
- // Crossmint Solana smart wallets sign+submit atomically and cannot produce a
68
- // raw signature — signMessage/signTransaction are structurally unsupported
69
- // (throw the clear "use signAndSubmitTransaction" error when a wallet exists;
70
- // the no-wallet error otherwise). signAndSubmitTransaction routes through the
71
- // Bounded signer popup for wallets-enabled email logins.
72
- async signMessage(_message) {
73
- throw new Error(hasEmbeddedWallet() ? EMBEDDED_WALLET_UNSUPPORTED : NO_WALLET);
67
+ async signMessage(message) {
68
+ if (!hasTurnkeyWallet())
69
+ throw new Error(NO_WALLET);
70
+ return signMessageWithTurnkey(message);
74
71
  }
75
- async runTransaction(evm, sol, options) {
72
+ async runTransaction(evm, sol, _options) {
76
73
  if (evm && sol)
77
74
  throw new Error('A transaction cannot target EVM and Solana at the same time.');
78
- if (!evm)
75
+ if (!hasTurnkeyWallet())
79
76
  throw new Error(NO_WALLET);
80
- if ((options === null || options === void 0 ? void 0 : options.shouldSubmitTx) === false)
81
- throw new Error('Embedded EVM wallets sign and submit atomically; shouldSubmitTx:false is unsupported.');
82
- if (!hasEmbeddedEvmWallet())
83
- throw new Error('This login has no embedded EVM wallet. Enable auth.wallets on an app with an EVM collection and sign in again.');
84
- return embeddedRunEvmTransaction(evm);
77
+ if (evm)
78
+ throw new Error('Turnkey embedded wallets currently support Solana only. Connect an EVM wallet for EVM transactions.');
79
+ throw new Error('This Solana transaction shape is not supported by the Turnkey provider. Use a pre-built transaction.');
85
80
  }
86
- async signTransaction(_t) {
87
- throw new Error(hasEmbeddedWallet() ? EMBEDDED_WALLET_UNSUPPORTED : NO_WALLET);
81
+ async signTransaction(transaction) {
82
+ if (!hasTurnkeyWallet())
83
+ throw new Error(NO_WALLET);
84
+ return signTransactionWithTurnkey(transaction);
88
85
  }
89
- async signAndSubmitTransaction(transaction, _feePayer) {
90
- if (!hasEmbeddedWallet())
86
+ async signAndSubmitTransaction(transaction, feePayer) {
87
+ if (!hasTurnkeyWallet())
91
88
  throw new Error(NO_WALLET);
92
- return embeddedSignAndSubmit(transaction);
89
+ return signAndSubmitTransactionWithTurnkey(transaction, feePayer);
93
90
  }
94
91
  async getNativeMethods() { return {}; }
95
92
  }
96
93
  const emailProviderSingleton = new EmailAuthProvider();
97
94
 
98
95
  export { EmailAuthProvider, emailProviderSingleton };
99
- //# sourceMappingURL=email-auth-provider-Cb4VKA1E.mjs.map
96
+ //# sourceMappingURL=email-auth-provider-v9xvY0Ky.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-auth-provider-v9xvY0Ky.mjs","sources":["../.rollup-tmp/auth/providers/email-auth-provider.js"],"sourcesContent":["import { getActiveSessionManager } from '@bounded-sh/core';\nimport { setCurrentUser } from '../../global';\nimport { getPlatform } from '../../platform';\nimport { hasTurnkeyWallet, signAndSubmitTransactionWithTurnkey, signMessageWithTurnkey, signTransactionWithTurnkey, } from '../turnkey-signer-bridge';\n// Web uses localStorage (WebSessionManager); React Native uses the configured\n// ReactNativeSessionManager. getActiveSessionManager() picks the right one by\n// whether the RN manager was configured (NOT `typeof window`, which is truthy on\n// RN too and would wrongly route to localStorage). Same selector the core\n// request path uses, so hosted Bounded Auth sessions persist + authenticate on BOTH.\nconst sessionManager = getActiveSessionManager;\nconst NO_WALLET = 'This session has no Turnkey wallet. Sign in again to provision the default ' +\n 'embedded wallet, or check whether the app explicitly sets auth.wallets:false.';\n// ---------------------------------------------------------------------------\n// token / session helpers\n// ---------------------------------------------------------------------------\nfunction decodeJwt(token) {\n try {\n let b64 = token.split('.')[1].replace(/-/g, '+').replace(/_/g, '/');\n const pad = b64.length % 4;\n if (pad === 2)\n b64 += '==';\n else if (pad === 3)\n b64 += '=';\n // getPlatform().atob is RN-safe (global atob is undefined on Hermes/JSC).\n return JSON.parse(getPlatform().atob(b64));\n }\n catch (_a) {\n return {};\n }\n}\nfunction userFromIdToken(idToken, fallbackEmail) {\n const c = decodeJwt(idToken);\n const id = c['custom:userId'] || c.sub || c['custom:walletAddress'] || '';\n const email = (c.email || fallbackEmail || null);\n return {\n id,\n address: (c['custom:walletProvider'] === 'turnkey' && c['custom:walletAddress'] || null),\n evmAddress: null,\n email,\n provider: emailProviderSingleton,\n };\n}\n// ---------------------------------------------------------------------------\n// provider\n// ---------------------------------------------------------------------------\nexport class EmailAuthProvider {\n async login() {\n throw new Error('login() no longer opens inline email OTP. Use loginWithRedirect({ redirectUri }) ' +\n 'or loginWithPopup({ redirectUri }) for hosted Bounded Auth.');\n }\n async restoreSession() {\n const sm = sessionManager();\n const session = await sm.getSession();\n if (!session)\n return null;\n const idToken = sm.getIdToken();\n if (!idToken)\n return null;\n const user = userFromIdToken(idToken);\n setCurrentUser(user);\n return user;\n }\n async logout() {\n await sessionManager().clearSession();\n setCurrentUser(null);\n }\n async signMessage(message) {\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n return signMessageWithTurnkey(message);\n }\n async runTransaction(evm, sol, _options) {\n if (evm && sol)\n throw new Error('A transaction cannot target EVM and Solana at the same time.');\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n if (evm)\n throw new Error('Turnkey embedded wallets currently support Solana only. Connect an EVM wallet for EVM transactions.');\n throw new Error('This Solana transaction shape is not supported by the Turnkey provider. Use a pre-built transaction.');\n }\n async signTransaction(transaction) {\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n return signTransactionWithTurnkey(transaction);\n }\n async signAndSubmitTransaction(transaction, feePayer) {\n if (!hasTurnkeyWallet())\n throw new Error(NO_WALLET);\n return signAndSubmitTransactionWithTurnkey(transaction, feePayer);\n }\n async getNativeMethods() { return {}; }\n}\nconst emailProviderSingleton = new EmailAuthProvider();\nexport { emailProviderSingleton };\n"],"names":[],"mappings":";;;;AAIA;AACA;AACA;AACA;AACA;AACA,MAAM,cAAc,GAAG,uBAAuB;AAC9C,MAAM,SAAS,GAAG,6EAA6E;AAC/F,IAAI,+EAA+E;AACnF;AACA;AACA;AACA,SAAS,SAAS,CAAC,KAAK,EAAE;AAC1B,IAAI,IAAI;AACR,QAAQ,IAAI,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC;AAC3E,QAAQ,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,GAAG,CAAC;AAClC,QAAQ,IAAI,GAAG,KAAK,CAAC;AACrB,YAAY,GAAG,IAAI,IAAI;AACvB,aAAa,IAAI,GAAG,KAAK,CAAC;AAC1B,YAAY,GAAG,IAAI,GAAG;AACtB;AACA,QAAQ,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,IAAI;AACJ,IAAI,OAAO,EAAE,EAAE;AACf,QAAQ,OAAO,EAAE;AACjB,IAAI;AACJ;AACA,SAAS,eAAe,CAAC,OAAO,EAAE,aAAa,EAAE;AACjD,IAAI,MAAM,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC;AAChC,IAAI,MAAM,EAAE,GAAG,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,sBAAsB,CAAC,IAAI,EAAE;AAC7E,IAAI,MAAM,KAAK,IAAI,CAAC,CAAC,KAAK,IAAI,aAAa,IAAI,IAAI,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,EAAE;AAC7C,QAAQ,IAAI,GAAG,IAAI,GAAG;AACtB,YAAY,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC;AAC3F,QAAQ,IAAI,CAAC,gBAAgB,EAAE;AAC/B,YAAY,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC;AACtC,QAAQ,IAAI,GAAG;AACf,YAAY,MAAM,IAAI,KAAK,CAAC,qGAAqG,CAAC;AAClI,QAAQ,MAAM,IAAI,KAAK,CAAC,sGAAsG,CAAC;AAC/H,IAAI;AACJ,IAAI,MAAM,eAAe,CAAC,WAAW,EAAE;AACvC,QAAQ,IAAI,CAAC,gBAAgB,EAAE;AAC/B,YAAY,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC;AACtC,QAAQ,OAAO,0BAA0B,CAAC,WAAW,CAAC;AACtD,IAAI;AACJ,IAAI,MAAM,wBAAwB,CAAC,WAAW,EAAE,QAAQ,EAAE;AAC1D,QAAQ,IAAI,CAAC,gBAAgB,EAAE;AAC/B,YAAY,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC;AACtC,QAAQ,OAAO,mCAAmC,CAAC,WAAW,EAAE,QAAQ,CAAC;AACzE,IAAI;AACJ,IAAI,MAAM,gBAAgB,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC;AAC1C;AACK,MAAC,sBAAsB,GAAG,IAAI,iBAAiB;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { getActiveSessionManager, genAuthNonce, genSolanaMessage, createSessionWithSignature } from '@bounded-sh/core';
2
- import { g as getPlatform, i as bs58, c as setAuthLoading, s as setCurrentUser } from './index-L2R6C5Vl.mjs';
2
+ import { g as getPlatform, i as bs58, e as setAuthLoading, s as setCurrentUser } from './index-7yz-Olrm.mjs';
3
3
  import 'react';
4
4
 
5
5
  // guest-keystore.ts — durable per-device keypair for anonymous ("guest") auth.
@@ -272,4 +272,4 @@ class GuestAuthProvider {
272
272
  }
273
273
 
274
274
  export { GuestAuthProvider };
275
- //# sourceMappingURL=guest-auth-provider-BBSFawAr.mjs.map
275
+ //# sourceMappingURL=guest-auth-provider-BLRbjAv2.mjs.map