@dxos/client-services 0.7.5-labs.ea4b4c2 → 0.7.5-labs.f400bbc

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.
Files changed (30) hide show
  1. package/dist/lib/browser/{chunk-X65X3DJU.mjs → chunk-VWZJYGCJ.mjs} +17 -15
  2. package/dist/lib/browser/chunk-VWZJYGCJ.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +1 -1
  4. package/dist/lib/browser/meta.json +1 -1
  5. package/dist/lib/browser/testing/index.mjs +1 -1
  6. package/dist/lib/node/{chunk-2XAKPWJ6.cjs → chunk-TVKZUCQN.cjs} +19 -17
  7. package/dist/lib/node/chunk-TVKZUCQN.cjs.map +7 -0
  8. package/dist/lib/node/index.cjs +47 -47
  9. package/dist/lib/node/meta.json +1 -1
  10. package/dist/lib/node/testing/index.cjs +8 -8
  11. package/dist/lib/node-esm/{chunk-UCFK27SP.mjs → chunk-OEO5PHCK.mjs} +17 -15
  12. package/dist/lib/node-esm/chunk-OEO5PHCK.mjs.map +7 -0
  13. package/dist/lib/node-esm/index.mjs +1 -1
  14. package/dist/lib/node-esm/meta.json +1 -1
  15. package/dist/lib/node-esm/testing/index.mjs +1 -1
  16. package/dist/types/src/packlets/diagnostics/diagnostics-collector.d.ts.map +1 -1
  17. package/dist/types/src/packlets/identity/identity-recovery-manager.d.ts +2 -2
  18. package/dist/types/src/packlets/identity/identity-recovery-manager.d.ts.map +1 -1
  19. package/dist/types/src/packlets/identity/identity-service.d.ts +2 -2
  20. package/dist/types/src/packlets/services/service-host.d.ts +1 -1
  21. package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
  22. package/dist/types/src/version.d.ts +1 -1
  23. package/package.json +39 -38
  24. package/src/packlets/diagnostics/diagnostics-collector.ts +2 -2
  25. package/src/packlets/identity/identity-recovery-manager.ts +7 -5
  26. package/src/packlets/spaces/data-space.ts +2 -2
  27. package/src/version.ts +1 -1
  28. package/dist/lib/browser/chunk-X65X3DJU.mjs.map +0 -7
  29. package/dist/lib/node/chunk-2XAKPWJ6.cjs.map +0 -7
  30. package/dist/lib/node-esm/chunk-UCFK27SP.mjs.map +0 -7
@@ -6,7 +6,7 @@ import {
6
6
  InvitationsManager,
7
7
  ServiceContext,
8
8
  SpaceInvitationProtocol
9
- } from "../chunk-X65X3DJU.mjs";
9
+ } from "../chunk-VWZJYGCJ.mjs";
10
10
 
11
11
  // packages/sdk/client-services/src/packlets/testing/credential-utils.ts
