@privy-io/react-auth 1.27.0-beta.5 → 1.27.0-beta.7
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 +159 -159
- package/dist/index.d.ts +32 -8
- package/dist/index.js +158 -158
- package/package.json +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -632,9 +632,12 @@ type PrivyServerConfig = {
|
|
|
632
632
|
privacyPolicyUrl: string | null;
|
|
633
633
|
createdAt?: Date;
|
|
634
634
|
updatedAt?: Date;
|
|
635
|
+
customApiUrl?: string | null;
|
|
636
|
+
embeddedWalletConfig: EmbeddedWalletsConfig;
|
|
637
|
+
/** May be deprecated from the server config in a future release */
|
|
635
638
|
logoUrl?: string;
|
|
639
|
+
/** May be deprecated from the server config in a future release */
|
|
636
640
|
accentColor?: string;
|
|
637
|
-
customApiUrl?: string | null;
|
|
638
641
|
};
|
|
639
642
|
type HexColor = `#${string}`;
|
|
640
643
|
type PrivyClientConfig = {
|
|
@@ -683,12 +686,30 @@ type PrivyClientConfig = {
|
|
|
683
686
|
/** All embedded wallets configuration */
|
|
684
687
|
embeddedWallets?: {
|
|
685
688
|
/**
|
|
686
|
-
*
|
|
689
|
+
* Whether an embedded wallet should be created for the user on login. This overrides the
|
|
690
|
+
* deprecated `createPrivyWalletOnLogin`.
|
|
691
|
+
*
|
|
692
|
+
* For `all-users`, the user will be prompted to create a Privy wallet after successfully
|
|
693
|
+
* logging in. If they cancel or are visiting after this flag was put in place, they will be
|
|
694
|
+
* prompted to create a wallet on their next login.
|
|
695
|
+
*
|
|
696
|
+
* For `users-without-wallets`, the user will be prompted to create a Privy wallet after\
|
|
697
|
+
* successfully logging in, only if they do not currently have any wallet associated with their
|
|
698
|
+
* user object - for example if they have linked an external wallet.
|
|
699
|
+
*
|
|
700
|
+
* For `off`, an embedded wallet is not created during login. You can always prompt the user to
|
|
701
|
+
* create one manually with your app.
|
|
702
|
+
*
|
|
703
|
+
* Defaults to 'off'.
|
|
704
|
+
*/
|
|
705
|
+
createOnLogin?: EmbeddedWalletCreateOnLoginConfig;
|
|
706
|
+
/**
|
|
707
|
+
* If true, Privy will prompt users to create a password for their Privy embedded wallet.
|
|
687
708
|
* If false, embedded wallets will be created without the need of password.
|
|
688
709
|
*
|
|
689
|
-
* Defaults to
|
|
710
|
+
* Defaults to false.
|
|
690
711
|
*/
|
|
691
|
-
|
|
712
|
+
requireUserPasswordOnCreate?: boolean;
|
|
692
713
|
};
|
|
693
714
|
/**
|
|
694
715
|
* Override the default rendering settings, used for displaying in a non-modal setting.
|
|
@@ -719,6 +740,11 @@ interface AllowlistConfig {
|
|
|
719
740
|
errorCtaText: string | null;
|
|
720
741
|
errorCtaLink: string | null;
|
|
721
742
|
}
|
|
743
|
+
type EmbeddedWalletCreateOnLoginConfig = 'users-without-wallets' | 'all-users' | 'off';
|
|
744
|
+
interface EmbeddedWalletsConfig {
|
|
745
|
+
createOnLogin: EmbeddedWalletCreateOnLoginConfig;
|
|
746
|
+
requireUserPasswordOnCreate: boolean;
|
|
747
|
+
}
|
|
722
748
|
type SignMessageModalUIOptions = {
|
|
723
749
|
title?: string;
|
|
724
750
|
description?: string;
|
|
@@ -763,9 +789,7 @@ interface PrivyProviderProps {
|
|
|
763
789
|
*/
|
|
764
790
|
onSuccess?: (user: User, isNewUser: boolean) => void;
|
|
765
791
|
/**
|
|
766
|
-
*
|
|
767
|
-
* after successfully logging in, if they do not currently
|
|
768
|
-
* have any wallet associated with their user object.
|
|
792
|
+
* @deprecated use `config.embeddedWallets.createOnLogin` instead
|
|
769
793
|
*/
|
|
770
794
|
createPrivyWalletOnLogin?: boolean;
|
|
771
795
|
/**
|
|
@@ -800,7 +824,7 @@ interface PrivyProviderProps {
|
|
|
800
824
|
* ```
|
|
801
825
|
*
|
|
802
826
|
*/
|
|
803
|
-
declare const PrivyProvider: (props: PrivyProviderProps) => JSX.Element;
|
|
827
|
+
declare const PrivyProvider: ({ config, ...props }: PrivyProviderProps) => JSX.Element;
|
|
804
828
|
|
|
805
829
|
interface ConnectorManagerEvents {
|
|
806
830
|
walletsUpdated(): void;
|