@privy-io/react-auth 1.28.0-beta.3 → 1.28.0-beta.5
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 +161 -160
- package/dist/index.d.ts +13 -8
- package/dist/index.js +159 -158
- package/package.json +8 -4
package/dist/index.d.ts
CHANGED
|
@@ -184,7 +184,7 @@ declare class ProviderRpcError extends PrivyError {
|
|
|
184
184
|
|
|
185
185
|
declare global {
|
|
186
186
|
interface Window {
|
|
187
|
-
ethereum?:
|
|
187
|
+
ethereum?: any;
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
type ProviderConnectInfo = {
|
|
@@ -633,6 +633,7 @@ type PrivyServerConfig = {
|
|
|
633
633
|
createdAt?: Date;
|
|
634
634
|
updatedAt?: Date;
|
|
635
635
|
customApiUrl?: string | null;
|
|
636
|
+
walletConnectCloudProjectId?: string | null;
|
|
636
637
|
embeddedWalletConfig: EmbeddedWalletsConfig;
|
|
637
638
|
/** May be deprecated from the server config in a future release */
|
|
638
639
|
logoUrl?: string;
|
|
@@ -683,6 +684,7 @@ type PrivyClientConfig = {
|
|
|
683
684
|
* This overrides the server setting `privacy_policy_url` */
|
|
684
685
|
privacyPolicyUrl?: string | null;
|
|
685
686
|
};
|
|
687
|
+
walletConnectCloudProjectId?: string;
|
|
686
688
|
/** All embedded wallets configuration */
|
|
687
689
|
embeddedWallets?: {
|
|
688
690
|
/**
|
|
@@ -835,7 +837,8 @@ declare class ConnectorManager extends EventEmitter<ConnectorManagerEvents> {
|
|
|
835
837
|
initialized: boolean;
|
|
836
838
|
private storedConnections;
|
|
837
839
|
private activeWallet?;
|
|
838
|
-
|
|
840
|
+
private walletConnectCloudProjectId;
|
|
841
|
+
constructor(walletConnectCloudProjectId: string);
|
|
839
842
|
/**
|
|
840
843
|
* The core wallets array that is exposed to developers. It builds
|
|
841
844
|
* the wallets away with the following logic:
|
|
@@ -849,10 +852,6 @@ declare class ConnectorManager extends EventEmitter<ConnectorManagerEvents> {
|
|
|
849
852
|
* Detect and add all valid wallet connectors.
|
|
850
853
|
*/
|
|
851
854
|
initialize(): void;
|
|
852
|
-
/**
|
|
853
|
-
* Restore previous Wallet Connect connections that have been stored in local storage.
|
|
854
|
-
*/
|
|
855
|
-
restoreWalletConnectConnectors(): void;
|
|
856
855
|
/**
|
|
857
856
|
* Helper function to find a wallet connector by connector type and wallet client type.
|
|
858
857
|
*/
|
|
@@ -875,7 +874,7 @@ declare class ConnectorManager extends EventEmitter<ConnectorManagerEvents> {
|
|
|
875
874
|
* Creates a new wallet connector for the given connector type and wallet client type.
|
|
876
875
|
* If a connector already exists, it will be returned instead.
|
|
877
876
|
*/
|
|
878
|
-
createWalletConnector(connectorType: ConnectorType, walletClientType: WalletClientType): WalletConnector | null
|
|
877
|
+
createWalletConnector(connectorType: ConnectorType, walletClientType: WalletClientType): Promise<WalletConnector | null>;
|
|
879
878
|
private addWalletConnector;
|
|
880
879
|
/**
|
|
881
880
|
* Upon initialization, loads previous connections from local storage. If local storage
|
|
@@ -1260,7 +1259,7 @@ declare class PrivyClient {
|
|
|
1260
1259
|
apiUrl: string;
|
|
1261
1260
|
fallbackApiUrl: string;
|
|
1262
1261
|
authFlow?: AuthFlow;
|
|
1263
|
-
connectors
|
|
1262
|
+
connectors?: ConnectorManager;
|
|
1264
1263
|
/**
|
|
1265
1264
|
* Creates a new Privy client.
|
|
1266
1265
|
* @param options Initialization options.
|
|
@@ -1279,6 +1278,12 @@ declare class PrivyClient {
|
|
|
1279
1278
|
*/
|
|
1280
1279
|
timeout?: number;
|
|
1281
1280
|
});
|
|
1281
|
+
/**
|
|
1282
|
+
* ConnectorManager initialization is deferred because the input parameter may be overridden by the server
|
|
1283
|
+
* config. We can set this once and only once. If it is set twice, event listeners will be created
|
|
1284
|
+
* on the first ConnectorManager and are not re-created.
|
|
1285
|
+
*/
|
|
1286
|
+
initializeConnectorManager(walletConnectCloudProjectId: string): void;
|
|
1282
1287
|
generateApi(): Http;
|
|
1283
1288
|
/**
|
|
1284
1289
|
* In the case of cookie-based auth, re-initialize the http client with the custom api url.
|