@startbahn/startrail-sdk-js 1.33.0 → 1.33.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.
@@ -74857,6 +74857,7 @@ const torusConfig = (config) => {
74857
74857
  enableLogging: true,
74858
74858
  network: config.network.ethereumNetwork,
74859
74859
  showTorusButton: false,
74860
+ mfaLevel: config.mfaLevel,
74860
74861
  whiteLabel: {
74861
74862
  theme: {
74862
74863
  isDark: false,
@@ -75015,7 +75016,8 @@ class TorusConfigContext {
75015
75016
  callbackUrl: (config === null || config === void 0 ? void 0 : config.callbackUrl) || null,
75016
75017
  withModal: typeof (config === null || config === void 0 ? void 0 : config.withModal) === 'boolean' ? config === null || config === void 0 ? void 0 : config.withModal : true,
75017
75018
  conditionalWords: this.convertWordsByAuthProvider(config),
75018
- customUi: config === null || config === void 0 ? void 0 : config.customUi
75019
+ customUi: config === null || config === void 0 ? void 0 : config.customUi,
75020
+ mfaLevel: (config === null || config === void 0 ? void 0 : config.mfaLevel) || 'none' // 'none' will skip the mfa setup screen totally. Check https://web3auth.io/docs/sdk/pnp/unreal/mfa#mfalevel
75019
75021
  };
75020
75022
  };
75021
75023
  const preConfig = this.prebuildConfig(config);
@@ -77500,6 +77502,10 @@ class Torus extends base_1.default {
77500
77502
  return __awaiter(this, void 0, void 0, function* () {
77501
77503
  try {
77502
77504
  const res = (yield this.torusSDK.getUserInfo(''));
77505
+ // Patch for Web3Wallet spec change
77506
+ if (Object.values(constant_1.AUTH0_TORUS_CONFIG_KEYS).includes(res.verifier)) {
77507
+ res['typeOfLogin'] = 'email_password';
77508
+ }
77503
77509
  return Object.assign(Object.assign({}, res), { wallet: 'startrail' });
77504
77510
  }
77505
77511
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startbahn/startrail-sdk-js",
3
- "version": "1.33.0",
3
+ "version": "1.33.2",
4
4
  "description": "Startrail Api for JS SDK",
5
5
  "main": "dist/startrail-sdk.js",
6
6
  "unpkg": "dist/startrail-sdk.js",
@@ -352,6 +352,7 @@ declare module '@startbahn/startrail-sdk-js/types' {
352
352
  };
353
353
  callbackUrl: string | null;
354
354
  withModal: boolean;
355
+ mfaLevel?: TorusParams["mfaLevel"];
355
356
  }
356
357
  export interface RequestObject {
357
358
  header: StartrailLUWContractAddress;
@@ -400,6 +401,7 @@ declare module '@startbahn/startrail-sdk-js/types' {
400
401
  loginProvider?: TLoginProviders;
401
402
  callbackUrl?: string;
402
403
  withModal?: boolean;
404
+ mfaLevel?: TorusParams["mfaLevel"];
403
405
  }
404
406
  export interface TypedDataAndSignature {
405
407
  signature: string;
@@ -641,6 +643,7 @@ declare module '@startbahn/startrail-sdk-js/types' {
641
643
  enableLogging?: boolean;
642
644
  showTorusButton?: boolean;
643
645
  enabledVerifiers?: VerifierStatus;
646
+ mfaLevel?: "none" | "default" | "optional" | "mandatory";
644
647
  whiteLabel?: {
645
648
  defaultLanguage: string;
646
649
  theme: {