@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
|
@@ -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.
|
|
400
|
+
var DXOS_VERSION = "0.8.0";
|
|
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({
|
|
7431
|
+
async createRecoveryCredential({ data }) {
|
|
7432
7432
|
const identity = this._identityProvider();
|
|
7433
7433
|
invariant19(identity, void 0, {
|
|
7434
7434
|
F: __dxlog_file27,
|
|
@@ -7439,22 +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 (
|
|
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);
|
|
7454
|
+
lookupKey = PublicKey14.from(keypair.publicKey);
|
|
7447
7455
|
algorithm = "ED25519";
|
|
7448
7456
|
}
|
|
7449
|
-
invariant19(algorithm, "Algorithm is required.", {
|
|
7450
|
-
F: __dxlog_file27,
|
|
7451
|
-
L: 47,
|
|
7452
|
-
S: this,
|
|
7453
|
-
A: [
|
|
7454
|
-
"algorithm",
|
|
7455
|
-
"'Algorithm is required.'"
|
|
7456
|
-
]
|
|
7457
|
-
});
|
|
7458
7457
|
const identityKey = identity.identityKey;
|
|
7459
7458
|
const credential = await identity.getIdentityCredentialSigner().createCredential({
|
|
7460
7459
|
subject: identityKey,
|
|
@@ -7462,7 +7461,8 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7462
7461
|
"@type": "dxos.halo.credentials.IdentityRecovery",
|
|
7463
7462
|
recoveryKey,
|
|
7464
7463
|
identityKey,
|
|
7465
|
-
algorithm
|
|
7464
|
+
algorithm,
|
|
7465
|
+
lookupKey
|
|
7466
7466
|
}
|
|
7467
7467
|
});
|
|
7468
7468
|
const receipt = await identity.controlPipeline.writer.write({
|
|
@@ -7483,7 +7483,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7483
7483
|
async requestRecoveryChallenge() {
|
|
7484
7484
|
invariant19(this._edgeClient, "Not connected to EDGE.", {
|
|
7485
7485
|
F: __dxlog_file27,
|
|
7486
|
-
L:
|
|
7486
|
+
L: 74,
|
|
7487
7487
|
S: this,
|
|
7488
7488
|
A: [
|
|
7489
7489
|
"this._edgeClient",
|
|
@@ -7510,10 +7510,10 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7510
7510
|
};
|
|
7511
7511
|
}
|
|
7512
7512
|
}
|
|
7513
|
-
async recoverIdentityWithExternalSignature({
|
|
7513
|
+
async recoverIdentityWithExternalSignature({ lookupKey, deviceKey, controlFeedKey, signature, clientDataJson, authenticatorData }) {
|
|
7514
7514
|
invariant19(this._edgeClient, "Not connected to EDGE.", {
|
|
7515
7515
|
F: __dxlog_file27,
|
|
7516
|
-
L:
|
|
7516
|
+
L: 106,
|
|
7517
7517
|
S: this,
|
|
7518
7518
|
A: [
|
|
7519
7519
|
"this._edgeClient",
|
|
@@ -7521,7 +7521,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7521
7521
|
]
|
|
7522
7522
|
});
|
|
7523
7523
|
const request = {
|
|
7524
|
-
|
|
7524
|
+
lookupKey: lookupKey.toHex(),
|
|
7525
7525
|
deviceKey: deviceKey.toHex(),
|
|
7526
7526
|
controlFeedKey: controlFeedKey.toHex(),
|
|
7527
7527
|
signature: clientDataJson && authenticatorData ? {
|
|
@@ -7544,7 +7544,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7544
7544
|
async recoverIdentity({ recoveryCode }) {
|
|
7545
7545
|
invariant19(this._edgeClient, "Not connected to EDGE.", {
|
|
7546
7546
|
F: __dxlog_file27,
|
|
7547
|
-
L:
|
|
7547
|
+
L: 136,
|
|
7548
7548
|
S: this,
|
|
7549
7549
|
A: [
|
|
7550
7550
|
"this._edgeClient",
|
|
@@ -7556,7 +7556,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7556
7556
|
const deviceKey = await this._keyring.createKey();
|
|
7557
7557
|
const controlFeedKey = await this._keyring.createKey();
|
|
7558
7558
|
const request = {
|
|
7559
|
-
|
|
7559
|
+
lookupKey: recoveryKey.toHex(),
|
|
7560
7560
|
deviceKey: deviceKey.toHex(),
|
|
7561
7561
|
controlFeedKey: controlFeedKey.toHex()
|
|
7562
7562
|
};
|
|
@@ -7575,7 +7575,7 @@ var EdgeIdentityRecoveryManager = class {
|
|
|
7575
7575
|
}
|
|
7576
7576
|
log23.info("recovering identity", response, {
|
|
7577
7577
|
F: __dxlog_file27,
|
|
7578
|
-
L:
|
|
7578
|
+
L: 162,
|
|
7579
7579
|
S: this,
|
|
7580
7580
|
C: (f, a) => f(...a)
|
|
7581
7581
|
});
|
|
@@ -9177,4 +9177,4 @@ export {
|
|
|
9177
9177
|
importProfileData,
|
|
9178
9178
|
ClientServicesHost
|
|
9179
9179
|
};
|
|
9180
|
-
//# sourceMappingURL=chunk-
|
|
9180
|
+
//# sourceMappingURL=chunk-25OL3JVO.mjs.map
|