@openfort/openfort-js 0.6.21 → 0.6.22

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.cjs CHANGED
@@ -2656,6 +2656,9 @@ class IframeClient {
2656
2656
  }
2657
2657
  this.configuration = configuration;
2658
2658
  this.configuration.iframeURL = configuration.iframeURL || 'https://iframe.openfort.xyz';
2659
+ if (configuration.debug) {
2660
+ this.configuration.iframeURL += '?debug=true';
2661
+ }
2659
2662
  window.addEventListener('message', (event) => {
2660
2663
  if (event.origin === this.configuration.iframeURL) {
2661
2664
  const { data } = event;
@@ -3161,6 +3164,7 @@ class MissingPublishableKey extends Error {
3161
3164
  }
3162
3165
  }
3163
3166
  class Openfort {
3167
+ debug;
3164
3168
  signer;
3165
3169
  publishableKey;
3166
3170
  shieldAPIKey;
@@ -3169,7 +3173,8 @@ class Openfort {
3169
3173
  shieldURL;
3170
3174
  encryptionPart;
3171
3175
  instanceManager;
3172
- constructor(publishableKey, shieldAPIKey = null, encryptionShare = null, iframeURL = 'https://iframe.openfort.xyz', openfortURL = 'https://api.openfort.xyz', shieldURL = 'https://shield.openfort.xyz') {
3176
+ constructor(publishableKey, shieldAPIKey = null, encryptionShare = null, iframeURL = 'https://iframe.openfort.xyz', openfortURL = 'https://api.openfort.xyz', shieldURL = 'https://shield.openfort.xyz', debug = false) {
3177
+ this.debug = debug;
3173
3178
  this.instanceManager = new InstanceManager(new SessionStorage(), new LocalStorage(), new LocalStorage());
3174
3179
  this.iframeURL = iframeURL;
3175
3180
  this.openfortURL = openfortURL;
@@ -3238,6 +3243,7 @@ class Openfort {
3238
3243
  shieldAPIKey: this.shieldAPIKey,
3239
3244
  shieldURL: this.shieldURL,
3240
3245
  encryptionPart: this.encryptionPart,
3246
+ debug: this.debug,
3241
3247
  };
3242
3248
  }
3243
3249
  recoverPublishableKey() {
@@ -3291,6 +3297,7 @@ class Openfort {
3291
3297
  shieldAPIKey: this.shieldAPIKey,
3292
3298
  shieldURL: this.shieldURL,
3293
3299
  encryptionPart: this.encryptionPart,
3300
+ debug: this.debug,
3294
3301
  };
3295
3302
  return new EmbeddedSigner(iframeConfiguration, this.instanceManager);
3296
3303
  }
package/dist/index.d.ts CHANGED
@@ -1248,6 +1248,7 @@ declare class MissingPublishableKey extends Error {
1248
1248
  constructor(message: string);
1249
1249
  }
1250
1250
  declare class Openfort {
1251
+ private readonly debug;
1251
1252
  private signer?;
1252
1253
  private publishableKey;
1253
1254
  private readonly shieldAPIKey;
@@ -1256,7 +1257,7 @@ declare class Openfort {
1256
1257
  private readonly shieldURL;
1257
1258
  private readonly encryptionPart;
1258
1259
  private readonly instanceManager;
1259
- constructor(publishableKey: string, shieldAPIKey?: string | null, encryptionShare?: string | null, iframeURL?: string, openfortURL?: string, shieldURL?: string);
1260
+ constructor(publishableKey: string, shieldAPIKey?: string | null, encryptionShare?: string | null, iframeURL?: string, openfortURL?: string, shieldURL?: string, debug?: boolean);
1260
1261
  logout(): Promise<void>;
1261
1262
  private flushSigner;
1262
1263
  private createIFrameConfiguration;
package/dist/index.js CHANGED
@@ -2652,6 +2652,9 @@ class IframeClient {
2652
2652
  }
2653
2653
  this.configuration = configuration;
2654
2654
  this.configuration.iframeURL = configuration.iframeURL || 'https://iframe.openfort.xyz';
2655
+ if (configuration.debug) {
2656
+ this.configuration.iframeURL += '?debug=true';
2657
+ }
2655
2658
  window.addEventListener('message', (event) => {
2656
2659
  if (event.origin === this.configuration.iframeURL) {
2657
2660
  const { data } = event;
@@ -3157,6 +3160,7 @@ class MissingPublishableKey extends Error {
3157
3160
  }
3158
3161
  }
3159
3162
  class Openfort {
3163
+ debug;
3160
3164
  signer;
3161
3165
  publishableKey;
3162
3166
  shieldAPIKey;
@@ -3165,7 +3169,8 @@ class Openfort {
3165
3169
  shieldURL;
3166
3170
  encryptionPart;
3167
3171
  instanceManager;
3168
- constructor(publishableKey, shieldAPIKey = null, encryptionShare = null, iframeURL = 'https://iframe.openfort.xyz', openfortURL = 'https://api.openfort.xyz', shieldURL = 'https://shield.openfort.xyz') {
3172
+ constructor(publishableKey, shieldAPIKey = null, encryptionShare = null, iframeURL = 'https://iframe.openfort.xyz', openfortURL = 'https://api.openfort.xyz', shieldURL = 'https://shield.openfort.xyz', debug = false) {
3173
+ this.debug = debug;
3169
3174
  this.instanceManager = new InstanceManager(new SessionStorage(), new LocalStorage(), new LocalStorage());
3170
3175
  this.iframeURL = iframeURL;
3171
3176
  this.openfortURL = openfortURL;
@@ -3234,6 +3239,7 @@ class Openfort {
3234
3239
  shieldAPIKey: this.shieldAPIKey,
3235
3240
  shieldURL: this.shieldURL,
3236
3241
  encryptionPart: this.encryptionPart,
3242
+ debug: this.debug,
3237
3243
  };
3238
3244
  }
3239
3245
  recoverPublishableKey() {
@@ -3287,6 +3293,7 @@ class Openfort {
3287
3293
  shieldAPIKey: this.shieldAPIKey,
3288
3294
  shieldURL: this.shieldURL,
3289
3295
  encryptionPart: this.encryptionPart,
3296
+ debug: this.debug,
3290
3297
  };
3291
3298
  return new EmbeddedSigner(iframeConfiguration, this.instanceManager);
3292
3299
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfort/openfort-js",
3
- "version": "0.6.21",
3
+ "version": "0.6.22",
4
4
  "author": "Openfort (https://www.openfort.xyz)",
5
5
  "bugs": "https://github.com/openfort-xyz/openfort-js/issues",
6
6
  "repository": "openfort-xyz/openfort-js.git",