@dxos/client-services 0.7.5-staging.b81e783 → 0.8.0
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/lib/browser/{chunk-BOYWFK2U.mjs → chunk-25OL3JVO.mjs} +21 -21
- package/dist/lib/browser/chunk-25OL3JVO.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +1 -1
- package/dist/lib/node/{chunk-LWLCZ5YB.cjs → chunk-FELZPQQE.cjs} +24 -24
- package/dist/lib/node/chunk-FELZPQQE.cjs.map +7 -0
- package/dist/lib/node/index.cjs +47 -47
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +8 -8
- package/dist/lib/node-esm/{chunk-IUVDCT7O.mjs → chunk-ORQYMDJN.mjs} +21 -21
- package/dist/lib/node-esm/chunk-ORQYMDJN.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +1 -1
- package/dist/types/src/packlets/identity/identity-recovery-manager.d.ts +2 -2
- package/dist/types/src/packlets/identity/identity-recovery-manager.d.ts.map +1 -1
- package/dist/types/src/packlets/identity/identity-service.d.ts +2 -2
- package/dist/types/src/packlets/services/service-host.d.ts +1 -1
- package/dist/types/src/packlets/services/service-host.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +1 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/package.json +38 -38
- package/src/packlets/identity/identity-recovery-manager.ts +14 -6
- package/src/packlets/spaces/data-space.ts +2 -2
- package/src/version.ts +5 -1
- package/dist/lib/browser/chunk-BOYWFK2U.mjs.map +0 -7
- package/dist/lib/node/chunk-LWLCZ5YB.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-IUVDCT7O.mjs.map +0 -7
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
InvitationsManager,
|
|
7
7
|
ServiceContext,
|
|
8
8
|
SpaceInvitationProtocol
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-25OL3JVO.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
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_FELZPQQE_exports = {};
|
|
30
|
+
__export(chunk_FELZPQQE_exports, {
|
|
31
31
|
ClientRpcServer: () => ClientRpcServer,
|
|
32
32
|
ClientServicesHost: () => ClientServicesHost,
|
|
33
33
|
DataSpace: () => DataSpace,
|
|
@@ -72,7 +72,7 @@ __export(chunk_LWLCZ5YB_exports, {
|
|
|
72
72
|
subscribeToSpaces: () => subscribeToSpaces,
|
|
73
73
|
subscribeToSwarmInfo: () => subscribeToSwarmInfo
|
|
74
74
|
});
|
|
75
|
-
module.exports = __toCommonJS(
|
|
75
|
+
module.exports = __toCommonJS(chunk_FELZPQQE_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.
|
|
738
|
+
var DXOS_VERSION = "0.8.0";
|
|
739
739
|
var getPlatform = () => {
|
|
740
740
|
if (process.browser) {
|
|
741
741
|
if (typeof window !== "undefined") {
|
|
@@ -7298,7 +7298,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7298
7298
|
this._identityProvider = _identityProvider;
|
|
7299
7299
|
this._acceptRecoveredIdentity = _acceptRecoveredIdentity;
|
|
7300
7300
|
}
|
|
7301
|
-
async createRecoveryCredential({
|
|
7301
|
+
async createRecoveryCredential({ data }) {
|
|
7302
7302
|
const identity = this._identityProvider();
|
|
7303
7303
|
(0, import_invariant22.invariant)(identity, void 0, {
|
|
7304
7304
|
F: __dxlog_file26,
|
|
@@ -7309,22 +7309,21 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7309
7309
|
""
|
|
7310
7310
|
]
|
|
7311
7311
|
});
|
|
7312
|
+
let recoveryKey;
|
|
7313
|
+
let lookupKey;
|
|
7314
|
+
let algorithm;
|
|
7312
7315
|
let recoveryCode;
|
|
7313
|
-
if (
|
|
7316
|
+
if (data) {
|
|
7317
|
+
recoveryKey = data.recoveryKey;
|
|
7318
|
+
lookupKey = data.lookupKey;
|
|
7319
|
+
algorithm = data.algorithm;
|
|
7320
|
+
} else {
|
|
7314
7321
|
recoveryCode = (0, import_credentials23.generateSeedPhrase)();
|
|
7315
7322
|
const keypair = (0, import_credentials23.keyPairFromSeedPhrase)(recoveryCode);
|
|
7316
7323
|
recoveryKey = import_keys17.PublicKey.from(keypair.publicKey);
|
|
7324
|
+
lookupKey = import_keys17.PublicKey.from(keypair.publicKey);
|
|
7317
7325
|
algorithm = "ED25519";
|
|
7318
7326
|
}
|
|
7319
|
-
(0, import_invariant22.invariant)(algorithm, "Algorithm is required.", {
|
|
7320
|
-
F: __dxlog_file26,
|
|
7321
|
-
L: 47,
|
|
7322
|
-
S: this,
|
|
7323
|
-
A: [
|
|
7324
|
-
"algorithm",
|
|
7325
|
-
"'Algorithm is required.'"
|
|
7326
|
-
]
|
|
7327
|
-
});
|
|
7328
7327
|
const identityKey = identity.identityKey;
|
|
7329
7328
|
const credential = await identity.getIdentityCredentialSigner().createCredential({
|
|
7330
7329
|
subject: identityKey,
|
|
@@ -7332,7 +7331,8 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7332
7331
|
"@type": "dxos.halo.credentials.IdentityRecovery",
|
|
7333
7332
|
recoveryKey,
|
|
7334
7333
|
identityKey,
|
|
7335
|
-
algorithm
|
|
7334
|
+
algorithm,
|
|
7335
|
+
lookupKey
|
|
7336
7336
|
}
|
|
7337
7337
|
});
|
|
7338
7338
|
const receipt = await identity.controlPipeline.writer.write({
|
|
@@ -7353,7 +7353,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7353
7353
|
async requestRecoveryChallenge() {
|
|
7354
7354
|
(0, import_invariant22.invariant)(this._edgeClient, "Not connected to EDGE.", {
|
|
7355
7355
|
F: __dxlog_file26,
|
|
7356
|
-
L:
|
|
7356
|
+
L: 74,
|
|
7357
7357
|
S: this,
|
|
7358
7358
|
A: [
|
|
7359
7359
|
"this._edgeClient",
|
|
@@ -7380,10 +7380,10 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7380
7380
|
};
|
|
7381
7381
|
}
|
|
7382
7382
|
}
|
|
7383
|
-
async recoverIdentityWithExternalSignature({
|
|
7383
|
+
async recoverIdentityWithExternalSignature({ lookupKey, deviceKey, controlFeedKey, signature, clientDataJson, authenticatorData }) {
|
|
7384
7384
|
(0, import_invariant22.invariant)(this._edgeClient, "Not connected to EDGE.", {
|
|
7385
7385
|
F: __dxlog_file26,
|
|
7386
|
-
L:
|
|
7386
|
+
L: 106,
|
|
7387
7387
|
S: this,
|
|
7388
7388
|
A: [
|
|
7389
7389
|
"this._edgeClient",
|
|
@@ -7391,7 +7391,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7391
7391
|
]
|
|
7392
7392
|
});
|
|
7393
7393
|
const request = {
|
|
7394
|
-
|
|
7394
|
+
lookupKey: lookupKey.toHex(),
|
|
7395
7395
|
deviceKey: deviceKey.toHex(),
|
|
7396
7396
|
controlFeedKey: controlFeedKey.toHex(),
|
|
7397
7397
|
signature: clientDataJson && authenticatorData ? {
|
|
@@ -7414,7 +7414,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7414
7414
|
async recoverIdentity({ recoveryCode }) {
|
|
7415
7415
|
(0, import_invariant22.invariant)(this._edgeClient, "Not connected to EDGE.", {
|
|
7416
7416
|
F: __dxlog_file26,
|
|
7417
|
-
L:
|
|
7417
|
+
L: 136,
|
|
7418
7418
|
S: this,
|
|
7419
7419
|
A: [
|
|
7420
7420
|
"this._edgeClient",
|
|
@@ -7426,7 +7426,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7426
7426
|
const deviceKey = await this._keyring.createKey();
|
|
7427
7427
|
const controlFeedKey = await this._keyring.createKey();
|
|
7428
7428
|
const request = {
|
|
7429
|
-
|
|
7429
|
+
lookupKey: recoveryKey.toHex(),
|
|
7430
7430
|
deviceKey: deviceKey.toHex(),
|
|
7431
7431
|
controlFeedKey: controlFeedKey.toHex()
|
|
7432
7432
|
};
|
|
@@ -7445,7 +7445,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7445
7445
|
}
|
|
7446
7446
|
import_log23.log.info("recovering identity", response, {
|
|
7447
7447
|
F: __dxlog_file26,
|
|
7448
|
-
L:
|
|
7448
|
+
L: 162,
|
|
7449
7449
|
S: this,
|
|
7450
7450
|
C: (f, a) => f(...a)
|
|
7451
7451
|
});
|
|
@@ -8974,4 +8974,4 @@ ClientServicesHost = _ts_decorate11([
|
|
|
8974
8974
|
subscribeToSpaces,
|
|
8975
8975
|
subscribeToSwarmInfo
|
|
8976
8976
|
});
|
|
8977
|
-
//# sourceMappingURL=chunk-
|
|
8977
|
+
//# sourceMappingURL=chunk-FELZPQQE.cjs.map
|