@dxos/client-services 0.7.5-labs.a8b535d → 0.7.5-labs.d199c0f

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.
@@ -397,7 +397,7 @@ import { SpaceMember } from "@dxos/protocols/proto/dxos/client/services";
397
397
  import { TRACE_PROCESSOR } from "@dxos/tracing";
398
398
 
399
399
  // packages/sdk/client-services/src/version.ts
400
- var DXOS_VERSION = "0.7.5-labs.a8b535d";
400
+ var DXOS_VERSION = "0.7.5-labs.d199c0f";
401
401
 
402
402
  // packages/sdk/client-services/src/packlets/services/platform.ts
403
403
  import { Platform } from "@dxos/protocols/proto/dxos/client/services";
@@ -7428,7 +7428,7 @@ var EdgeIdentityRecoveryManager = class {
7428
7428
  this._identityProvider = _identityProvider;
7429
7429
  this._acceptRecoveredIdentity = _acceptRecoveredIdentity;
7430
7430
  }
7431
- async createRecoveryCredential({ recoveryKey, lookupKey, algorithm }) {
7431
+ async createRecoveryCredential({ data }) {
7432
7432
  const identity = this._identityProvider();
7433
7433
  invariant19(identity, void 0, {
7434
7434
  F: __dxlog_file27,
@@ -7439,23 +7439,21 @@ var EdgeIdentityRecoveryManager = class {
7439
7439
  ""
7440
7440
  ]
7441
7441
  });
7442
+ let recoveryKey;
7443
+ let lookupKey;
7444
+ let algorithm;
7442
7445
  let recoveryCode;
7443
- if (!recoveryKey || !lookupKey) {
7446
+ if (data) {
7447
+ recoveryKey = data.recoveryKey;
7448
+ lookupKey = data.lookupKey;
7449
+ algorithm = data.algorithm;
7450
+ } else {
7444
7451
  recoveryCode = generateSeedPhrase();
7445
7452
  const keypair = keyPairFromSeedPhrase(recoveryCode);
7446
7453
  recoveryKey = PublicKey14.from(keypair.publicKey);
7447
- lookupKey = PublicKey14.random();
7454
+ lookupKey = PublicKey14.from(keypair.publicKey);
7448
7455
  algorithm = "ED25519";
7449
7456
  }
7450
- invariant19(algorithm, "Algorithm is required.", {
7451
- F: __dxlog_file27,
7452
- L: 48,
7453
- S: this,
7454
- A: [
7455
- "algorithm",
7456
- "'Algorithm is required.'"
7457
- ]
7458
- });
7459
7457
  const identityKey = identity.identityKey;
7460
7458
  const credential = await identity.getIdentityCredentialSigner().createCredential({
7461
7459
  subject: identityKey,
@@ -7485,7 +7483,7 @@ var EdgeIdentityRecoveryManager = class {
7485
7483
  async requestRecoveryChallenge() {
7486
7484
  invariant19(this._edgeClient, "Not connected to EDGE.", {
7487
7485
  F: __dxlog_file27,
7488
- L: 68,
7486
+ L: 74,
7489
7487
  S: this,
7490
7488
  A: [
7491
7489
  "this._edgeClient",
@@ -7515,7 +7513,7 @@ var EdgeIdentityRecoveryManager = class {
7515
7513
  async recoverIdentityWithExternalSignature({ lookupKey, deviceKey, controlFeedKey, signature, clientDataJson, authenticatorData }) {
7516
7514
  invariant19(this._edgeClient, "Not connected to EDGE.", {
7517
7515
  F: __dxlog_file27,
7518
- L: 100,
7516
+ L: 106,
7519
7517
  S: this,
7520
7518
  A: [
7521
7519
  "this._edgeClient",
@@ -7546,7 +7544,7 @@ var EdgeIdentityRecoveryManager = class {
7546
7544
  async recoverIdentity({ recoveryCode }) {
7547
7545
  invariant19(this._edgeClient, "Not connected to EDGE.", {
7548
7546
  F: __dxlog_file27,
7549
- L: 130,
7547
+ L: 136,
7550
7548
  S: this,
7551
7549
  A: [
7552
7550
  "this._edgeClient",
@@ -7577,7 +7575,7 @@ var EdgeIdentityRecoveryManager = class {
7577
7575
  }
7578
7576
  log23.info("recovering identity", response, {
7579
7577
  F: __dxlog_file27,
7580
- L: 156,
7578
+ L: 162,
7581
7579
  S: this,
7582
7580
  C: (f, a) => f(...a)
7583
7581
  });
@@ -9179,4 +9177,4 @@ export {
9179
9177
  importProfileData,
9180
9178
  ClientServicesHost
9181
9179
  };
9182
- //# sourceMappingURL=chunk-LGIF7IGW.mjs.map
9180
+ //# sourceMappingURL=chunk-4UDOVX6F.mjs.map