@privy-io/react-auth 1.50.1 → 1.51.0-beta-20231206004425
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/esm/index.js +415 -353
- package/dist/index.d.ts +22 -7
- package/dist/index.js +417 -355
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import EventEmitter from 'eventemitter3';
|
|
|
6
6
|
import { TypedMessage, MessageTypes } from '@metamask/eth-sig-util';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
8
|
import { TurnstileProps } from '@marsidev/react-turnstile';
|
|
9
|
-
import { Store } from 'mipd';
|
|
9
|
+
import { Store, EIP6963ProviderDetail } from 'mipd';
|
|
10
10
|
import { FetchOptions } from 'ofetch';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -727,7 +727,7 @@ declare class ConnectorManager extends EventEmitter<ConnectorManagerEvents> {
|
|
|
727
727
|
* Creates a new wallet connector for the given connector type and wallet client type.
|
|
728
728
|
* If a connector already exists, it will be returned instead.
|
|
729
729
|
*/
|
|
730
|
-
createWalletConnector(connectorType: ConnectorType, walletClientType: WalletClientType): Promise<WalletConnector | null>;
|
|
730
|
+
createWalletConnector(connectorType: ConnectorType, walletClientType: WalletClientType, providerDetail?: EIP6963ProviderDetail): Promise<WalletConnector | null>;
|
|
731
731
|
/**
|
|
732
732
|
* @deprecated **Deprecated**: This feature will be removed and should be replaced by
|
|
733
733
|
* interfacing with wallets directly (wallets[0].getEthereumProvider()).
|
|
@@ -904,10 +904,15 @@ declare const SUPPORTED_MFA_METHODS: readonly ["sms", "totp"];
|
|
|
904
904
|
type MfaMethod = (typeof SUPPORTED_MFA_METHODS)[number];
|
|
905
905
|
type OAuthProviderType = (typeof SUPPORTED_OAUTH_PROVIDERS)[number];
|
|
906
906
|
type LoginMethod = 'email' | 'sms' | 'siwe' | OAuthProviderType;
|
|
907
|
-
|
|
908
|
-
type
|
|
909
|
-
|
|
910
|
-
type
|
|
907
|
+
declare const EMBEDDED_WALLET_CLIENT_TYPES: readonly ["privy"];
|
|
908
|
+
type EmbeddedWalletClientType = (typeof EMBEDDED_WALLET_CLIENT_TYPES)[number];
|
|
909
|
+
declare const INJECTED_WALLET_CLIENT_TYPES: readonly ["metamask", "phantom"];
|
|
910
|
+
type InjectedWalletClientType = (typeof INJECTED_WALLET_CLIENT_TYPES)[number];
|
|
911
|
+
declare const COINBASE_WALLET_CLIENT_TYPES: readonly ["coinbase_wallet"];
|
|
912
|
+
type CoinbaseWalletClientType = (typeof COINBASE_WALLET_CLIENT_TYPES)[number];
|
|
913
|
+
type WalletConnectWalletClientType = (typeof WALLET_CONNECT_WALLET_CLIENT_TYPES)[number];
|
|
914
|
+
declare const UNKNOWN_WALLET_CLIENT_TYPES: readonly ["unknown"];
|
|
915
|
+
type UnknownWalletClientType = (typeof UNKNOWN_WALLET_CLIENT_TYPES)[number];
|
|
911
916
|
type WalletClientType = InjectedWalletClientType | CoinbaseWalletClientType | WalletConnectWalletClientType | EmbeddedWalletClientType | UnknownWalletClientType;
|
|
912
917
|
declare const SUPPORTED_CONNECTOR_TYPES: string[];
|
|
913
918
|
type ConnectorType = (typeof SUPPORTED_CONNECTOR_TYPES)[number];
|
|
@@ -1289,6 +1294,7 @@ type PriceDisplayOptions = {
|
|
|
1289
1294
|
primary: 'native-token';
|
|
1290
1295
|
secondary: null;
|
|
1291
1296
|
};
|
|
1297
|
+
type SupportedWallet = 'metamask' | 'coinbase_wallet' | 'rainbow' | 'phantom' | 'zerion' | 'injected' | 'wallet_connect';
|
|
1292
1298
|
type PrivyClientConfig = {
|
|
1293
1299
|
/** All UI and theme related configuration */
|
|
1294
1300
|
appearance?: {
|
|
@@ -1313,6 +1319,15 @@ type PrivyClientConfig = {
|
|
|
1313
1319
|
* social and email / sms login options.
|
|
1314
1320
|
* This overrides the server setting `show_wallet_login_first` */
|
|
1315
1321
|
showWalletLoginFirst?: boolean;
|
|
1322
|
+
/**
|
|
1323
|
+
* An array of {@link SupportedWallet supported wallets}
|
|
1324
|
+
* Determines the set of wallet options in the privy modal as well as the order in which they appear.
|
|
1325
|
+
*
|
|
1326
|
+
* Defaults to ['metamask', 'coinbase', 'rainbow', 'injected', 'wallet_connect']
|
|
1327
|
+
*
|
|
1328
|
+
* @default ['metamask', 'coinbase', 'rainbow', 'injected', 'wallet_connect']
|
|
1329
|
+
*/
|
|
1330
|
+
supportedWallets?: SupportedWallet[];
|
|
1316
1331
|
};
|
|
1317
1332
|
/** Specified login methods for the privy modal.
|
|
1318
1333
|
* If this parameter is included, it will override any login method settings specified on the server.
|
|
@@ -2500,4 +2515,4 @@ declare function useCreateWallet(callbacks?: PrivyEvents['createWallet']): {
|
|
|
2500
2515
|
createWallet: () => Promise<Wallet>;
|
|
2501
2516
|
};
|
|
2502
2517
|
|
|
2503
|
-
export { Apple, AppleOAuthWithMetadata, AsExternalProvider, CallbackError, Captcha, ConnectedWallet, ConnectorManager, ContractUIOptions, Discord, DiscordOAuthWithMetadata, EIP1193Provider, Email, EmailWithMetadata, FundWalletConfig, Github, GithubOAuthWithMetadata, Google, GoogleOAuthWithMetadata, LinkedIn, LinkedInOAuthWithMetadata, LoginWithCode, MfaMethod, MoonpayConfig, MoonpayCurrencyCode, MoonpayPaymentMethod, Phone, PhoneWithMetadata, PriceDisplayOptions, PrivyClient, PrivyClientConfig, PrivyEvents, PrivyInterface, PrivyProvider, PrivyProviderProps, PrivyProxyProvider, Quantity, DEFAULT_SUPPORTED_CHAINS as SUPPORTED_CHAINS, SendCodeToEmail, SendTransactionModalUIOptions, SignMessageModalUIOptions, Tiktok, TiktokOAuthWithMetadata, TransactionLog, TransactionReceipt, TransactionUIOptions, Twitter, TwitterOAuthWithMetadata, UnsignedTransactionRequest, UseLoginWithEmail, UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletWithMetadata, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getAccessToken, useConnectWallet, useCreateWallet, useLogin, useLoginWithEmail, useLogout, useMfa, useMfaEnrollment, usePrivy, useRegisterMfaListener, useWallets };
|
|
2518
|
+
export { Apple, AppleOAuthWithMetadata, AsExternalProvider, CallbackError, Captcha, ConnectedWallet, ConnectorManager, ContractUIOptions, Discord, DiscordOAuthWithMetadata, EIP1193Provider, Email, EmailWithMetadata, FundWalletConfig, Github, GithubOAuthWithMetadata, Google, GoogleOAuthWithMetadata, LinkedIn, LinkedInOAuthWithMetadata, LoginWithCode, MfaMethod, MoonpayConfig, MoonpayCurrencyCode, MoonpayPaymentMethod, Phone, PhoneWithMetadata, PriceDisplayOptions, PrivyClient, PrivyClientConfig, PrivyEvents, PrivyInterface, PrivyProvider, PrivyProviderProps, PrivyProxyProvider, Quantity, DEFAULT_SUPPORTED_CHAINS as SUPPORTED_CHAINS, SendCodeToEmail, SendTransactionModalUIOptions, SignMessageModalUIOptions, SupportedWallet, Tiktok, TiktokOAuthWithMetadata, TransactionLog, TransactionReceipt, TransactionUIOptions, Twitter, TwitterOAuthWithMetadata, UnsignedTransactionRequest, UseLoginWithEmail, UseWalletsInterface, User, VERSION, Wallet, WalletConnector, WalletWithMetadata, errorIndicatesMaxMfaRetries, errorIndicatesMfaTimeout, errorIndicatesMfaVerificationFailed, getAccessToken, useConnectWallet, useCreateWallet, useLogin, useLoginWithEmail, useLogout, useMfa, useMfaEnrollment, usePrivy, useRegisterMfaListener, useWallets };
|