@arbidocs/sdk 0.4.85 → 0.4.86

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
@@ -8139,25 +8139,22 @@ var Arbi = class {
8139
8139
  return result;
8140
8140
  },
8141
8141
  /**
8142
- * Change (or, after recovery, set) the master password: re-keys the workspaces and direct
8143
- * messages. Omit `currentPassword` in recovery mode. Resolves with the new signing key, whose
8144
- * recovery file the user should save.
8142
+ * Change (or, after recovery, set) the master password. Omit `currentPassword` in recovery
8143
+ * mode. One request: the account identity is re-wrapped under the new password and nothing is
8144
+ * re-encrypted, so the session, the workspace keys and the recovery key all stay as they are.
8145
8145
  */
8146
8146
  changePassword: async (params) => {
8147
8147
  const client$1 = this.requireClient();
8148
8148
  const lr2 = this.requireLogin();
8149
8149
  const email = client$1.session.getState().userEmail ?? this.userProfile?.email;
8150
8150
  if (!email) throw new ArbiError("The account email is unknown; sign in again.");
8151
- const result = await client.changePasswordWithRekey(
8152
- { ...params, email, userExtId: lr2.userExtId },
8151
+ await client.changePassword(
8152
+ { ...params, email, identitySecretKey: lr2.signingPrivateKey },
8153
8153
  {
8154
8154
  fetchClient: client$1.fetch,
8155
8155
  deploymentDomain: this.getDeploymentDomain()
8156
8156
  }
8157
8157
  );
8158
- this.loginResult = { ...lr2, signingPrivateKey: result.newSigningPrivateKey };
8159
- this.wrappedKeys.clear();
8160
- return result;
8161
8158
  },
8162
8159
  /** Close the account (soft delete) and sign out. Refused while a subscription is active. */
8163
8160
  requestDeletion: async () => {