@arbidocs/sdk 0.4.70 → 0.4.71

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
@@ -6750,10 +6750,18 @@ var Arbi = class {
6750
6750
  this.options = options;
6751
6751
  }
6752
6752
  // ── Lifecycle ───────────────────────────────────────────────────────────
6753
+ /**
6754
+ * The deployment domain the user's keys are derived for: `deploymentDomain` when given,
6755
+ * otherwise the hostname of `url`. Signing and password changes re-derive keys with it, so a
6756
+ * host that needs it (the document tools' e-signing) reads it here rather than recomputing it.
6757
+ */
6758
+ getDeploymentDomain() {
6759
+ return this.options.deploymentDomain ?? new URL(this.options.url).hostname;
6760
+ }
6753
6761
  /** Initialize the SDK client and sodium crypto. Called automatically by login(). */
6754
6762
  async init() {
6755
6763
  if (this.client) return this.client;
6756
- const domain = this.options.deploymentDomain ?? new URL(this.options.url).hostname;
6764
+ const domain = this.getDeploymentDomain();
6757
6765
  this.client = client.createArbiClient({
6758
6766
  baseUrl: this.options.url,
6759
6767
  deploymentDomain: domain,
@@ -7048,7 +7056,7 @@ var Arbi = class {
7048
7056
  { ...params, email, userExtId: lr2.userExtId },
7049
7057
  {
7050
7058
  fetchClient: client$1.fetch,
7051
- deploymentDomain: this.options.deploymentDomain ?? new URL(this.options.url).hostname
7059
+ deploymentDomain: this.getDeploymentDomain()
7052
7060
  }
7053
7061
  );
7054
7062
  this.loginResult = { ...lr2, signingPrivateKey: result.newSigningPrivateKey };