@rhinestone/1auth 0.7.4 → 0.7.5

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 (42) hide show
  1. package/dist/{chunk-IHBVEU33.mjs → chunk-6AHEN3FA.mjs} +1 -1
  2. package/dist/chunk-6AHEN3FA.mjs.map +1 -0
  3. package/dist/{chunk-UXBBB7AV.mjs → chunk-6MUQKHAT.mjs} +7 -31
  4. package/dist/chunk-6MUQKHAT.mjs.map +1 -0
  5. package/dist/{client-CuASptX3.d.ts → client-BqKAd2RZ.d.mts} +17 -17
  6. package/dist/{client-D4HVy1KF.d.mts → client-C9mcj5jN.d.ts} +17 -17
  7. package/dist/headless.d.mts +2 -2
  8. package/dist/headless.d.ts +2 -2
  9. package/dist/headless.js +4 -6
  10. package/dist/headless.js.map +1 -1
  11. package/dist/headless.mjs +4 -6
  12. package/dist/headless.mjs.map +1 -1
  13. package/dist/index.d.mts +12 -21
  14. package/dist/index.d.ts +12 -21
  15. package/dist/index.js +44 -99
  16. package/dist/index.js.map +1 -1
  17. package/dist/index.mjs +40 -71
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/{provider-6JoziYDq.d.ts → provider-CCyUBseo.d.ts} +3 -3
  20. package/dist/{provider-CAQT7Gqx.d.mts → provider-CRhZVLg8.d.mts} +3 -3
  21. package/dist/react.d.mts +9 -4
  22. package/dist/react.d.ts +9 -4
  23. package/dist/react.js +4 -7
  24. package/dist/react.js.map +1 -1
  25. package/dist/react.mjs +4 -7
  26. package/dist/react.mjs.map +1 -1
  27. package/dist/server.d.mts +2 -2
  28. package/dist/server.d.ts +2 -2
  29. package/dist/server.js.map +1 -1
  30. package/dist/server.mjs +1 -1
  31. package/dist/{types-C0jKNT_t.d.mts → types-CbhPRY5s.d.mts} +23 -50
  32. package/dist/{types-C0jKNT_t.d.ts → types-CbhPRY5s.d.ts} +23 -50
  33. package/dist/{verify-CnOwPq78.d.ts → verify-DPJR_foR.d.ts} +4 -6
  34. package/dist/{verify-aWdi5O2z.d.mts → verify-DVYDJgOS.d.mts} +4 -6
  35. package/dist/wagmi.d.mts +3 -3
  36. package/dist/wagmi.d.ts +3 -3
  37. package/dist/wagmi.js +6 -30
  38. package/dist/wagmi.js.map +1 -1
  39. package/dist/wagmi.mjs +1 -1
  40. package/package.json +1 -1
  41. package/dist/chunk-IHBVEU33.mjs.map +0 -1
  42. package/dist/chunk-UXBBB7AV.mjs.map +0 -1
@@ -251,8 +251,6 @@ type AuthFlow = "auto" | "login" | "create-account";
251
251
  * Options for {@link OneAuthClient.authWithModal}.
252
252
  */
