@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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { SessionKey, AuthResponse, OAuthProvider as OAuthProvider$1, InitializeOAuthOptions as InitializeOAuthOptions$1, InitAuthResponse, TokenType as TokenType$1, SIWEInitResponse, ThirdPartyOAuthProvider as ThirdPartyOAuthProvider$1, AuthPlayerResponse as AuthPlayerResponse$1, Auth, TransactionIntentResponse as TransactionIntentResponse$1, SessionResponse as SessionResponse$1, EmbeddedState as EmbeddedState$1, SDKOverrides as SDKOverrides$1 } from 'types';
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: string, password: string): Promise<AuthResponse>;
89
- signUpWithEmailPassword(email: string, password: string, name?: string): Promise<AuthResponse>;
90
- requestEmailVerification(email: string, redirectUrl: string): Promise<void>;
91
- resetPassword(email: string, password: string, state: string): Promise<void>;
92
- requestResetPassword(email: string, redirectUrl: string): Promise<void>;
93
- verifyEmail(email: string, state: string): Promise<void>;
94
- initOAuth(provider: OAuthProvider$1, usePooling?: boolean, options?: InitializeOAuthOptions$1): Promise<InitAuthResponse>;
95
- initLinkOAuth(provider: OAuthProvider$1, playerToken: string, usePooling?: boolean, options?: InitializeOAuthOptions$1): Promise<InitAuthResponse>;
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
- authenticateWithOAuth(provider: OAuthProvider$1, token: string, tokenType: TokenType$1): Promise<AuthResponse>;
98
- initSIWE(address: string): Promise<SIWEInitResponse>;
99
- authenticateWithThirdPartyProvider(provider: ThirdPartyOAuthProvider$1, token: string, tokenType: TokenType$1): Promise<AuthPlayerResponse$1>;
100
- authenticateWithSIWE(signature: string, message: string, walletClientType: string, connectorType: string): Promise<AuthResponse>;
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. */