@rhinestone/1auth 0.7.1 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import { O as OneAuthClient } from './client-B_CzDa_I.js';
2
- import { Abi, Address, LocalAccount, WalletClient, Hash, Chain } from 'viem';
1
+ import { O as OneAuthClient } from './client-Ewr_7x-d.js';
2
+ import { Abi, Address, LocalAccount, WalletClient, Hash } from 'viem';
3
3
  import { Permission } from '@rhinestone/sdk';
4
4
  export { Permission } from '@rhinestone/sdk';
5
- import { h as IntentCall, i as SendIntentResult } from './types-U_dwxbtS.js';
6
- export { a7 as AssetBalance, a8 as AssetBalanceBucket, a9 as AssetsResponse, u as AuthFlow, A as AuthResult, v as AuthWithModalOptions, z as AuthenticateOptions, B as AuthenticateResult, R as BalanceRequirement, ap as BatchIntentItem, as as BatchIntentItemResult, ad as CheckConsentOptions, ae as CheckConsentResult, a0 as CloseOnStatus, y as ConnectResult, ac as ConsentData, ab as ConsentField, w as CreateAccountWithModalOptions, C as CreateCrossChainPermissionInput, r as CreateSigningRequestResponse, k as CrossChainPermit, l as CrossChainSettlementLayer, M as EIP712Domain, O as EIP712TypeField, N as EIP712Types, E as EmbedOptions, a2 as ExecuteIntentResponse, a6 as GetAssetsOptions, an as GrantPermissionContractMetadata, ah as GrantPermissionsOptions, ai as GrantPermissionsResult, a4 as IntentHistoryItem, a3 as IntentHistoryOptions, a5 as IntentHistoryResult, Z as IntentQuote, _ as IntentStatus, X as IntentTokenRequest, aj as ListSessionGrantsOptions, ak as ListSessionGrantsResult, L as LoginWithModalOptions, ax as OneAuthTelemetryAttributeValue, ay as OneAuthTelemetryAttributes, az as OneAuthTelemetryConfig, aA as OneAuthTelemetryEvent, aB as OneAuthTelemetryEventName, aC as OneAuthTelemetryFlow, aD as OneAuthTelemetryTraceContext, $ as OrchestratorStatus, t as PasskeyCredential, P as PasskeyProviderConfig, au as PrepareBatchIntentResponse, a1 as PrepareIntentResponse, at as PreparedBatchIntent, af as RequestConsentOptions, ag as RequestConsentResult, aq as SendBatchIntentOptions, ar as SendBatchIntentResult, Y as SendIntentOptions, am as SessionGrantChain, al as SessionGrantRecord, F as SignMessageOptions, G as SignMessageResult, J as SignTypedDataOptions, K as SignTypedDataResult, x as SignerType, p as SigningError, q as SigningErrorCode, m as SigningRequestOptions, s as SigningRequestStatus, n as SigningResult, D as SigningResultBase, o as SigningSuccess, ao as SmartSessionPolicy, av as SponsorshipCallbackConfig, S as SponsorshipConfig, aw as SponsorshipUrlConfig, aa as ThemeConfig, T as TransactionAction, V as TransactionDetails, Q as TransactionFees, U as UserPasskeysResponse, W as WebAuthnSignature, j as createCrossChainPermission } from './types-U_dwxbtS.js';
7
- export { O as OneAuthProvider, a as OneAuthProviderOptions, c as createOneAuthProvider } from './provider-Cd7Ip5L-.js';
8
- import { P as PasskeyWalletClientConfig, S as SendCallsParams } from './verify-BLgZzwmJ.js';
9
- export { E as ETHEREUM_MESSAGE_PREFIX, T as TransactionCall, e as encodeWebAuthnSignature, h as hashCalls, a as hashMessage, v as verifyMessageHash } from './verify-BLgZzwmJ.js';
5
+ import { h as IntentCall, i as SendIntentResult } from './types-C0jKNT_t.js';
6
+ export { a7 as AssetBalance, a8 as AssetBalanceBucket, a9 as AssetsResponse, u as AuthFlow, A as AuthResult, v as AuthWithModalOptions, z as AuthenticateOptions, B as AuthenticateResult, R as BalanceRequirement, ap as BatchIntentItem, as as BatchIntentItemResult, ad as CheckConsentOptions, ae as CheckConsentResult, a0 as CloseOnStatus, y as ConnectResult, ac as ConsentData, ab as ConsentField, w as CreateAccountWithModalOptions, C as CreateCrossChainPermissionInput, r as CreateSigningRequestResponse, k as CrossChainPermit, l as CrossChainSettlementLayer, M as EIP712Domain, O as EIP712TypeField, N as EIP712Types, E as EmbedOptions, a2 as ExecuteIntentResponse, a6 as GetAssetsOptions, an as GrantPermissionContractMetadata, ah as GrantPermissionsOptions, ai as GrantPermissionsResult, a4 as IntentHistoryItem, a3 as IntentHistoryOptions, a5 as IntentHistoryResult, Z as IntentQuote, _ as IntentStatus, X as IntentTokenRequest, aj as ListSessionGrantsOptions, ak as ListSessionGrantsResult, L as LoginWithModalOptions, ax as OneAuthTelemetryAttributeValue, ay as OneAuthTelemetryAttributes, az as OneAuthTelemetryConfig, aA as OneAuthTelemetryEvent, aB as OneAuthTelemetryEventName, aC as OneAuthTelemetryFlow, aD as OneAuthTelemetryTraceContext, $ as OrchestratorStatus, t as PasskeyCredential, P as PasskeyProviderConfig, au as PrepareBatchIntentResponse, a1 as PrepareIntentResponse, at as PreparedBatchIntent, af as RequestConsentOptions, ag as RequestConsentResult, aq as SendBatchIntentOptions, ar as SendBatchIntentResult, Y as SendIntentOptions, am as SessionGrantChain, al as SessionGrantRecord, F as SignMessageOptions, G as SignMessageResult, J as SignTypedDataOptions, K as SignTypedDataResult, x as SignerType, p as SigningError, q as SigningErrorCode, m as SigningRequestOptions, s as SigningRequestStatus, n as SigningResult, D as SigningResultBase, o as SigningSuccess, ao as SmartSessionPolicy, av as SponsorshipCallbackConfig, S as SponsorshipConfig, aw as SponsorshipUrlConfig, aa as ThemeConfig, T as TransactionAction, V as TransactionDetails, Q as TransactionFees, U as UserPasskeysResponse, W as WebAuthnSignature, j as createCrossChainPermission } from './types-C0jKNT_t.js';
7
+ export { O as OneAuthProvider, a as OneAuthProviderOptions, c as createOneAuthProvider } from './provider-BRHZoB8U.js';
8
+ import { P as PasskeyWalletClientConfig, S as SendCallsParams } from './verify-CnOwPq78.js';
9
+ export { C as ChainFilterOptions, E as ETHEREUM_MESSAGE_PREFIX, p as TokenConfig, T as TransactionCall, e as encodeWebAuthnSignature, b as getAllSupportedChainsAndTokens, f as getChainById, i as getChainExplorerUrl, j as getChainRpcUrl, g as getSupportedChainIds, a as getSupportedChains, d as getSupportedTokenSymbols, c as getSupportedTokens, l as getTokenAddress, n as getTokenDecimals, m as getTokenSymbol, h as hashCalls, q as hashMessage, k as isTestnet, o as isTokenAddressSupported, r as resolveTokenAddress, v as verifyMessageHash } from './verify-CnOwPq78.js';
10
10
  import * as react_jsx_runtime from 'react/jsx-runtime';