253
253
  interface AuthWithModalOptions {
254
- /** Optional account hint; the passkey app uses it to prefer sign-in. */
255
- username?: string;
256
254
  /** Override the theme for this modal invocation. */
257
255
  theme?: ThemeConfig;
258
256
  /** Set to false to hide OAuth sign-in buttons in account creation. */
@@ -264,8 +262,6 @@ interface AuthWithModalOptions {
264
262
  * Options for {@link OneAuthClient.loginWithModal}.
265
263
  */
266
264
  interface LoginWithModalOptions {
267
- /** Optional account hint for the sign-in ceremony. */
268
- username?: string;
269
265
  /** Override the theme for this modal invocation. */
270
266
  theme?: ThemeConfig;
271
267
  }
@@ -290,7 +286,6 @@ type SignerType = "passkey" | "eoa";
290
286
  * ```typescript
291
287
  * const result = await client.authWithModal();
292
288
  * if (result.success) {
293
- * console.log(result.user?.username); // "alice"
294
289
  * console.log(result.user?.address); // "0x1234..."
295
290
  * }
296
291
  * ```
@@ -300,7 +295,6 @@ interface AuthResult {
300
295
  /** Authenticated user details (present when `success` is true) */
301
296
  user?: {
302
297
  id: string;
303
- username?: string;
304
298
  address: `0x${string}`;
305
299
  };
306
300
  /**
@@ -320,7 +314,6 @@ interface ConnectResult {
320
314
  success: boolean;
321
315
  /** Connected user details (present when `success` is true) */
322
316
  user?: {
323
- username?: string;
324
317
  address: `0x${string}`;
325
318
  };
326
319
  /**
@@ -358,7 +351,7 @@ interface AuthenticateOptions {
358
351
  * challenge: `Login to MyApp\nNonce: ${crypto.randomUUID()}`
359
352
  * });
360
353
  * if (result.success && result.challenge) {
361
- * await verifyOnServer(result.user?.username, result.challenge.signature, result.challenge.signedHash);
354
+ * await verifyOnServer(result.user?.address, result.challenge.signature, result.challenge.signedHash);
362
355
  * }
363
356
  * ```
364
357
  */
@@ -378,10 +371,8 @@ interface AuthenticateResult extends AuthResult {
378
371
  * Options for signMessage
379
372
  */
380
373
  interface SignMessageOptions {
381
- /** Username of the signer (required if accountAddress is not provided) */
382
- username?: string;
383
- /** Account address of the signer (alternative to username) */
384
- accountAddress?: string;
374
+ /** Account address of the signer the sole signer identity. */
375
+ accountAddress: string;
385
376
  /** Human-readable message to sign */
386
377
  message: string;
387
378
  /** Optional custom challenge (defaults to message hash) */
@@ -470,10 +461,8 @@ interface TransactionDetails {
470
461
  }
471
462
  interface SigningRequestOptions {
472
463
  challenge: string;
473
- /** Username hint for legacy passkey accounts. Prefer accountAddress when available. */
474
- username?: string;
475
- /** Smart account address of the signer. Required when username is omitted. */
476
- accountAddress?: string;
464
+ /** Smart account address of the signer the sole signer identity. */
465
+ accountAddress: string;
477
466
  description?: string;
478
467
  metadata?: Record<string, unknown>;
479
468
  transaction?: TransactionDetails;
@@ -686,10 +675,8 @@ interface IntentTokenRequest {
686
675
  * Options for sendIntent
687
676
  */
688
677
  interface SendIntentOptions {
689
- /** Username of the signer */
690
- username?: string;
691
- /** Account address of the signer (alternative to username) */
692
- accountAddress?: string;
678
+ /** Account address of the signer — the sole signer identity. */
679
+ accountAddress: string;
693
680
  /** Target chain ID */
694
681
  targetChain?: number;
695
682
  /** Calls to execute on the target chain */
@@ -873,10 +860,8 @@ type EIP712Types = {
873
860
  * Options for signTypedData
874
861
  */
875
862
  interface SignTypedDataOptions {
876
- /** Username of the signer (required if accountAddress is not provided) */
877
- username?: string;
878
- /** Account address of the signer (alternative to username) */
879
- accountAddress?: string;
863
+ /** Account address of the signer the sole signer identity. */
864
+ accountAddress: string;
880
865
  /** EIP-712 domain parameters */
881
866
  domain: EIP712Domain;
882
867
  /** Type definitions for all types used in the message */
@@ -973,10 +958,8 @@ interface BatchIntentItem {
973
958
  * Options for sendBatchIntent
974
959
  */
975
960
  interface SendBatchIntentOptions {
976
- /** Username of the signer */
977
- username?: string;
978
- /** Account address of the signer (alternative to username) */
979
- accountAddress?: string;
961
+ /** Account address of the signer — the sole signer identity. */
962
+ accountAddress: string;
980
963
  /** Array of intents to execute as a batch */
981
964
  intents: BatchIntentItem[];
982
965
  /** When to close the dialog for each intent. Defaults to "preconfirmed" */
@@ -1077,10 +1060,8 @@ interface ConsentData {
1077
1060
  }
1078
1061
  /** @deprecated Data-sharing consent is disabled. */
1079
1062
  interface CheckConsentOptions {
1080
- /** Username of the account (required if accountAddress not provided) */
1081
- username?: string;
1082
- /** Account address (alternative to username) */
1083
- accountAddress?: string;
1063
+ /** Account address the sole account identity. */
1064
+ accountAddress: string;
1084
1065
  /** Fields to check */
1085
1066
  fields: ConsentField[];
1086
1067
  /** Override clientId from SDK config */
@@ -1097,10 +1078,8 @@ interface CheckConsentResult {
1097
1078
  }
1098
1079
  /** @deprecated Data-sharing consent is disabled. */
1099
1080
  interface RequestConsentOptions {
1100
- /** Username of the account (required if accountAddress not provided) */
1101
- username?: string;
1102
- /** Account address (alternative to username) */
1103
- accountAddress?: string;
1081
+ /** Account address the sole account identity. */
1082
+ accountAddress: string;
1104
1083
  /** Fields to request access to */
1105
1084
  fields: ConsentField[];
1106
1085
  /** Override clientId from SDK config */
@@ -1131,10 +1110,8 @@ interface RequestConsentResult {
1131
1110
  * that installs the SmartSession validator and registers the session.
1132
1111
  */
1133
1112
  interface InstallSmartSessionOptions {
1134
- /** Username of the account owner (or use accountAddress). */
1135
- username?: string;
1136
- /** Account address of the owner (alternative to username). */
1137
- accountAddress?: string;
1113
+ /** Account address of the owner the sole account identity. */
1114
+ accountAddress: string;
1138
1115
  /** Target chain to install the validator on. */
1139
1116
  targetChain: number;
1140
1117
  /** Public address of the ECDSA session-key the app holds in localStorage. */
@@ -1232,10 +1209,8 @@ interface GrantPermissionContractMetadata {
1232
1209
  abi?: readonly unknown[];
1233
1210
  }
1234
1211
  interface GrantPermissionsOptions {
1235
- /** Username of the account owner (or use accountAddress). */
1236
- username?: string;
1237
- /** Account address of the owner (alternative to username). */
1238
- accountAddress?: `0x${string}`;
1212
+ /** Account address of the owner the sole account identity. */
1213
+ accountAddress: `0x${string}`;
1239
1214
  /**
1240
1215
  * Chains where this permission should be installed/enabled.
1241
1216
  *
@@ -1303,10 +1278,8 @@ interface GrantPermissionsResult {
1303
1278
  };
1304
1279
  }
1305
1280
  interface ListSessionGrantsOptions {
1306
- /** Username of the account owner (or use accountAddress). */
1307
- username?: string;
1308
- /** Account address of the owner (alternative to username). */
1309
- accountAddress?: `0x${string}`;
1281
+ /** Account address of the owner the sole account identity. */
1282
+ accountAddress: `0x${string}`;
1310
1283
  /** Include grants that 1auth has marked revoked. Defaults to false. */
1311
1284
  includeRevoked?: boolean;
1312
1285
  }
@@ -1395,8 +1368,8 @@ interface SessionKeyHandle {
1395
1368
  * dialog UI involved (no `closeOn`, no `waitForHash`, etc.).
1396
1369
  */
1397
1370
  interface HeadlessIntentOptions {
1398
- username?: string;
1399
- accountAddress?: string;
1371
+ /** Account address of the signer — the sole signer identity. */
1372
+ accountAddress: string;
1400
1373
  targetChain: number;
1401
1374
  calls: IntentCall[];
1402
1375
  tokenRequests?: IntentTokenRequest[];
@@ -251,8 +251,6 @@ type AuthFlow = "auto" | "login" | "create-account";
251
251
  * Options for {@link OneAuthClient.authWithModal}.
252
252
  */
253
253
  interface AuthWithModalOptions {
254
- /** Optional account hint; the passkey app uses it to prefer sign-in. */
255
- username?: string;
256
254
  /** Override the theme for this modal invocation. */
257
255
  theme?: ThemeConfig;
258
256
  /** Set to false to hide OAuth sign-in buttons in account creation. */
@@ -264,8 +262,6 @@ interface AuthWithModalOptions {
264
262
  * Options for {@link OneAuthClient.loginWithModal}.
265
263
  */
266
264
  interface LoginWithModalOptions {
267
- /** Optional account hint for the sign-in ceremony. */
268
- username?: string;
269
265
  /** Override the theme for this modal invocation. */
270
266
  theme?: ThemeConfig;
271
267
  }
@@ -290,7 +286,6 @@ type SignerType = "passkey" | "eoa";
290
286
  * ```typescript
291
287
  * const result = await client.authWithModal();
292
288
  * if (result.success) {
293
- * console.log(result.user?.username); // "alice"
294
289
  * console.log(result.user?.address); // "0x1234..."
295
290
  * }
296
291
  * ```
@@ -300,7 +295,6 @@ interface AuthResult {
300
295
  /** Authenticated user details (present when `success` is true) */
301
296
  user?: {
302
297
  id: string;
303
- username?: string;
304
298
  address: `0x${string}`;
305
299
  };
306
300
  /**
@@ -320,7 +314,6 @@ interface ConnectResult {
320
314
  success: boolean;
321
315
  /** Connected user details (present when `success` is true) */
322
316
  user?: {
323
- username?: string;
324
317
  address: `0x${string}`;
325
318
  };
326
319
  /**
@@ -358,7 +351,7 @@ interface AuthenticateOptions {
358
351
  * challenge: `Login to MyApp\nNonce: ${crypto.randomUUID()}`
359
352
  * });
360
353
  * if (result.success && result.challenge) {
361
- * await verifyOnServer(result.user?.username, result.challenge.signature, result.challenge.signedHash);
354
+ * await verifyOnServer(result.user?.address, result.challenge.signature, result.challenge.signedHash);
362
355
  * }
363
356
  * ```
364
357
  */
@@ -378,10 +371,8 @@ interface AuthenticateResult extends AuthResult {
378
371
  * Options for signMessage
379
372
  */
380
373
  interface SignMessageOptions {
381
- /** Username of the signer (required if accountAddress is not provided) */
382
- username?: string;
383
- /** Account address of the signer (alternative to username) */
384
- accountAddress?: string;
374
+ /** Account address of the signer the sole signer identity. */
375
+ accountAddress: string;
385
376
  /** Human-readable message to sign */
386
377
  message: string;
387
378
  /** Optional custom challenge (defaults to message hash) */
@@ -470,10 +461,8 @@ interface TransactionDetails {
470
461
  }
471
462
  interface SigningRequestOptions {
472
463
  challenge: string;
473
- /** Username hint for legacy passkey accounts. Prefer accountAddress when available. */
474
- username?: string;
475
- /** Smart account address of the signer. Required when username is omitted. */
476
- accountAddress?: string;
464
+ /** Smart account address of the signer the sole signer identity. */
465
+ accountAddress: string;
477
466
  description?: string;
478
467
  metadata?: Record<string, unknown>;
479
468
  transaction?: TransactionDetails;
@@ -686,10 +675,8 @@ interface IntentTokenRequest {
686
675
  * Options for sendIntent
687
676
  */
688
677
  interface SendIntentOptions {
689
- /** Username of the signer */
690
- username?: string;
691
- /** Account address of the signer (alternative to username) */
692
- accountAddress?: string;
678
+ /** Account address of the signer — the sole signer identity. */
679
+ accountAddress: string;
693
680
  /** Target chain ID */
694
681
  targetChain?: number;
695
682
  /** Calls to execute on the target chain */
@@ -873,10 +860,8 @@ type EIP712Types = {
873
860
  * Options for signTypedData
874
861
  */
875
862
  interface SignTypedDataOptions {
876
- /** Username of the signer (required if accountAddress is not provided) */
877
- username?: string;
878
- /** Account address of the signer (alternative to username) */
879
- accountAddress?: string;
863
+ /** Account address of the signer the sole signer identity. */
864
+ accountAddress: string;
880
865
  /** EIP-712 domain parameters */
881
866
  domain: EIP712Domain;
882
867
  /** Type definitions for all types used in the message */
@@ -973,10 +958,8 @@ interface BatchIntentItem {
973
958
  * Options for sendBatchIntent
974
959
  */
975
960
  interface SendBatchIntentOptions {
976
- /** Username of the signer */
977
- username?: string;
978
- /** Account address of the signer (alternative to username) */
979
- accountAddress?: string;
961
+ /** Account address of the signer — the sole signer identity. */
962
+ accountAddress: string;
980
963
  /** Array of intents to execute as a batch */
981
964
  intents: BatchIntentItem[];
982
965
  /** When to close the dialog for each intent. Defaults to "preconfirmed" */
@@ -1077,10 +1060,8 @@ interface ConsentData {
1077
1060
  }
1078
1061
  /** @deprecated Data-sharing consent is disabled. */
1079
1062
  interface CheckConsentOptions {
1080
- /** Username of the account (required if accountAddress not provided) */
1081
- username?: string;
1082
- /** Account address (alternative to username) */
1083
- accountAddress?: string;
1063
+ /** Account address the sole account identity. */
1064
+ accountAddress: string;
1084
1065
  /** Fields to check */
1085
1066
  fields: ConsentField[];
1086
1067
  /** Override clientId from SDK config */
@@ -1097,10 +1078,8 @@ interface CheckConsentResult {
1097
1078
  }
1098
1079
  /** @deprecated Data-sharing consent is disabled. */
1099
1080
  interface RequestConsentOptions {
1100
- /** Username of the account (required if accountAddress not provided) */
1101
- username?: string;
1102
- /** Account address (alternative to username) */
1103
- accountAddress?: string;
1081
+ /** Account address the sole account identity. */
1082
+ accountAddress: string;
1104
1083
  /** Fields to request access to */
1105
1084
  fields: ConsentField[];
1106
1085
  /** Override clientId from SDK config */
@@ -1131,10 +1110,8 @@ interface RequestConsentResult {
1131
1110
  * that installs the SmartSession validator and registers the session.
1132
1111
  */
1133
1112
  interface InstallSmartSessionOptions {
1134
- /** Username of the account owner (or use accountAddress). */
1135
- username?: string;
1136
- /** Account address of the owner (alternative to username). */
1137
- accountAddress?: string;
1113
+ /** Account address of the owner the sole account identity. */
1114
+ accountAddress: string;
1138
1115
  /** Target chain to install the validator on. */
1139
1116
  targetChain: number;
1140
1117
  /** Public address of the ECDSA session-key the app holds in localStorage. */
@@ -1232,10 +1209,8 @@ interface GrantPermissionContractMetadata {
1232
1209
  abi?: readonly unknown[];
1233
1210
  }
1234
1211
  interface GrantPermissionsOptions {
1235
- /** Username of the account owner (or use accountAddress). */
1236
- username?: string;
1237
- /** Account address of the owner (alternative to username). */
1238
- accountAddress?: `0x${string}`;
1212
+ /** Account address of the owner the sole account identity. */
1213
+ accountAddress: `0x${string}`;
1239
1214
  /**
1240
1215
  * Chains where this permission should be installed/enabled.
1241
1216
  *
@@ -1303,10 +1278,8 @@ interface GrantPermissionsResult {
1303
1278
  };
1304
1279
  }
1305
1280
  interface ListSessionGrantsOptions {
1306
- /** Username of the account owner (or use accountAddress). */
1307
- username?: string;
1308
- /** Account address of the owner (alternative to username). */
1309
- accountAddress?: `0x${string}`;
1281
+ /** Account address of the owner the sole account identity. */
1282
+ accountAddress: `0x${string}`;
1310
1283
  /** Include grants that 1auth has marked revoked. Defaults to false. */
1311
1284
  includeRevoked?: boolean;
1312
1285
  }
@@ -1395,8 +1368,8 @@ interface SessionKeyHandle {
1395
1368
  * dialog UI involved (no `closeOn`, no `waitForHash`, etc.).
1396
1369
  */
1397
1370
  interface HeadlessIntentOptions {
1398
- username?: string;
1399
- accountAddress?: string;
1371
+ /** Account address of the signer — the sole signer identity. */
1372
+ accountAddress: string;
1400
1373
  targetChain: number;
1401
1374
  calls: IntentCall[];
1402
1375
  tokenRequests?: IntentTokenRequest[];
@@ -1,14 +1,12 @@
1
1
  import { Address, Chain, Transport, Hex } from 'viem';
2
- import { aa as ThemeConfig, S as SponsorshipConfig, W as WebAuthnSignature } from './types-C0jKNT_t.js';
2
+ import { aa as ThemeConfig, S as SponsorshipConfig, W as WebAuthnSignature } from './types-CbhPRY5s.js';
3
3
 
4
4
  /**
5
5
  * Configuration for creating a passkey-enabled WalletClient
6
6
  */
7
7
  interface PasskeyWalletClientConfig {
8
- /** User's smart account address */
8
+ /** User's smart account address — the sole signer identity. */
9
9
  accountAddress: Address;
10
- /** Optional username hint for legacy passkey accounts. */
11
- username?: string;
12
10
  /** Base URL of the auth API (defaults to https://passkey.1auth.app) */
13
11
  providerUrl?: string;
14
12
  /** Client identifier for this application */
@@ -159,7 +157,7 @@ declare const ETHEREUM_MESSAGE_PREFIX = "\u0019Ethereum Signed Message:\n";
159
157
  * @example
160
158
  * ```typescript
161
159
  * const message = "Sign in to MyApp\nTimestamp: 1234567890";
162
- * const result = await client.signMessage({ username: 'alice', message });
160
+ * const result = await client.signMessage({ accountAddress: '0x...', message });
163
161
  *
164
162
  * // Verify the hash matches
165
163
  * const expectedHash = hashMessage(message);
@@ -178,7 +176,7 @@ declare function hashMessage(message: string): `0x${string}`;
178
176
  *
179
177
  * @example
180
178
  * ```typescript
181
- * const result = await client.signMessage({ username: 'alice', message });
179
+ * const result = await client.signMessage({ accountAddress: '0x...', message });
182
180
  *
183
181
  * if (result.success && verifyMessageHash(message, result.signedHash)) {
184
182
  * // The signature is for this exact message
@@ -1,14 +1,12 @@
1
1
  import { Address, Chain, Transport, Hex } from 'viem';
2
- import { aa as ThemeConfig, S as SponsorshipConfig, W as WebAuthnSignature } from './types-C0jKNT_t.mjs';
2
+ import { aa as ThemeConfig, S as SponsorshipConfig, W as WebAuthnSignature } from './types-CbhPRY5s.mjs';
3
3
 
4
4
  /**
5
5
  * Configuration for creating a passkey-enabled WalletClient
6
6
  */
7
7
  interface PasskeyWalletClientConfig {
8
- /** User's smart account address */
8
+ /** User's smart account address — the sole signer identity. */
9
9
  accountAddress: Address;
10
- /** Optional username hint for legacy passkey accounts. */
11
- username?: string;
12
10
  /** Base URL of the auth API (defaults to https://passkey.1auth.app) */
13
11
  providerUrl?: string;
14
12
  /** Client identifier for this application */
@@ -159,7 +157,7 @@ declare const ETHEREUM_MESSAGE_PREFIX = "\u0019Ethereum Signed Message:\n";
159
157
  * @example
160
158
  * ```typescript
161
159
  * const message = "Sign in to MyApp\nTimestamp: 1234567890";
162
- * const result = await client.signMessage({ username: 'alice', message });
160
+ * const result = await client.signMessage({ accountAddress: '0x...', message });
163
161
  *
164
162
  * // Verify the hash matches
165
163
  * const expectedHash = hashMessage(message);
@@ -178,7 +176,7 @@ declare function hashMessage(message: string): `0x${string}`;
178
176
  *
179
177
  * @example
180
178
  * ```typescript
181
- * const result = await client.signMessage({ username: 'alice', message });
179
+ * const result = await client.signMessage({ accountAddress: '0x...', message });
182
180
  *
183
181
  * if (result.success && verifyMessageHash(message, result.signedHash)) {
184
182
  * // The signature is for this exact message
package/dist/wagmi.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _wagmi_core from '@wagmi/core';
2
- import { O as OneAuthProvider } from './provider-CAQT7Gqx.mjs';
3
- import { O as OneAuthClient } from './client-D4HVy1KF.mjs';
4
- import './types-C0jKNT_t.mjs';
2
+ import { O as OneAuthProvider } from './provider-CRhZVLg8.mjs';
3
+ import { O as OneAuthClient } from './client-BqKAd2RZ.mjs';
4
+ import './types-CbhPRY5s.mjs';
5
5
  import 'viem';
6
6
  import '@rhinestone/sdk';
7
7
 
package/dist/wagmi.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _wagmi_core from '@wagmi/core';
2
- import { O as OneAuthProvider } from './provider-6JoziYDq.js';
3
- import { O as OneAuthClient } from './client-CuASptX3.js';
4
- import './types-C0jKNT_t.js';
2
+ import { O as OneAuthProvider } from './provider-CCyUBseo.js';
3
+ import { O as OneAuthClient } from './client-C9mcj5jN.js';
4
+ import './types-CbhPRY5s.js';
5
5
  import 'viem';
6
6
  import '@rhinestone/sdk';
7
7
 
package/dist/wagmi.js CHANGED
@@ -168,21 +168,6 @@ function createOneAuthProvider(options) {
168
168
  if (typeof window === "undefined") return;
169
169
  localStorage.removeItem(storageKey);
170
170
  };
171
- const resolveAccountAddress = async (username) => {
172
- const clientId = client.getClientId();
173
- const response = await fetch(
174
- `${client.getProviderUrl()}/api/users/${encodeURIComponent(username)}/account`,
175
- {
176
- headers: clientId ? { "x-client-id": clientId } : {}
177
- }
178
- );
179
- if (!response.ok) {
180
- const data2 = await response.json().catch(() => ({}));
181
- throw new Error(data2.error || "Failed to resolve account address");
182
- }
183
- const data = await response.json();
184
- return data.address;
185
- };
186
171
  const connect = async () => {
187
172
  const stored = getStoredUser();
188
173
  if (stored) {
@@ -192,16 +177,12 @@ function createOneAuthProvider(options) {
192
177
  if (!authResult.success) {
193
178
  throw new Error(authResult.error?.message || "Authentication failed");
194
179
  }
195
- const username = authResult.user?.username;
196
- let address = authResult.user?.address;
180
+ const address = authResult.user?.address;
197
181
  const signerType = authResult.signerType;
198
- if (!address && username) {
199
- address = await resolveAccountAddress(username);
200
- }
201
182
  if (!address) {
202
183
  throw new Error("No account address available");
203
184
  }
204
- setStoredUser({ username, address, signerType });
185
+ setStoredUser({ address, signerType });
205
186
  emit("accountsChanged", [address]);
206
187
  emit("connect", { chainId: (0, import_viem3.numberToHex)(chainId) });
207
188
  return [address];
@@ -315,11 +296,10 @@ function createOneAuthProvider(options) {
315
296
  ]);
316
297
  const signMessage = async (message) => {
317
298
  const user = await ensureUser();
318
- if (!user.username && !user.address) {
319
- throw new Error("Username or address required for signing.");
299
+ if (!user.address) {
300
+ throw new Error("Account address required for signing.");
320
301
  }
321
302
  const result = await client.signMessage({
322
- username: user.username || void 0,
323
303
  accountAddress: user.address,
324
304
  message
325
305
  });
@@ -330,12 +310,11 @@ function createOneAuthProvider(options) {
330
310
  };
331
311
  const signTypedData = async (typedData) => {
332
312
  const user = await ensureUser();
333
- if (!user.username && !user.address) {
334
- throw new Error("Username or address required for signing.");
313
+ if (!user.address) {
314
+ throw new Error("Account address required for signing.");
335
315
  }
336
316
  const data = typeof typedData === "string" ? JSON.parse(typedData) : typedData;
337
317
  const result = await client.signTypedData({
338
- username: user.username || void 0,
339
318
  accountAddress: user.address,
340
319
  domain: data.domain,
341
320
  types: data.types,
@@ -348,7 +327,6 @@ function createOneAuthProvider(options) {
348
327
  return encodeWebAuthnSignature(result.signature);
349
328
  };
350
329
  const resolveIntentPayload = (payload) => ({
351
- username: payload.username,
352
330
  accountAddress: payload.accountAddress,
353
331
  targetChain: payload.targetChain,
354
332
  calls: payload.calls,
@@ -491,7 +469,6 @@ function createOneAuthProvider(options) {
491
469
  const tokenRequests = normalizeTokenRequests(tx.tokenRequests);
492
470
  const txSourceChainId = parseChainId(tx.sourceChainId);
493
471
  return sendIntent({
494
- username: user.username || void 0,
495
472
  accountAddress: user.address,
496
473
  targetChain,
497
474
  calls,
@@ -509,7 +486,6 @@ function createOneAuthProvider(options) {
509
486
  const sourceChainId = parseChainId(payload.sourceChainId);
510
487
  if (!calls.length) throw new Error("No calls provided");
511
488
  return sendIntent({
512
- username: user.username || void 0,
513
489
  accountAddress: user.address,
514
490
  targetChain,
515
491
  calls,