@privy-io/react-auth 1.18.0 → 1.19.0-beta.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/esm/index.js +302 -313
- package/dist/index.d.ts +32 -7
- package/dist/index.js +302 -313
- 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,30 @@ 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 HexColor = `#${string}`;
|
|
192
|
+
type PrivyClientConfig = {
|
|
193
|
+
/** All UI and theme related configuration */
|
|
194
|
+
appearance?: {
|
|
195
|
+
/** Primary theme for the privy UI. This dictates the foreground and background colors within the UI.
|
|
196
|
+
*
|
|
197
|
+
* 'light' (default): The privy default light UI.
|
|
198
|
+
* 'dark': The privy default dark UI.
|
|
199
|
+
* custom hex code (i.e. '#13152F'): A custom background. This will generate the remainder of the foreground and
|
|
200
|
+
* background colors for the UI by modulating the luminance of the passed color. This value should be _either_ dark
|
|
201
|
+
* or light (<20% or >80% luminance), for accessibility. */
|
|
202
|
+
theme?: 'light' | 'dark' | HexColor;
|
|
203
|
+
/** Accent color for the privy UI.
|
|
204
|
+
* Used for buttons, active borders, etc. This will generate light and dark variants.
|
|
205
|
+
* This overrides the server setting `accent_color`. */
|
|
206
|
+
accentColor?: HexColor;
|
|
207
|
+
/** Logo url for the main privy modal screen.
|
|
208
|
+
* This overrides the server setting `logo_url` */
|
|
209
|
+
logo?: string;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
192
212
|
interface AllowlistConfig {
|
|
193
213
|
errorTitle: string | null;
|
|
194
214
|
errorDetail: string | null;
|
|
@@ -223,6 +243,11 @@ interface PrivyProviderProps {
|
|
|
223
243
|
* have any wallet associated with their user object.
|
|
224
244
|
*/
|
|
225
245
|
createPrivyWalletOnLogin?: boolean;
|
|
246
|
+
/**
|
|
247
|
+
* Client configuration options.
|
|
248
|
+
* Values here will override their server-configuration counterparts.
|
|
249
|
+
*/
|
|
250
|
+
config?: PrivyClientConfig;
|
|
226
251
|
/**
|
|
227
252
|
* @ignore
|
|
228
253
|
* @class
|
|
@@ -809,7 +834,7 @@ declare class PrivyClient {
|
|
|
809
834
|
getAccessToken(options?: {
|
|
810
835
|
disableAutoRefresh?: boolean;
|
|
811
836
|
}): Promise<string | null>;
|
|
812
|
-
|
|
837
|
+
getServerConfig(): Promise<PrivyServerConfig>;
|
|
813
838
|
setActiveWallet(address: string, user: User): Promise<User>;
|
|
814
839
|
/**
|
|
815
840
|
* Get a short-lived token to start a new Privy session from the existing authenticated session.
|
|
@@ -823,4 +848,4 @@ declare class PrivyClient {
|
|
|
823
848
|
forkSession(): Promise<string>;
|
|
824
849
|
}
|
|
825
850
|
|
|
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 };
|
|
851
|
+
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 };
|