@privy-io/react-auth 1.18.0 → 1.19.0-beta.1
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 +291 -310
- package/dist/index.d.ts +29 -7
- package/dist/index.js +291 -310
- package/package.json +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -168,13 +168,10 @@ interface User {
|
|
|
168
168
|
* that may be helpful for advanced use cases. */
|
|
169
169
|
linkedAccounts: Array<LinkedAccountWithMetadata>;
|
|
170
170
|
}
|
|
171
|
-
|
|
171
|
+
type PrivyServerConfig = {
|
|
172
172
|
id?: string;
|
|
173
173
|
name?: string;
|
|
174
174
|
verificationKey?: string;
|
|
175
|
-
logoUrl?: string;
|
|
176
|
-
theme?: 'System' | 'Light' | 'Dark' | string;
|
|
177
|
-
accentColor?: string;
|
|
178
175
|
showWalletLoginFirst?: boolean;
|
|
179
176
|
allowlistConfig: AllowlistConfig;
|
|
180
177
|
walletAuth?: boolean;
|
|
@@ -188,7 +185,27 @@ interface AppSettings {
|
|
|
188
185
|
privacyPolicyUrl: string | null;
|
|
189
186
|
createdAt?: Date;
|
|
190
187
|
updatedAt?: Date;
|
|
191
|
-
|
|
188
|
+
logoUrl?: string;
|
|
189
|
+
accentColor?: string;
|
|
190
|
+
};
|
|
191
|
+
type PrivyClientConfig = {
|
|
192
|
+
/** All UI and theme related configuration */
|
|
193
|
+
appearance?: {
|
|
194
|
+
/** Primary background color for the privy UI.
|
|
195
|
+
* This will generate the remainder of the foreground and background colors within the theme.
|
|
196
|
+
* This value should be _either_ dark or light (<20% or >80% luminance), for accessibility.
|
|
197
|
+
* Recommended light theme: '#FFFFFF' (default)
|
|
198
|
+
* Recommended dark theme: '#1E1E1D' */
|
|
199
|
+
backgroundColor?: string;
|
|
200
|
+
/** Accent color for the privy UI.
|
|
201
|
+
* Used for buttons, active borders, etc. This will generate light and dark variants.
|
|
202
|
+
* This overrides the server setting `accent_color`. */
|
|
203
|
+
accentColor?: string;
|
|
204
|
+
/** Logo url for the main privy modal screen.
|
|
205
|
+
* This overrides the server setting `logo_url` */
|
|
206
|
+
logo?: string;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
192
209
|
interface AllowlistConfig {
|
|
193
210
|
errorTitle: string | null;
|
|
194
211
|
errorDetail: string | null;
|
|
@@ -223,6 +240,11 @@ interface PrivyProviderProps {
|
|
|
223
240
|
* have any wallet associated with their user object.
|
|
224
241
|
*/
|
|
225
242
|
createPrivyWalletOnLogin?: boolean;
|
|
243
|
+
/**
|
|
244
|
+
* Client configuration options.
|
|
245
|
+
* Values here will override their server-configuration counterparts.
|
|
246
|
+
*/
|
|
247
|
+
config?: PrivyClientConfig;
|
|
226
248
|
/**
|
|
227
249
|
* @ignore
|
|
228
250
|
* @class
|
|
@@ -809,7 +831,7 @@ declare class PrivyClient {
|
|
|
809
831
|
getAccessToken(options?: {
|
|
810
832
|
disableAutoRefresh?: boolean;
|
|
811
833
|
}): Promise<string | null>;
|
|
812
|
-
|
|
834
|
+
getServerConfig(): Promise<PrivyServerConfig>;
|
|
813
835
|
setActiveWallet(address: string, user: User): Promise<User>;
|
|
814
836
|
/**
|
|
815
837
|
* Get a short-lived token to start a new Privy session from the existing authenticated session.
|
|
@@ -823,4 +845,4 @@ declare class PrivyClient {
|
|
|
823
845
|
forkSession(): Promise<string>;
|
|
824
846
|
}
|
|
825
847
|
|
|
826
|
-
export { AsExternalProvider, ConnectorManager, Discord, DiscordOAuthWithMetadata, Email, EmailWithMetadata, Github, GithubOAuthWithMetadata, Google, GoogleOAuthWithMetadata, Phone, PhoneWithMetadata, PrivyClient, PrivyInterface, PrivyProvider, PrivyProviderProps, PrivyProxyProvider, SignMessageModalUIOptions, Twitter, TwitterOAuthWithMetadata, User, VERSION, Wallet, WalletConnector, WalletWithMetadata, getAccessToken, usePrivy };
|
|
848
|
+
export { AsExternalProvider, ConnectorManager, Discord, DiscordOAuthWithMetadata, Email, EmailWithMetadata, Github, GithubOAuthWithMetadata, Google, GoogleOAuthWithMetadata, Phone, PhoneWithMetadata, PrivyClient, PrivyClientConfig, PrivyInterface, PrivyProvider, PrivyProviderProps, PrivyProxyProvider, SignMessageModalUIOptions, Twitter, TwitterOAuthWithMetadata, User, VERSION, Wallet, WalletConnector, WalletWithMetadata, getAccessToken, usePrivy };
|