@volr/react 0.1.118 → 0.1.119
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.cjs +167 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -1
- package/dist/index.d.ts +49 -1
- package/dist/index.js +163 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1300,6 +1300,21 @@ interface PlatformCheckResult {
|
|
|
1300
1300
|
/** Browser name */
|
|
1301
1301
|
browser: string;
|
|
1302
1302
|
}
|
|
1303
|
+
/**
|
|
1304
|
+
* Check if the current browser is an in-app browser
|
|
1305
|
+
*/
|
|
1306
|
+
declare function isInAppBrowser(): boolean;
|
|
1307
|
+
/**
|
|
1308
|
+
* Get browser name and version
|
|
1309
|
+
*/
|
|
1310
|
+
declare function getBrowserVersion(): {
|
|
1311
|
+
browser: string;
|
|
1312
|
+
version: number;
|
|
1313
|
+
};
|
|
1314
|
+
/**
|
|
1315
|
+
* Get iOS version from user agent
|
|
1316
|
+
*/
|
|
1317
|
+
declare function getIOSVersion(): number | null;
|
|
1303
1318
|
/**
|
|
1304
1319
|
* Check if the current browser/platform supports WebAuthn PRF extension
|
|
1305
1320
|
*
|
|
@@ -1331,6 +1346,39 @@ declare function getPasskeyAuthGuidance(passkeyPlatform?: string | null): string
|
|
|
1331
1346
|
* must also support the hmac-secret extension.
|
|
1332
1347
|
*/
|
|
1333
1348
|
declare function checkPrfExtensionAvailable(): Promise<boolean>;
|
|
1349
|
+
/**
|
|
1350
|
+
* PRF compatibility check result
|
|
1351
|
+
*/
|
|
1352
|
+
interface PrfCompatibilityResult {
|
|
1353
|
+
/** Whether PRF is supported in the current environment */
|
|
1354
|
+
supported: boolean;
|
|
1355
|
+
/** Reason for incompatibility */
|
|
1356
|
+
reason?: 'inapp-browser' | 'outdated-browser' | 'outdated-os' | 'unsupported-browser';
|
|
1357
|
+
/** User-facing message key (i18n) */
|
|
1358
|
+
messageKey?: string;
|
|
1359
|
+
/** Recommended action */
|
|
1360
|
+
action?: 'update-browser' | 'update-os' | 'use-external-browser' | 'use-chrome';
|
|
1361
|
+
/** Detected platform */
|
|
1362
|
+
platform: string;
|
|
1363
|
+
/** Detected browser */
|
|
1364
|
+
browser: string;
|
|
1365
|
+
/** Browser version if detected */
|
|
1366
|
+
browserVersion?: number;
|
|
1367
|
+
}
|
|
1368
|
+
/**
|
|
1369
|
+
* Check PRF compatibility before passkey enrollment
|
|
1370
|
+
* This function should be called before showing the passkey enrollment UI
|
|
1371
|
+
* to provide early feedback and guidance to users in unsupported environments
|
|
1372
|
+
*/
|
|
1373
|
+
declare function checkPrfCompatibility(): PrfCompatibilityResult;
|
|
1374
|
+
/**
|
|
1375
|
+
* Get platform-specific hint for passkey enrollment
|
|
1376
|
+
* Helps users select the correct authenticator
|
|
1377
|
+
*/
|
|
1378
|
+
declare function getPlatformHint(platform: string): {
|
|
1379
|
+
hintKey: string;
|
|
1380
|
+
noteKey: string;
|
|
1381
|
+
};
|
|
1334
1382
|
|
|
1335
1383
|
/**
|
|
1336
1384
|
* Passkey migration (headless)
|
|
@@ -1529,4 +1577,4 @@ declare function useEIP6963(): UseEIP6963Return;
|
|
|
1529
1577
|
*/
|
|
1530
1578
|
declare function detectWalletConnector(provider: any, providerInfo: EIP6963ProviderInfo | null): string;
|
|
1531
1579
|
|
|
1532
|
-
export { type ApiResponse, type AuthRefreshResponseDto, type AuthResult, type BrandingData, type BuildCallOptions, type ContractAnalysisResult, DEFAULT_EXPIRES_IN_SEC, DEFAULT_MODE, type DepositAsset$1 as DepositAsset, type DepositConfig, type EIP6963AnnounceProviderEvent, type EIP6963ProviderDetail, type EIP6963ProviderInfo, type ERC20BalanceComparison, type Erc20Token$1 as Erc20Token, type EvmChainClient, type EvmClient, type EvmNamespace, type KeyStorageType, type MigrationCompleteParams, type MigrationCompleteResult, type MigrationError, type MigrationMessage, type MigrationRequestParams, type MigrationRequestResult, type MigrationSeedRequest, type MigrationSeedResponse, type MpcConnectionStep, type NetworkDto, type NetworkInfo, type OnSignRequest, type PasskeyAdapterOptions, type PasskeyEnrollmentStep, PasskeyNotFoundError, type PayOptions, type PaymentContext, type PaymentError, type PaymentHandle, type PaymentHandlers, type PaymentHistoryOptions, type PaymentHistoryResult, type PaymentItem, type PaymentResult, type PaymentStatus, type PaymentToken, type PlatformCheckResult, type PrfInputDto, PrfNotSupportedError, type SendBatchOverloads, type SendTxOptions, type SignRequest, type SignerType, type SiweSession, type SiweSessionStatus, type SocialProvider, type TokenBalance, type TransactionDto, type TransactionStatus, type UseEIP6963Return, type UseMpcConnectionReturn, type UsePasskeyEnrollmentReturn, type UseUserBalancesReturn, type UseVolrAuthCallbackOptions, type UseVolrAuthCallbackReturn, type UseVolrLoginReturn, type UseVolrPaymentApiReturn, type UseWithdrawReturn, UserCancelledError, type UserDto, type VolrClient, type VolrConfig, type VolrContextValue, VolrProvider, type VolrUser, type WalletDisplayInfo, type WalletStateComparison, type WithdrawParams, analyzeContractForEIP7702, buildCall, buildCalls, checkPrfExtensionAvailable, checkPrfSupport, compareERC20Balances, compareWalletStates, completeMigration, createGetNetworkInfo, createPasskeyAdapter, debugTransactionFailure, defaultIdempotencyKey, detectWalletConnector, diagnoseTransactionFailure, getERC20Balance, getPasskeyAuthGuidance, getUserCredentials, getWalletState, isEIP7702Delegated, isUserCancelledError, listenForSeedRequests, normalizeHex, normalizeHexArray, openMigrationPopup, requestMigration, requestSeedFromOpener, sendSeedToPopup, uploadBlobViaPresign, useDepositListener, useEIP6963, useInternalAuth, useMpcConnection, usePasskeyEnrollment, useUserBalances, useVolr, useVolrAuthCallback, useVolrContext, useVolrLogin, useVolrPaymentApi, useWithdraw };
|
|
1580
|
+
export { type ApiResponse, type AuthRefreshResponseDto, type AuthResult, type BrandingData, type BuildCallOptions, type ContractAnalysisResult, DEFAULT_EXPIRES_IN_SEC, DEFAULT_MODE, type DepositAsset$1 as DepositAsset, type DepositConfig, type EIP6963AnnounceProviderEvent, type EIP6963ProviderDetail, type EIP6963ProviderInfo, type ERC20BalanceComparison, type Erc20Token$1 as Erc20Token, type EvmChainClient, type EvmClient, type EvmNamespace, type KeyStorageType, type MigrationCompleteParams, type MigrationCompleteResult, type MigrationError, type MigrationMessage, type MigrationRequestParams, type MigrationRequestResult, type MigrationSeedRequest, type MigrationSeedResponse, type MpcConnectionStep, type NetworkDto, type NetworkInfo, type OnSignRequest, type PasskeyAdapterOptions, type PasskeyEnrollmentStep, PasskeyNotFoundError, type PayOptions, type PaymentContext, type PaymentError, type PaymentHandle, type PaymentHandlers, type PaymentHistoryOptions, type PaymentHistoryResult, type PaymentItem, type PaymentResult, type PaymentStatus, type PaymentToken, type PlatformCheckResult, type PrfCompatibilityResult, type PrfInputDto, PrfNotSupportedError, type SendBatchOverloads, type SendTxOptions, type SignRequest, type SignerType, type SiweSession, type SiweSessionStatus, type SocialProvider, type TokenBalance, type TransactionDto, type TransactionStatus, type UseEIP6963Return, type UseMpcConnectionReturn, type UsePasskeyEnrollmentReturn, type UseUserBalancesReturn, type UseVolrAuthCallbackOptions, type UseVolrAuthCallbackReturn, type UseVolrLoginReturn, type UseVolrPaymentApiReturn, type UseWithdrawReturn, UserCancelledError, type UserDto, type VolrClient, type VolrConfig, type VolrContextValue, VolrProvider, type VolrUser, type WalletDisplayInfo, type WalletStateComparison, type WithdrawParams, analyzeContractForEIP7702, buildCall, buildCalls, checkPrfCompatibility, checkPrfExtensionAvailable, checkPrfSupport, compareERC20Balances, compareWalletStates, completeMigration, createGetNetworkInfo, createPasskeyAdapter, debugTransactionFailure, defaultIdempotencyKey, detectWalletConnector, diagnoseTransactionFailure, getBrowserVersion, getERC20Balance, getIOSVersion, getPasskeyAuthGuidance, getPlatformHint, getUserCredentials, getWalletState, isEIP7702Delegated, isInAppBrowser, isUserCancelledError, listenForSeedRequests, normalizeHex, normalizeHexArray, openMigrationPopup, requestMigration, requestSeedFromOpener, sendSeedToPopup, uploadBlobViaPresign, useDepositListener, useEIP6963, useInternalAuth, useMpcConnection, usePasskeyEnrollment, useUserBalances, useVolr, useVolrAuthCallback, useVolrContext, useVolrLogin, useVolrPaymentApi, useWithdraw };
|
package/dist/index.d.ts
CHANGED
|
@@ -1300,6 +1300,21 @@ interface PlatformCheckResult {
|
|
|
1300
1300
|
/** Browser name */
|
|
1301
1301
|
browser: string;
|
|
1302
1302
|
}
|
|
1303
|
+
/**
|
|
1304
|
+
* Check if the current browser is an in-app browser
|
|
1305
|
+
*/
|
|
1306
|
+
declare function isInAppBrowser(): boolean;
|
|
1307
|
+
/**
|
|
1308
|
+
* Get browser name and version
|
|
1309
|
+
*/
|
|
1310
|
+
declare function getBrowserVersion(): {
|
|
1311
|
+
browser: string;
|
|
1312
|
+
version: number;
|
|
1313
|
+
};
|
|
1314
|
+
/**
|
|
1315
|
+
* Get iOS version from user agent
|
|
1316
|
+
*/
|
|
1317
|
+
declare function getIOSVersion(): number | null;
|
|
1303
1318
|
/**
|
|
1304
1319
|
* Check if the current browser/platform supports WebAuthn PRF extension
|
|
1305
1320
|
*
|
|
@@ -1331,6 +1346,39 @@ declare function getPasskeyAuthGuidance(passkeyPlatform?: string | null): string
|
|
|
1331
1346
|
* must also support the hmac-secret extension.
|
|
1332
1347
|
*/
|
|
1333
1348
|
declare function checkPrfExtensionAvailable(): Promise<boolean>;
|
|
1349
|
+
/**
|
|
1350
|
+
* PRF compatibility check result
|
|
1351
|
+
*/
|
|
1352
|
+
interface PrfCompatibilityResult {
|
|
1353
|
+
/** Whether PRF is supported in the current environment */
|
|
1354
|
+
supported: boolean;
|
|
1355
|
+
/** Reason for incompatibility */
|
|
1356
|
+
reason?: 'inapp-browser' | 'outdated-browser' | 'outdated-os' | 'unsupported-browser';
|
|
1357
|
+
/** User-facing message key (i18n) */
|
|
1358
|
+
messageKey?: string;
|
|
1359
|
+
/** Recommended action */
|
|
1360
|
+
action?: 'update-browser' | 'update-os' | 'use-external-browser' | 'use-chrome';
|
|
1361
|
+
/** Detected platform */
|
|
1362
|
+
platform: string;
|
|
1363
|
+
/** Detected browser */
|
|
1364
|
+
browser: string;
|
|
1365
|
+
/** Browser version if detected */
|
|
1366
|
+
browserVersion?: number;
|
|
1367
|
+
}
|
|
1368
|
+
/**
|
|
1369
|
+
* Check PRF compatibility before passkey enrollment
|
|
1370
|
+
* This function should be called before showing the passkey enrollment UI
|
|
1371
|
+
* to provide early feedback and guidance to users in unsupported environments
|
|
1372
|
+
*/
|
|
1373
|
+
declare function checkPrfCompatibility(): PrfCompatibilityResult;
|
|
1374
|
+
/**
|
|
1375
|
+
* Get platform-specific hint for passkey enrollment
|
|
1376
|
+
* Helps users select the correct authenticator
|
|
1377
|
+
*/
|
|
1378
|
+
declare function getPlatformHint(platform: string): {
|
|
1379
|
+
hintKey: string;
|
|
1380
|
+
noteKey: string;
|
|
1381
|
+
};
|
|
1334
1382
|
|
|
1335
1383
|
/**
|
|
1336
1384
|
* Passkey migration (headless)
|
|
@@ -1529,4 +1577,4 @@ declare function useEIP6963(): UseEIP6963Return;
|
|
|
1529
1577
|
*/
|
|
1530
1578
|
declare function detectWalletConnector(provider: any, providerInfo: EIP6963ProviderInfo | null): string;
|
|
1531
1579
|
|
|
1532
|
-
export { type ApiResponse, type AuthRefreshResponseDto, type AuthResult, type BrandingData, type BuildCallOptions, type ContractAnalysisResult, DEFAULT_EXPIRES_IN_SEC, DEFAULT_MODE, type DepositAsset$1 as DepositAsset, type DepositConfig, type EIP6963AnnounceProviderEvent, type EIP6963ProviderDetail, type EIP6963ProviderInfo, type ERC20BalanceComparison, type Erc20Token$1 as Erc20Token, type EvmChainClient, type EvmClient, type EvmNamespace, type KeyStorageType, type MigrationCompleteParams, type MigrationCompleteResult, type MigrationError, type MigrationMessage, type MigrationRequestParams, type MigrationRequestResult, type MigrationSeedRequest, type MigrationSeedResponse, type MpcConnectionStep, type NetworkDto, type NetworkInfo, type OnSignRequest, type PasskeyAdapterOptions, type PasskeyEnrollmentStep, PasskeyNotFoundError, type PayOptions, type PaymentContext, type PaymentError, type PaymentHandle, type PaymentHandlers, type PaymentHistoryOptions, type PaymentHistoryResult, type PaymentItem, type PaymentResult, type PaymentStatus, type PaymentToken, type PlatformCheckResult, type PrfInputDto, PrfNotSupportedError, type SendBatchOverloads, type SendTxOptions, type SignRequest, type SignerType, type SiweSession, type SiweSessionStatus, type SocialProvider, type TokenBalance, type TransactionDto, type TransactionStatus, type UseEIP6963Return, type UseMpcConnectionReturn, type UsePasskeyEnrollmentReturn, type UseUserBalancesReturn, type UseVolrAuthCallbackOptions, type UseVolrAuthCallbackReturn, type UseVolrLoginReturn, type UseVolrPaymentApiReturn, type UseWithdrawReturn, UserCancelledError, type UserDto, type VolrClient, type VolrConfig, type VolrContextValue, VolrProvider, type VolrUser, type WalletDisplayInfo, type WalletStateComparison, type WithdrawParams, analyzeContractForEIP7702, buildCall, buildCalls, checkPrfExtensionAvailable, checkPrfSupport, compareERC20Balances, compareWalletStates, completeMigration, createGetNetworkInfo, createPasskeyAdapter, debugTransactionFailure, defaultIdempotencyKey, detectWalletConnector, diagnoseTransactionFailure, getERC20Balance, getPasskeyAuthGuidance, getUserCredentials, getWalletState, isEIP7702Delegated, isUserCancelledError, listenForSeedRequests, normalizeHex, normalizeHexArray, openMigrationPopup, requestMigration, requestSeedFromOpener, sendSeedToPopup, uploadBlobViaPresign, useDepositListener, useEIP6963, useInternalAuth, useMpcConnection, usePasskeyEnrollment, useUserBalances, useVolr, useVolrAuthCallback, useVolrContext, useVolrLogin, useVolrPaymentApi, useWithdraw };
|
|
1580
|
+
export { type ApiResponse, type AuthRefreshResponseDto, type AuthResult, type BrandingData, type BuildCallOptions, type ContractAnalysisResult, DEFAULT_EXPIRES_IN_SEC, DEFAULT_MODE, type DepositAsset$1 as DepositAsset, type DepositConfig, type EIP6963AnnounceProviderEvent, type EIP6963ProviderDetail, type EIP6963ProviderInfo, type ERC20BalanceComparison, type Erc20Token$1 as Erc20Token, type EvmChainClient, type EvmClient, type EvmNamespace, type KeyStorageType, type MigrationCompleteParams, type MigrationCompleteResult, type MigrationError, type MigrationMessage, type MigrationRequestParams, type MigrationRequestResult, type MigrationSeedRequest, type MigrationSeedResponse, type MpcConnectionStep, type NetworkDto, type NetworkInfo, type OnSignRequest, type PasskeyAdapterOptions, type PasskeyEnrollmentStep, PasskeyNotFoundError, type PayOptions, type PaymentContext, type PaymentError, type PaymentHandle, type PaymentHandlers, type PaymentHistoryOptions, type PaymentHistoryResult, type PaymentItem, type PaymentResult, type PaymentStatus, type PaymentToken, type PlatformCheckResult, type PrfCompatibilityResult, type PrfInputDto, PrfNotSupportedError, type SendBatchOverloads, type SendTxOptions, type SignRequest, type SignerType, type SiweSession, type SiweSessionStatus, type SocialProvider, type TokenBalance, type TransactionDto, type TransactionStatus, type UseEIP6963Return, type UseMpcConnectionReturn, type UsePasskeyEnrollmentReturn, type UseUserBalancesReturn, type UseVolrAuthCallbackOptions, type UseVolrAuthCallbackReturn, type UseVolrLoginReturn, type UseVolrPaymentApiReturn, type UseWithdrawReturn, UserCancelledError, type UserDto, type VolrClient, type VolrConfig, type VolrContextValue, VolrProvider, type VolrUser, type WalletDisplayInfo, type WalletStateComparison, type WithdrawParams, analyzeContractForEIP7702, buildCall, buildCalls, checkPrfCompatibility, checkPrfExtensionAvailable, checkPrfSupport, compareERC20Balances, compareWalletStates, completeMigration, createGetNetworkInfo, createPasskeyAdapter, debugTransactionFailure, defaultIdempotencyKey, detectWalletConnector, diagnoseTransactionFailure, getBrowserVersion, getERC20Balance, getIOSVersion, getPasskeyAuthGuidance, getPlatformHint, getUserCredentials, getWalletState, isEIP7702Delegated, isInAppBrowser, isUserCancelledError, listenForSeedRequests, normalizeHex, normalizeHexArray, openMigrationPopup, requestMigration, requestSeedFromOpener, sendSeedToPopup, uploadBlobViaPresign, useDepositListener, useEIP6963, useInternalAuth, useMpcConnection, usePasskeyEnrollment, useUserBalances, useVolr, useVolrAuthCallback, useVolrContext, useVolrLogin, useVolrPaymentApi, useWithdraw };
|
package/dist/index.js
CHANGED
|
@@ -20401,6 +20401,14 @@ function detectPlatform2() {
|
|
|
20401
20401
|
function detectBrowser() {
|
|
20402
20402
|
if (typeof navigator === "undefined") return "Unknown";
|
|
20403
20403
|
const ua = navigator.userAgent;
|
|
20404
|
+
if (/KAKAOTALK/i.test(ua)) return "KakaoTalk-InApp";
|
|
20405
|
+
if (/NAVER\(/i.test(ua)) return "Naver-InApp";
|
|
20406
|
+
if (/Line\//i.test(ua)) return "Line-InApp";
|
|
20407
|
+
if (/MetaMaskMobile/i.test(ua)) return "MetaMask-InApp";
|
|
20408
|
+
if (/FB_IAB|FBAN/i.test(ua)) return "Facebook-InApp";
|
|
20409
|
+
if (/Instagram/i.test(ua)) return "Instagram-InApp";
|
|
20410
|
+
if (/Telegram/i.test(ua)) return "Telegram-InApp";
|
|
20411
|
+
if (/SamsungBrowser/i.test(ua)) return "Samsung";
|
|
20404
20412
|
if (/Edg/.test(ua)) return "Edge";
|
|
20405
20413
|
if (/Chrome/.test(ua) && !/Chromium/.test(ua)) return "Chrome";
|
|
20406
20414
|
if (/Safari/.test(ua) && !/Chrome/.test(ua)) return "Safari";
|
|
@@ -20408,6 +20416,36 @@ function detectBrowser() {
|
|
|
20408
20416
|
if (/Opera|OPR/.test(ua)) return "Opera";
|
|
20409
20417
|
return "Unknown";
|
|
20410
20418
|
}
|
|
20419
|
+
function isInAppBrowser() {
|
|
20420
|
+
const browser = detectBrowser();
|
|
20421
|
+
return browser.includes("-InApp");
|
|
20422
|
+
}
|
|
20423
|
+
function getBrowserVersion() {
|
|
20424
|
+
if (typeof navigator === "undefined") return { browser: "Unknown", version: 0 };
|
|
20425
|
+
const ua = navigator.userAgent;
|
|
20426
|
+
const edgeMatch = ua.match(/Edg\/(\d+)/);
|
|
20427
|
+
if (edgeMatch) return { browser: "Edge", version: parseInt(edgeMatch[1]) };
|
|
20428
|
+
const samsungMatch = ua.match(/SamsungBrowser\/(\d+)/);
|
|
20429
|
+
if (samsungMatch) return { browser: "Samsung", version: parseInt(samsungMatch[1]) };
|
|
20430
|
+
const chromeMatch = ua.match(/Chrome\/(\d+)/);
|
|
20431
|
+
if (chromeMatch && !/Edg/.test(ua)) return { browser: "Chrome", version: parseInt(chromeMatch[1]) };
|
|
20432
|
+
const safariMatch = ua.match(/Version\/(\d+)\.(\d+)/);
|
|
20433
|
+
if (safariMatch && /Safari/.test(ua) && !/Chrome/.test(ua)) {
|
|
20434
|
+
return { browser: "Safari", version: parseFloat(`${safariMatch[1]}.${safariMatch[2]}`) };
|
|
20435
|
+
}
|
|
20436
|
+
const firefoxMatch = ua.match(/Firefox\/(\d+)/);
|
|
20437
|
+
if (firefoxMatch) return { browser: "Firefox", version: parseInt(firefoxMatch[1]) };
|
|
20438
|
+
return { browser: "Unknown", version: 0 };
|
|
20439
|
+
}
|
|
20440
|
+
function getIOSVersion() {
|
|
20441
|
+
if (typeof navigator === "undefined") return null;
|
|
20442
|
+
const ua = navigator.userAgent;
|
|
20443
|
+
const match = ua.match(/OS (\d+)_(\d+)/);
|
|
20444
|
+
if (match) {
|
|
20445
|
+
return parseFloat(`${match[1]}.${match[2]}`);
|
|
20446
|
+
}
|
|
20447
|
+
return null;
|
|
20448
|
+
}
|
|
20411
20449
|
function checkPrfSupport() {
|
|
20412
20450
|
const platform = detectPlatform2();
|
|
20413
20451
|
const browser = detectBrowser();
|
|
@@ -20525,6 +20563,130 @@ async function checkPrfExtensionAvailable() {
|
|
|
20525
20563
|
const { prfSupported } = checkPrfSupport();
|
|
20526
20564
|
return prfSupported;
|
|
20527
20565
|
}
|
|
20566
|
+
var MIN_BROWSER_VERSIONS = {
|
|
20567
|
+
Chrome: 109,
|
|
20568
|
+
Edge: 109,
|
|
20569
|
+
Safari: 17.4,
|
|
20570
|
+
Samsung: 21
|
|
20571
|
+
// Samsung Internet 21+ is based on Chromium 109+
|
|
20572
|
+
};
|
|
20573
|
+
var MIN_IOS_VERSION = 17.4;
|
|
20574
|
+
function checkPrfCompatibility() {
|
|
20575
|
+
const platform = detectPlatform2();
|
|
20576
|
+
const browser = detectBrowser();
|
|
20577
|
+
const { browser: browserName, version: browserVersion } = getBrowserVersion();
|
|
20578
|
+
const baseResult = {
|
|
20579
|
+
platform,
|
|
20580
|
+
browser,
|
|
20581
|
+
browserVersion
|
|
20582
|
+
};
|
|
20583
|
+
if (isInAppBrowser()) {
|
|
20584
|
+
return {
|
|
20585
|
+
...baseResult,
|
|
20586
|
+
supported: false,
|
|
20587
|
+
reason: "inapp-browser",
|
|
20588
|
+
messageKey: "passkey.compatibility.inAppBrowser",
|
|
20589
|
+
action: "use-external-browser"
|
|
20590
|
+
};
|
|
20591
|
+
}
|
|
20592
|
+
if (browserName === "Firefox") {
|
|
20593
|
+
return {
|
|
20594
|
+
...baseResult,
|
|
20595
|
+
supported: false,
|
|
20596
|
+
reason: "unsupported-browser",
|
|
20597
|
+
messageKey: "passkey.compatibility.firefoxNotSupported",
|
|
20598
|
+
action: "use-chrome"
|
|
20599
|
+
};
|
|
20600
|
+
}
|
|
20601
|
+
if (browserName === "Chrome" && browserVersion < MIN_BROWSER_VERSIONS.Chrome) {
|
|
20602
|
+
return {
|
|
20603
|
+
...baseResult,
|
|
20604
|
+
supported: false,
|
|
20605
|
+
reason: "outdated-browser",
|
|
20606
|
+
messageKey: "passkey.compatibility.outdatedChrome",
|
|
20607
|
+
action: "update-browser"
|
|
20608
|
+
};
|
|
20609
|
+
}
|
|
20610
|
+
if (browserName === "Edge" && browserVersion < MIN_BROWSER_VERSIONS.Edge) {
|
|
20611
|
+
return {
|
|
20612
|
+
...baseResult,
|
|
20613
|
+
supported: false,
|
|
20614
|
+
reason: "outdated-browser",
|
|
20615
|
+
messageKey: "passkey.compatibility.outdatedEdge",
|
|
20616
|
+
action: "update-browser"
|
|
20617
|
+
};
|
|
20618
|
+
}
|
|
20619
|
+
if (browserName === "Safari" && browserVersion < MIN_BROWSER_VERSIONS.Safari) {
|
|
20620
|
+
return {
|
|
20621
|
+
...baseResult,
|
|
20622
|
+
supported: false,
|
|
20623
|
+
reason: "outdated-browser",
|
|
20624
|
+
messageKey: "passkey.compatibility.outdatedSafari",
|
|
20625
|
+
action: "update-browser"
|
|
20626
|
+
};
|
|
20627
|
+
}
|
|
20628
|
+
if (browserName === "Samsung" && browserVersion < MIN_BROWSER_VERSIONS.Samsung) {
|
|
20629
|
+
return {
|
|
20630
|
+
...baseResult,
|
|
20631
|
+
supported: false,
|
|
20632
|
+
reason: "outdated-browser",
|
|
20633
|
+
messageKey: "passkey.compatibility.outdatedSamsung",
|
|
20634
|
+
action: "update-browser"
|
|
20635
|
+
};
|
|
20636
|
+
}
|
|
20637
|
+
if (platform === "iOS") {
|
|
20638
|
+
const iosVersion = getIOSVersion();
|
|
20639
|
+
if (iosVersion && iosVersion < MIN_IOS_VERSION) {
|
|
20640
|
+
return {
|
|
20641
|
+
...baseResult,
|
|
20642
|
+
supported: false,
|
|
20643
|
+
reason: "outdated-os",
|
|
20644
|
+
messageKey: "passkey.compatibility.outdatedIOS",
|
|
20645
|
+
action: "update-os"
|
|
20646
|
+
};
|
|
20647
|
+
}
|
|
20648
|
+
}
|
|
20649
|
+
if (browserName === "Unknown") {
|
|
20650
|
+
return {
|
|
20651
|
+
...baseResult,
|
|
20652
|
+
supported: true,
|
|
20653
|
+
messageKey: "passkey.compatibility.unknownBrowser"
|
|
20654
|
+
};
|
|
20655
|
+
}
|
|
20656
|
+
return {
|
|
20657
|
+
...baseResult,
|
|
20658
|
+
supported: true
|
|
20659
|
+
};
|
|
20660
|
+
}
|
|
20661
|
+
function getPlatformHint(platform) {
|
|
20662
|
+
switch (platform) {
|
|
20663
|
+
case "macOS":
|
|
20664
|
+
return {
|
|
20665
|
+
hintKey: "passkey.hint.macOS",
|
|
20666
|
+
noteKey: "passkey.hint.note"
|
|
20667
|
+
};
|
|
20668
|
+
case "iOS":
|
|
20669
|
+
return {
|
|
20670
|
+
hintKey: "passkey.hint.iOS",
|
|
20671
|
+
noteKey: "passkey.hint.note"
|
|
20672
|
+
};
|
|
20673
|
+
case "Android":
|
|
20674
|
+
return {
|
|
20675
|
+
hintKey: "passkey.hint.android",
|
|
20676
|
+
noteKey: "passkey.hint.note"
|
|
20677
|
+
};
|
|
20678
|
+
case "Windows":
|
|
20679
|
+
return {
|
|
20680
|
+
hintKey: "passkey.hint.windows",
|
|
20681
|
+
noteKey: "passkey.hint.note"
|
|
20682
|
+
};
|
|
20683
|
+
default:
|
|
20684
|
+
return {
|
|
20685
|
+
hintKey: "passkey.hint.default",
|
|
20686
|
+
noteKey: "passkey.hint.note"
|
|
20687
|
+
};
|
|
20688
|
+
}
|
|
20689
|
+
}
|
|
20528
20690
|
function blobToBase642(blob) {
|
|
20529
20691
|
return new Promise((resolve, reject) => {
|
|
20530
20692
|
const reader = new FileReader();
|
|
@@ -20865,6 +21027,6 @@ function detectWalletConnector(provider, providerInfo) {
|
|
|
20865
21027
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
20866
21028
|
*/
|
|
20867
21029
|
|
|
20868
|
-
export { DEFAULT_EXPIRES_IN_SEC, DEFAULT_MODE, PasskeyNotFoundError, PrfNotSupportedError, UserCancelledError, VolrProvider, analyzeContractForEIP7702, buildCall, buildCalls, checkPrfExtensionAvailable, checkPrfSupport, compareERC20Balances, compareWalletStates, completeMigration, createGetNetworkInfo, createPasskeyAdapter, debugTransactionFailure, defaultIdempotencyKey, detectWalletConnector, diagnoseTransactionFailure, getERC20Balance, getPasskeyAuthGuidance, getUserCredentials, getWalletState, isEIP7702Delegated, isUserCancelledError, listenForSeedRequests, normalizeHex, normalizeHexArray, openMigrationPopup, requestMigration, requestSeedFromOpener, sendSeedToPopup, uploadBlobViaPresign, useDepositListener, useEIP6963, useInternalAuth, useMpcConnection, usePasskeyEnrollment, useUserBalances, useVolr, useVolrAuthCallback, useVolrContext, useVolrLogin, useVolrPaymentApi, useWithdraw };
|
|
21030
|
+
export { DEFAULT_EXPIRES_IN_SEC, DEFAULT_MODE, PasskeyNotFoundError, PrfNotSupportedError, UserCancelledError, VolrProvider, analyzeContractForEIP7702, buildCall, buildCalls, checkPrfCompatibility, checkPrfExtensionAvailable, checkPrfSupport, compareERC20Balances, compareWalletStates, completeMigration, createGetNetworkInfo, createPasskeyAdapter, debugTransactionFailure, defaultIdempotencyKey, detectWalletConnector, diagnoseTransactionFailure, getBrowserVersion, getERC20Balance, getIOSVersion, getPasskeyAuthGuidance, getPlatformHint, getUserCredentials, getWalletState, isEIP7702Delegated, isInAppBrowser, isUserCancelledError, listenForSeedRequests, normalizeHex, normalizeHexArray, openMigrationPopup, requestMigration, requestSeedFromOpener, sendSeedToPopup, uploadBlobViaPresign, useDepositListener, useEIP6963, useInternalAuth, useMpcConnection, usePasskeyEnrollment, useUserBalances, useVolr, useVolrAuthCallback, useVolrContext, useVolrLogin, useVolrPaymentApi, useWithdraw };
|
|
20869
21031
|
//# sourceMappingURL=index.js.map
|
|
20870
21032
|
//# sourceMappingURL=index.js.map
|