12
12
  import { createCredential } from "@dxos/credentials";
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_2XAKPWJ6_exports = {};
30
- __export(chunk_2XAKPWJ6_exports, {
29
+ var chunk_TVKZUCQN_exports = {};
30
+ __export(chunk_TVKZUCQN_exports, {
31
31
  ClientRpcServer: () => ClientRpcServer,
32
32
  ClientServicesHost: () => ClientServicesHost,
33
33
  DataSpace: () => DataSpace,
@@ -72,7 +72,7 @@ __export(chunk_2XAKPWJ6_exports, {
72
72
  subscribeToSpaces: () => subscribeToSpaces,
73
73
  subscribeToSwarmInfo: () => subscribeToSwarmInfo
74
74
  });
75
- module.exports = __toCommonJS(chunk_2XAKPWJ6_exports);
75
+ module.exports = __toCommonJS(chunk_TVKZUCQN_exports);
76
76
  var import_async = require("@dxos/async");
77
77
  var import_stream = require("@dxos/codec-protobuf/stream");
78
78
  var import_feed_store = require("@dxos/feed-store");
@@ -735,7 +735,7 @@ var DevtoolsServiceImpl = class {
735
735
  });
736
736
  }
737
737
  };
738
- var DXOS_VERSION = "0.7.5-labs.ea4b4c2";
738
+ var DXOS_VERSION = "0.7.5-labs.f400bbc";
739
739
  var getPlatform = () => {
740
740
  if (process.browser) {
741
741
  if (typeof window !== "undefined") {
@@ -928,7 +928,7 @@ var findSystemServiceProvider = () => {
928
928
  };
929
929
  var findConfigs = () => {
930
930
  const configs = import_tracing2.TRACE_PROCESSOR.findResourcesByAnnotation(import_config.ConfigResource);
931
- return configs.map((r) => r.instance.deref()).filter(import_util2.nonNullable);
931
+ return configs.map((r) => r.instance.deref()).filter(import_util2.isNonNullable);
932
932
  };
933
933
  var __dxlog_file4 = "/home/runner/work/dxos/dxos/packages/sdk/client-services/src/packlets/identity/authenticator.ts";
934
934
  var Credential = import_proto.schema.getCodecForType("dxos.halo.credentials.Credential");
@@ -7298,7 +7298,7 @@ var EdgeIdentityRecoveryManager = class {
7298
7298
  this._identityProvider = _identityProvider;
7299
7299
  this._acceptRecoveredIdentity = _acceptRecoveredIdentity;
7300
7300
  }
7301
- async createRecoveryCredential({ recoveryKey, algorithm }) {
7301
+ async createRecoveryCredential({ recoveryKey, lookupKey, algorithm }) {
7302
7302
  const identity = this._identityProvider();
7303
7303
  (0, import_invariant22.invariant)(identity, void 0, {
7304
7304
  F: __dxlog_file26,
@@ -7310,15 +7310,16 @@ var EdgeIdentityRecoveryManager = class {
7310
7310
  ]
7311
7311
  });
7312
7312
  let recoveryCode;
7313
- if (!recoveryKey) {
7313
+ if (!recoveryKey || !lookupKey) {
7314
7314
  recoveryCode = (0, import_credentials23.generateSeedPhrase)();
7315
7315
  const keypair = (0, import_credentials23.keyPairFromSeedPhrase)(recoveryCode);
7316
7316
  recoveryKey = import_keys17.PublicKey.from(keypair.publicKey);
7317
+ lookupKey = import_keys17.PublicKey.random();
7317
7318
  algorithm = "ED25519";
7318
7319
  }
7319
7320
  (0, import_invariant22.invariant)(algorithm, "Algorithm is required.", {
7320
7321
  F: __dxlog_file26,
7321
- L: 47,
7322
+ L: 48,
7322
7323
  S: this,
7323
7324
  A: [
7324
7325
  "algorithm",
@@ -7332,7 +7333,8 @@ var EdgeIdentityRecoveryManager = class {
7332
7333
  "@type": "dxos.halo.credentials.IdentityRecovery",
7333
7334
  recoveryKey,
7334
7335
  identityKey,
7335
- algorithm
7336
+ algorithm,
7337
+ lookupKey
7336
7338
  }
7337
7339
  });
7338
7340
  const receipt = await identity.controlPipeline.writer.write({
@@ -7353,7 +7355,7 @@ var EdgeIdentityRecoveryManager = class {
7353
7355
  async requestRecoveryChallenge() {
7354
7356
  (0, import_invariant22.invariant)(this._edgeClient, "Not connected to EDGE.", {
7355
7357
  F: __dxlog_file26,
7356
- L: 66,
7358
+ L: 68,
7357
7359
  S: this,
7358
7360
  A: [
7359
7361
  "this._edgeClient",
@@ -7380,10 +7382,10 @@ var EdgeIdentityRecoveryManager = class {
7380
7382
  };
7381
7383
  }
7382
7384
  }
7383
- async recoverIdentityWithExternalSignature({ identityDid, deviceKey, controlFeedKey, signature, clientDataJson, authenticatorData }) {
7385
+ async recoverIdentityWithExternalSignature({ lookupKey, deviceKey, controlFeedKey, signature, clientDataJson, authenticatorData }) {
7384
7386
  (0, import_invariant22.invariant)(this._edgeClient, "Not connected to EDGE.", {
7385
7387
  F: __dxlog_file26,
7386
- L: 98,
7388
+ L: 100,
7387
7389
  S: this,
7388
7390
  A: [
7389
7391
  "this._edgeClient",
@@ -7391,7 +7393,7 @@ var EdgeIdentityRecoveryManager = class {
7391
7393
  ]
7392
7394
  });
7393
7395
  const request = {
7394
- identityDid,
7396
+ lookupKey: lookupKey.toHex(),
7395
7397
  deviceKey: deviceKey.toHex(),
7396
7398
  controlFeedKey: controlFeedKey.toHex(),
7397
7399
  signature: clientDataJson && authenticatorData ? {
@@ -7414,7 +7416,7 @@ var EdgeIdentityRecoveryManager = class {
7414
7416
  async recoverIdentity({ recoveryCode }) {
7415
7417
  (0, import_invariant22.invariant)(this._edgeClient, "Not connected to EDGE.", {
7416
7418
  F: __dxlog_file26,
7417
- L: 128,
7419
+ L: 130,
7418
7420
  S: this,
7419
7421
  A: [
7420
7422
  "this._edgeClient",
@@ -7426,7 +7428,7 @@ var EdgeIdentityRecoveryManager = class {
7426
7428
  const deviceKey = await this._keyring.createKey();
7427
7429
  const controlFeedKey = await this._keyring.createKey();
7428
7430
  const request = {
7429
- recoveryKey: recoveryKey.toHex(),
7431
+ lookupKey: recoveryKey.toHex(),
7430
7432
  deviceKey: deviceKey.toHex(),
7431
7433
  controlFeedKey: controlFeedKey.toHex()
7432
7434
  };
@@ -7445,7 +7447,7 @@ var EdgeIdentityRecoveryManager = class {
7445
7447
  }
7446
7448
  import_log23.log.info("recovering identity", response, {
7447
7449
  F: __dxlog_file26,
7448
- L: 154,
7450
+ L: 156,
7449
7451
  S: this,
7450
7452
  C: (f, a) => f(...a)
7451
7453
  });
@@ -8974,4 +8976,4 @@ ClientServicesHost = _ts_decorate11([
8974
8976
  subscribeToSpaces,
8975
8977
  subscribeToSwarmInfo
8976
8978
  });
8977
- //# sourceMappingURL=chunk-2XAKPWJ6.cjs.map
8979
+ //# sourceMappingURL=chunk-TVKZUCQN.cjs.map