11
11
  import * as React from 'react';
12
12
 
@@ -160,7 +160,7 @@ type PasskeyWalletClient = WalletClient & {
160
160
  * const walletClient = createPasskeyWalletClient({
161
161
  * accountAddress: '0x...',
162
162
  * username: 'alice',
163
- * providerUrl: 'https://passkey.1auth.box',
163
+ * providerUrl: 'https://passkey.1auth.app',
164
164
  * clientId: 'my-dapp',
165
165
  * chain: baseSepolia,
166
166
  * transport: http(),
@@ -289,45 +289,4 @@ interface BatchQueueWidgetProps {
289
289
  */
290
290
  declare function BatchQueueWidget({ onSignAll }: BatchQueueWidgetProps): react_jsx_runtime.JSX.Element | null;
291
291
 
292
- /**
293
- * @file Chain and token registry for the 1auth SDK.
294
- *
295
- * Wraps `@rhinestone/shared-configs` chain/token data and combines it with
296
- * viem's chain definitions to expose a filtered, testnet-aware registry.
297
- * Consumers can look up supported chains and tokens, resolve token addresses
298
- * by symbol, and retrieve chain metadata such as explorer URLs and default RPC
299
- * endpoints.
300
- *
301
- * Testnet inclusion is controlled by the `includeTestnets` option on each
302
- * function or, as a project-wide default, by the environment variables
303
- * `NEXT_PUBLIC_ORCHESTRATOR_USE_TESTNETS` or `ORCHESTRATOR_USE_TESTNETS`.
304
- */
305
-
306
- type TokenConfig = {
307
- symbol: string;
308
- address: Address;
309
- decimals: number;
310
- };
311
- type ChainFilterOptions = {
312
- includeTestnets?: boolean;
313
- chainIds?: number[];
314
- };
315
- declare function getSupportedChainIds(options?: ChainFilterOptions): number[];
316
- declare function getSupportedChains(options?: ChainFilterOptions): Chain[];
317
- declare function getAllSupportedChainsAndTokens(options?: ChainFilterOptions): Array<{
318
- chainId: number;
319
- tokens: TokenConfig[];
320
- }>;
321
- declare function getChainById(chainId: number): Chain;
322
- declare function getChainExplorerUrl(chainId: number): string | undefined;
323
- declare function getChainRpcUrl(chainId: number): string | undefined;
324
- declare function getSupportedTokens(chainId: number): TokenConfig[];
325
- declare function getSupportedTokenSymbols(chainId: number): string[];
326
- declare function getTokenAddress(symbolOrAddress: string, chainId: number): Address;
327
- declare function getTokenDecimals(symbolOrAddress: string, chainId: number): number;
328
- declare function resolveTokenAddress(token: string, chainId: number): Address;
329
- declare function isTestnet(chainId: number): boolean;
330
- declare function getTokenSymbol(tokenAddress: Address, chainId: number): string;
331
- declare function isTokenAddressSupported(tokenAddress: Address, chainId: number): boolean;
332
-
333
- export { type BatchQueueContextValue, type BatchQueueIdentity, BatchQueueProvider, type BatchQueueProviderProps, BatchQueueWidget, type BatchQueueWidgetProps, type BatchedCall, type ChainFilterOptions, type DefinePermissionsConfig, type DefinedPermissions, IntentCall, OneAuthClient, type PasskeyAccount, type PasskeyWalletClient, PasskeyWalletClientConfig, SendCallsParams, SendIntentResult, type TokenConfig, createPasskeyAccount, createPasskeyWalletClient, definePermissions, getAllSupportedChainsAndTokens, getChainById, getChainExplorerUrl, getChainName, getChainRpcUrl, getSupportedChainIds, getSupportedChains, getSupportedTokenSymbols, getSupportedTokens, getTokenAddress, getTokenDecimals, getTokenSymbol, isTestnet, isTokenAddressSupported, resolveTokenAddress, useBatchQueue };
292
+ export { type BatchQueueContextValue, type BatchQueueIdentity, BatchQueueProvider, type BatchQueueProviderProps, BatchQueueWidget, type BatchQueueWidgetProps, type BatchedCall, type DefinePermissionsConfig, type DefinedPermissions, IntentCall, OneAuthClient, type PasskeyAccount, type PasskeyWalletClient, PasskeyWalletClientConfig, SendCallsParams, SendIntentResult, createPasskeyAccount, createPasskeyWalletClient, definePermissions, getChainName, useBatchQueue };
package/dist/index.js CHANGED
@@ -378,7 +378,7 @@ var POPUP_WIDTH = LOADING_MODAL_WIDTH;
378
378
  var POPUP_HEIGHT = 600;
379
379
  var DEFAULT_EMBED_WIDTH = `${LOADING_MODAL_WIDTH}px`;
380
380
  var DEFAULT_EMBED_HEIGHT = "500px";
381
- var DEFAULT_PROVIDER_URL = "https://passkey.1auth.box";
381
+ var DEFAULT_PROVIDER_URL = "https://passkey.1auth.app";
382
382
  function currentWindowOrigin() {
383
383
  if (typeof window === "undefined") return null;
384
384
  const origin = window.location?.origin;
@@ -834,7 +834,7 @@ var OneAuthClient = class {
834
834
  * Falls back to the raw dialog URL string if URL parsing fails (e.g. during
835
835
  * unit tests with non-standard URL formats).
836
836
  *
837
- * @returns The scheme + host + optional port of the dialog app (e.g. `"https://passkey.1auth.box"`).
837
+ * @returns The scheme + host + optional port of the dialog app (e.g. `"https://passkey.1auth.app"`).
838
838
  */
839
839
  getDialogOrigin() {
840
840
  const dialogUrl = this.getDialogUrl();
@@ -1885,7 +1885,7 @@ var OneAuthClient = class {
1885
1885
  };
1886
1886
  const handleMessage = (event) => {
1887
1887
  if (event.origin !== dialogOrigin) return;
1888
- if (event.data?.type === "PASSKEY_CLOSE") {
1888
+ if (event.data?.type === "PASSKEY_CLOSE" && event.source === iframe.contentWindow) {
1889
1889
  resolveClosed(iframeReadyObserved);
1890
1890
  }
1891
1891
  };
@@ -2584,7 +2584,7 @@ var OneAuthClient = class {
2584
2584
  const dialogOrigin2 = this.getDialogOrigin();
2585
2585
  const earlyCloseHandler = (event) => {
2586
2586
  if (event.origin !== dialogOrigin2) return;
2587
- if (event.data?.type === "PASSKEY_CLOSE") {
2587
+ if (event.data?.type === "PASSKEY_CLOSE" && event.source === iframe.contentWindow) {
2588
2588
  userClosedEarly = true;
2589
2589
  cleanup();
2590
2590
  }