@openfort/openfort-js 0.7.6 → 0.7.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/README.md +1 -1
- package/dist/index.cjs +382 -228
- package/dist/index.d.ts +56 -14
- package/dist/index.js +383 -229
- package/package.json +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SessionKey, AuthResponse, OAuthProvider as OAuthProvider$1, InitializeOAuthOptions as InitializeOAuthOptions$1, InitAuthResponse,
|
|
1
|
+
import { SessionKey, AuthResponse, OAuthProvider as OAuthProvider$1, InitializeOAuthOptions as InitializeOAuthOptions$1, InitAuthResponse, SIWEInitResponse, ThirdPartyOAuthProvider as ThirdPartyOAuthProvider$1, TokenType as TokenType$1, AuthPlayerResponse as AuthPlayerResponse$1, Auth, TransactionIntentResponse as TransactionIntentResponse$1, SessionResponse as SessionResponse$1, EmbeddedState as EmbeddedState$1, SDKOverrides as SDKOverrides$1 } from 'types';
|
|
2
2
|
import { SDKConfiguration as SDKConfiguration$1 } from 'config';
|
|
3
3
|
import { Provider as Provider$1 } from 'evm/types';
|
|
4
4
|
|
|
@@ -85,19 +85,60 @@ declare class Openfort {
|
|
|
85
85
|
configureSessionKey(): SessionKey;
|
|
86
86
|
configureEmbeddedSigner(chainId?: number, shieldAuthentication?: ShieldAuthentication, recoveryPassword?: string): Promise<void>;
|
|
87
87
|
private newEmbeddedSigner;
|
|
88
|
-
loginWithEmailPassword(email
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
loginWithEmailPassword({ email, password, }: {
|
|
89
|
+
email: string;
|
|
90
|
+
password: string;
|
|
91
|
+
}): Promise<AuthResponse>;
|
|
92
|
+
signUpWithEmailPassword({ email, password, options, }: {
|
|
93
|
+
email: string;
|
|
94
|
+
password: string;
|
|
95
|
+
options?: {
|
|
96
|
+
data: {
|
|
97
|
+
name: string;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
}): Promise<AuthResponse>;
|
|
101
|
+
requestEmailVerification({ email, redirectUrl }: {
|
|
102
|
+
email: string;
|
|
103
|
+
redirectUrl: string;
|
|
104
|
+
}): Promise<void>;
|
|
105
|
+
resetPassword({ email, password, state }: {
|
|
106
|
+
email: string;
|
|
107
|
+
password: string;
|
|
108
|
+
state: string;
|
|
109
|
+
}): Promise<void>;
|
|
110
|
+
requestResetPassword({ email, redirectUrl }: {
|
|
111
|
+
email: string;
|
|
112
|
+
redirectUrl: string;
|
|
113
|
+
}): Promise<void>;
|
|
114
|
+
verifyEmail({ email, state }: {
|
|
115
|
+
email: string;
|
|
116
|
+
state: string;
|
|
117
|
+
}): Promise<void>;
|
|
118
|
+
initOAuth({ provider, options }: {
|
|
119
|
+
provider: OAuthProvider$1;
|
|
120
|
+
options?: InitializeOAuthOptions$1;
|
|
121
|
+
}): Promise<InitAuthResponse>;
|
|
122
|
+
initLinkOAuth({ provider, playerToken, options }: {
|
|
123
|
+
provider: OAuthProvider$1;
|
|
124
|
+
playerToken: string;
|
|
125
|
+
options?: InitializeOAuthOptions$1;
|
|
126
|
+
}): Promise<InitAuthResponse>;
|
|
96
127
|
poolOAuth(key: string): Promise<AuthResponse>;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
128
|
+
initSIWE({ address }: {
|
|
129
|
+
address: string;
|
|
130
|
+
}): Promise<SIWEInitResponse>;
|
|
131
|
+
authenticateWithThirdPartyProvider({ provider, token, tokenType }: {
|
|
132
|
+
provider: ThirdPartyOAuthProvider$1;
|
|
133
|
+
token: string;
|
|
134
|
+
tokenType: TokenType$1;
|
|
135
|
+
}): Promise<AuthPlayerResponse$1>;
|
|
136
|
+
authenticateWithSIWE({ signature, message, walletClientType, connectorType, }: {
|
|
137
|
+
signature: string;
|
|
138
|
+
message: string;
|
|
139
|
+
walletClientType: string;
|
|
140
|
+
connectorType: string;
|
|
141
|
+
}): Promise<AuthResponse>;
|
|
101
142
|
storeCredentials(auth: Auth): void;
|
|
102
143
|
sendSignatureTransactionIntentRequest(transactionIntentId: string, userOperationHash?: string | null, signature?: string | null): Promise<TransactionIntentResponse$1>;
|
|
103
144
|
signMessage(message: string | Uint8Array, options?: {
|
|
@@ -110,9 +151,9 @@ declare class Openfort {
|
|
|
110
151
|
private waitSigner;
|
|
111
152
|
getEmbeddedState(): EmbeddedState$1;
|
|
112
153
|
private credentialsProvided;
|
|
113
|
-
isAuthenticated(): Promise<boolean>;
|
|
114
154
|
getAccessToken(): string | null;
|
|
115
155
|
isLoaded(): boolean;
|
|
156
|
+
getUser(): Promise<AuthPlayerResponse$1>;
|
|
116
157
|
validateAndRefreshToken(): Promise<void>;
|
|
117
158
|
}
|
|
118
159
|
|
|
@@ -138,6 +179,7 @@ declare enum EmbeddedState {
|
|
|
138
179
|
READY = 4
|
|
139
180
|
}
|
|
140
181
|
type InitializeOAuthOptions = {
|
|
182
|
+
usePooling?: boolean;
|
|
141
183
|
/** A URL to send the user to after they are confirmed. */
|
|
142
184
|
redirectTo?: string;
|
|
143
185
|
/** A space-separated list of scopes granted to the OAuth application. */
|