@ibgib/core-gib 0.1.47 → 0.1.49
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/common/other/ibgib-helper.d.mts +12 -0
- package/dist/common/other/ibgib-helper.d.mts.map +1 -1
- package/dist/common/other/ibgib-helper.mjs +39 -0
- package/dist/common/other/ibgib-helper.mjs.map +1 -1
- package/dist/keystone/kdf/kdf-helpers.mjs +2 -2
- package/dist/keystone/kdf/kdf-helpers.mjs.map +1 -1
- package/dist/keystone/keystone-config-builder.d.mts +2 -1
- package/dist/keystone/keystone-config-builder.d.mts.map +1 -1
- package/dist/keystone/keystone-config-builder.mjs +8 -2
- package/dist/keystone/keystone-config-builder.mjs.map +1 -1
- package/dist/keystone/keystone-constants.d.mts +24 -3
- package/dist/keystone/keystone-constants.d.mts.map +1 -1
- package/dist/keystone/keystone-constants.mjs +22 -1
- package/dist/keystone/keystone-constants.mjs.map +1 -1
- package/dist/keystone/keystone-helpers.d.mts.map +1 -1
- package/dist/keystone/keystone-helpers.mjs +7 -9
- package/dist/keystone/keystone-helpers.mjs.map +1 -1
- package/dist/keystone/keystone-service-v1.d.mts +4 -1
- package/dist/keystone/keystone-service-v1.d.mts.map +1 -1
- package/dist/keystone/keystone-service-v1.mjs +6 -1
- package/dist/keystone/keystone-service-v1.mjs.map +1 -1
- package/dist/keystone/keystone-service-v1.respec.mjs +26 -26
- package/dist/keystone/keystone-service-v1.respec.mjs.map +1 -1
- package/dist/keystone/keystone-types.d.mts +24 -5
- package/dist/keystone/keystone-types.d.mts.map +1 -1
- package/dist/keystone/keystone-types.mjs.map +1 -1
- package/dist/sync/sync-conflict-adv-multitimelines.respec.mjs +2 -2
- package/dist/sync/sync-conflict-adv-multitimelines.respec.mjs.map +1 -1
- package/dist/sync/sync-conflict-basic-divergence.respec.mjs +2 -2
- package/dist/sync/sync-conflict-basic-divergence.respec.mjs.map +1 -1
- package/dist/sync/sync-conflict-basic-multitimelines.respec.mjs +2 -2
- package/dist/sync/sync-conflict-basic-multitimelines.respec.mjs.map +1 -1
- package/dist/sync/sync-conflict-text-merge.respec.mjs +2 -2
- package/dist/sync/sync-conflict-text-merge.respec.mjs.map +1 -1
- package/dist/sync/sync-constants.d.mts +47 -1
- package/dist/sync/sync-constants.d.mts.map +1 -1
- package/dist/sync/sync-constants.mjs +49 -1
- package/dist/sync/sync-constants.mjs.map +1 -1
- package/dist/sync/sync-innerspace-constants.respec.mjs +2 -2
- package/dist/sync/sync-innerspace-constants.respec.mjs.map +1 -1
- package/dist/sync/sync-innerspace-deep-updates.respec.mjs +2 -2
- package/dist/sync/sync-innerspace-deep-updates.respec.mjs.map +1 -1
- package/dist/sync/sync-innerspace-dest-ahead-withid.respec.mjs +22 -8
- package/dist/sync/sync-innerspace-dest-ahead-withid.respec.mjs.map +1 -1
- package/dist/sync/sync-innerspace-dest-ahead.respec.mjs +2 -2
- package/dist/sync/sync-innerspace-dest-ahead.respec.mjs.map +1 -1
- package/dist/sync/sync-innerspace-multiple-timelines.respec.mjs +2 -2
- package/dist/sync/sync-innerspace-multiple-timelines.respec.mjs.map +1 -1
- package/dist/sync/sync-innerspace-partial-update.respec.mjs +2 -2
- package/dist/sync/sync-innerspace-partial-update.respec.mjs.map +1 -1
- package/dist/sync/sync-innerspace.respec.mjs +2 -2
- package/dist/sync/sync-innerspace.respec.mjs.map +1 -1
- package/dist/sync/sync-peer/sync-peer-http-receiver/sync-http-node-adapter.d.mts +57 -0
- package/dist/sync/sync-peer/sync-peer-http-receiver/sync-http-node-adapter.d.mts.map +1 -0
- package/dist/sync/sync-peer/sync-peer-http-receiver/sync-http-node-adapter.mjs +310 -0
- package/dist/sync/sync-peer/sync-peer-http-receiver/sync-http-node-adapter.mjs.map +1 -0
- package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-types.d.mts +27 -0
- package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-types.d.mts.map +1 -0
- package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-types.mjs +2 -0
- package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-types.mjs.map +1 -0
- package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-v1.d.mts +29 -0
- package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-v1.d.mts.map +1 -0
- package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-v1.mjs +122 -0
- package/dist/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-v1.mjs.map +1 -0
- package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-types.d.mts +27 -0
- package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-types.d.mts.map +1 -0
- package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-types.mjs +2 -0
- package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-types.mjs.map +1 -0
- package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-v1.d.mts +24 -0
- package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-v1.d.mts.map +1 -0
- package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-v1.mjs +111 -0
- package/dist/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-v1.mjs.map +1 -0
- package/dist/sync/sync-peer/sync-peer-http.respec.d.mts +8 -0
- package/dist/sync/sync-peer/sync-peer-http.respec.d.mts.map +1 -0
- package/dist/sync/sync-peer/sync-peer-http.respec.mjs +333 -0
- package/dist/sync/sync-peer/sync-peer-http.respec.mjs.map +1 -0
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.d.mts.map +1 -1
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mjs +13 -7
- package/dist/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mjs.map +1 -1
- package/dist/sync/sync-peer/sync-peer-types.d.mts +5 -5
- package/dist/sync/sync-peer/sync-peer-types.d.mts.map +1 -1
- package/dist/sync/sync-peer/sync-peer-v1.d.mts +6 -3
- package/dist/sync/sync-peer/sync-peer-v1.d.mts.map +1 -1
- package/dist/sync/sync-peer/sync-peer-v1.mjs +75 -26
- package/dist/sync/sync-peer/sync-peer-v1.mjs.map +1 -1
- package/dist/sync/sync-saga-context/sync-saga-context-helpers.d.mts +7 -3
- package/dist/sync/sync-saga-context/sync-saga-context-helpers.d.mts.map +1 -1
- package/dist/sync/sync-saga-context/sync-saga-context-helpers.mjs +32 -3
- package/dist/sync/sync-saga-context/sync-saga-context-helpers.mjs.map +1 -1
- package/dist/sync/sync-saga-context/sync-saga-context-types.d.mts +16 -0
- package/dist/sync/sync-saga-context/sync-saga-context-types.d.mts.map +1 -1
- package/dist/sync/sync-saga-coordinator.d.mts +18 -3
- package/dist/sync/sync-saga-coordinator.d.mts.map +1 -1
- package/dist/sync/sync-saga-coordinator.mjs +241 -56
- package/dist/sync/sync-saga-coordinator.mjs.map +1 -1
- package/dist/sync/sync-types.d.mts +1 -1
- package/dist/sync/sync-types.d.mts.map +1 -1
- package/ibgib-foundations.md +109 -89
- package/package.json +1 -1
- package/src/common/other/ibgib-helper.mts +39 -0
- package/src/keystone/kdf/kdf-helpers.mts +2 -2
- package/src/keystone/keystone-config-builder.mts +13 -2
- package/src/keystone/keystone-constants.mts +24 -2
- package/src/keystone/keystone-helpers.mts +5 -10
- package/src/keystone/keystone-service-v1.mts +5 -0
- package/src/keystone/keystone-service-v1.respec.mts +25 -25
- package/src/keystone/keystone-types.mts +27 -7
- package/src/sync/sync-conflict-adv-multitimelines.respec.mts +2 -2
- package/src/sync/sync-conflict-basic-divergence.respec.mts +2 -2
- package/src/sync/sync-conflict-basic-multitimelines.respec.mts +2 -2
- package/src/sync/sync-conflict-text-merge.respec.mts +2 -2
- package/src/sync/sync-constants.mts +51 -1
- package/src/sync/sync-innerspace-constants.respec.mts +2 -2
- package/src/sync/sync-innerspace-deep-updates.respec.mts +2 -2
- package/src/sync/sync-innerspace-dest-ahead-withid.respec.mts +26 -9
- package/src/sync/sync-innerspace-dest-ahead.respec.mts +2 -2
- package/src/sync/sync-innerspace-multiple-timelines.respec.mts +2 -2
- package/src/sync/sync-innerspace-partial-update.respec.mts +2 -2
- package/src/sync/sync-innerspace.respec.mts +2 -2
- package/src/sync/sync-peer/sync-peer-http-receiver/sync-http-node-adapter.mts +319 -0
- package/src/sync/sync-peer/sync-peer-http-receiver/sync-http-node-adapter.mts.metadata.md +72 -0
- package/src/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-types.mts +30 -0
- package/src/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-v1.mts +146 -0
- package/src/sync/sync-peer/sync-peer-http-receiver/sync-peer-http-receiver-v1.mts.metadata.md +71 -0
- package/src/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-types.mts +32 -0
- package/src/sync/sync-peer/sync-peer-http-sender/sync-peer-http-sender-v1.mts +129 -0
- package/src/sync/sync-peer/sync-peer-http.respec.mts +364 -0
- package/src/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-types.mts +8 -8
- package/src/sync/sync-peer/sync-peer-innerspace/sync-peer-innerspace-v1.mts +15 -7
- package/src/sync/sync-peer/sync-peer-types.mts +11 -11
- package/src/sync/sync-peer/sync-peer-v1.mts +66 -30
- package/src/sync/sync-saga-context/sync-saga-context-helpers.mts +52 -4
- package/src/sync/sync-saga-context/sync-saga-context-types.mts +17 -0
- package/src/sync/sync-saga-coordinator.mts +296 -63
- package/src/sync/sync-types.mts +1 -1
- package/tmp-certs/server.pfx +0 -0
|
@@ -203,7 +203,7 @@ await respecfully(sir, 'Suite A: Strategy Vectors (HashRevealV1)', async () => {
|
|
|
203
203
|
|
|
204
204
|
await respecfully(sir, 'Derivation Logic', async () => {
|
|
205
205
|
|
|
206
|
-
await
|
|
206
|
+
await ifWe(sir, 'derivePoolSecret with same inputs returns same output', async () => {
|
|
207
207
|
const strategy = KeystoneStrategyFactory.create({ config });
|
|
208
208
|
|
|
209
209
|
const secretA = await strategy.derivePoolSecret({ masterSecret });
|
|
@@ -213,7 +213,7 @@ await respecfully(sir, 'Suite A: Strategy Vectors (HashRevealV1)', async () => {
|
|
|
213
213
|
iReckon(sir, secretA).asTo('secret length').isGonnaBeTruthy();
|
|
214
214
|
});
|
|
215
215
|
|
|
216
|
-
await
|
|
216
|
+
await ifWe(sir, 'derivePoolSecret with different master secret returns different output', async () => {
|
|
217
217
|
const strategy = KeystoneStrategyFactory.create({ config });
|
|
218
218
|
|
|
219
219
|
const secretA = await strategy.derivePoolSecret({ masterSecret });
|
|
@@ -222,7 +222,7 @@ await respecfully(sir, 'Suite A: Strategy Vectors (HashRevealV1)', async () => {
|
|
|
222
222
|
iReckon(sir, secretA).asTo('secrets differ').not.willEqual(secretB);
|
|
223
223
|
});
|
|
224
224
|
|
|
225
|
-
await
|
|
225
|
+
await ifWe(sir, 'derivePoolSecret with different salt returns different output', async () => {
|
|
226
226
|
// Modify salt in a copy of config
|
|
227
227
|
const configB = { ...config, salt: "OtherPool" };
|
|
228
228
|
const strategyA = KeystoneStrategyFactory.create({ config });
|
|
@@ -237,7 +237,7 @@ await respecfully(sir, 'Suite A: Strategy Vectors (HashRevealV1)', async () => {
|
|
|
237
237
|
|
|
238
238
|
await respecfully(sir, 'Challenge/Solution Logic', async () => {
|
|
239
239
|
|
|
240
|
-
await
|
|
240
|
+
await ifWe(sir, 'generateSolution -> generateChallenge -> validateSolution loop works', async () => {
|
|
241
241
|
const strategy = KeystoneStrategyFactory.create({ config });
|
|
242
242
|
const poolSecret = await strategy.derivePoolSecret({ masterSecret });
|
|
243
243
|
const challengeId = "a3ff7843552870fc28bef2b"; // arbitrary random challengeId
|
|
@@ -256,7 +256,7 @@ await respecfully(sir, 'Suite A: Strategy Vectors (HashRevealV1)', async () => {
|
|
|
256
256
|
iReckon(sir, isValid).asTo('valid pair should pass').isGonnaBeTrue();
|
|
257
257
|
});
|
|
258
258
|
|
|
259
|
-
await
|
|
259
|
+
await ifWe(sir, 'validateSolution fails for mismatched values', async () => {
|
|
260
260
|
const strategy = KeystoneStrategyFactory.create({ config });
|
|
261
261
|
const poolSecret = await strategy.derivePoolSecret({ masterSecret });
|
|
262
262
|
const challengeId = "8c994f3ed598f150e25513"; // arbitrary random challengeId
|
|
@@ -272,7 +272,7 @@ await respecfully(sir, 'Suite A: Strategy Vectors (HashRevealV1)', async () => {
|
|
|
272
272
|
iReckon(sir, isValid).asTo('tampered solution should fail').isGonnaBeFalse();
|
|
273
273
|
});
|
|
274
274
|
|
|
275
|
-
await
|
|
275
|
+
await ifWe(sir, 'validateSolution fails for mismatched challenge hashes', async () => {
|
|
276
276
|
const strategy = KeystoneStrategyFactory.create({ config });
|
|
277
277
|
const poolSecret = await strategy.derivePoolSecret({ masterSecret });
|
|
278
278
|
|
|
@@ -313,7 +313,7 @@ await respecfully(sir, 'Suite B: Service Lifecycle', async () => {
|
|
|
313
313
|
});
|
|
314
314
|
|
|
315
315
|
await respecfully(sir, 'Genesis', async () => {
|
|
316
|
-
await
|
|
316
|
+
await ifWe(sir, 'creates a valid genesis frame and persists it', async () => {
|
|
317
317
|
const config = createStandardPoolConfig({
|
|
318
318
|
id: POOL_ID_DEFAULT,
|
|
319
319
|
salt: POOL_ID_DEFAULT,
|
|
@@ -344,7 +344,7 @@ await respecfully(sir, 'Suite B: Service Lifecycle', async () => {
|
|
|
344
344
|
});
|
|
345
345
|
|
|
346
346
|
await respecfully(sir, 'Signing (Evolution)', async () => {
|
|
347
|
-
await
|
|
347
|
+
await ifWe(sir, 'evolves the keystone with a valid proof', async () => {
|
|
348
348
|
const claim: Partial<KeystoneClaim> = {
|
|
349
349
|
target: "comment 123^gib",
|
|
350
350
|
verb: "post"
|
|
@@ -374,7 +374,7 @@ await respecfully(sir, 'Suite B: Service Lifecycle', async () => {
|
|
|
374
374
|
});
|
|
375
375
|
|
|
376
376
|
await respecfully(sir, 'Validation', async () => {
|
|
377
|
-
await
|
|
377
|
+
await ifWe(sir, 'validates the genesis->signed transition', async () => {
|
|
378
378
|
const errors = await service.validate({
|
|
379
379
|
prevIbGib: genesisKeystone,
|
|
380
380
|
currentIbGib: signedKeystone,
|
|
@@ -422,7 +422,7 @@ await respecfully(sir, 'Suite C: Security Vectors', async () => {
|
|
|
422
422
|
});
|
|
423
423
|
|
|
424
424
|
await respecfully(sir, 'Wrong Secret (Forgery)', async () => {
|
|
425
|
-
await
|
|
425
|
+
await ifWe(sir, 'prevents creation of forged frames', async () => {
|
|
426
426
|
const claim: Partial<KeystoneClaim> = { target: "comment 123^gib", verb: "post" };
|
|
427
427
|
|
|
428
428
|
let errorCaught = false;
|
|
@@ -451,7 +451,7 @@ await respecfully(sir, 'Suite C: Security Vectors', async () => {
|
|
|
451
451
|
});
|
|
452
452
|
|
|
453
453
|
await respecfully(sir, 'Policy Violation (Restricted Verbs)', async () => {
|
|
454
|
-
await
|
|
454
|
+
await ifWe(sir, 'throws error if signing forbidden verb with restricted pool', async () => {
|
|
455
455
|
// Create a specific restricted pool config manually
|
|
456
456
|
const restrictedPoolId = "read_only_pool";
|
|
457
457
|
const restrictedConfig = createStandardPoolConfig({
|
|
@@ -529,7 +529,7 @@ await respecfully(sir, 'Suite D: Revocation', async () => {
|
|
|
529
529
|
await respecfully(sir, 'Revoke Lifecycle', async () => {
|
|
530
530
|
let revokedKeystone: KeystoneIbGib_V1;
|
|
531
531
|
|
|
532
|
-
await
|
|
532
|
+
await ifWe(sir, 'successfully creates a revocation frame', async () => {
|
|
533
533
|
revokedKeystone = await service.revoke({
|
|
534
534
|
latestKeystone: genesisKeystone,
|
|
535
535
|
masterSecret,
|
|
@@ -547,7 +547,7 @@ await respecfully(sir, 'Suite D: Revocation', async () => {
|
|
|
547
547
|
iReckon(sir, data.revocationInfo!.proof.claim.verb).willEqual(KEYSTONE_VERB_REVOKE);
|
|
548
548
|
});
|
|
549
549
|
|
|
550
|
-
await
|
|
550
|
+
await ifWe(sir, 'validates the revocation frame', async () => {
|
|
551
551
|
const errors = await service.validate({
|
|
552
552
|
prevIbGib: genesisKeystone,
|
|
553
553
|
currentIbGib: revokedKeystone!,
|
|
@@ -558,7 +558,7 @@ await respecfully(sir, 'Suite D: Revocation', async () => {
|
|
|
558
558
|
iReckon(sir, errors.length).asTo('no validation errors').willEqual(0);
|
|
559
559
|
});
|
|
560
560
|
|
|
561
|
-
await
|
|
561
|
+
await ifWe(sir, 'consumed the revocation pool (Scorched Earth)', async () => {
|
|
562
562
|
const data = revokedKeystone!.data!;
|
|
563
563
|
const revokePool = data.challengePools.find(p => p.id === POOL_ID_REVOKE);
|
|
564
564
|
|
|
@@ -635,7 +635,7 @@ await respecfully(sir, 'Suite E: Structural Evolution (addPools)', async () => {
|
|
|
635
635
|
});
|
|
636
636
|
|
|
637
637
|
await respecfully(sir, 'Happy Path', async () => {
|
|
638
|
-
await
|
|
638
|
+
await ifWe(sir, 'authorizes and adds a foreign pool', async () => {
|
|
639
639
|
const bobPool = await createForeignPool("pool_bob", ["post"]);
|
|
640
640
|
|
|
641
641
|
const updatedKeystone = await service.addPools({
|
|
@@ -674,7 +674,7 @@ await respecfully(sir, 'Suite E: Structural Evolution (addPools)', async () => {
|
|
|
674
674
|
});
|
|
675
675
|
|
|
676
676
|
await respecfully(sir, 'Permissions & Logic', async () => {
|
|
677
|
-
await
|
|
677
|
+
await ifWe(sir, 'fails if no pool allows "manage" verb', async () => {
|
|
678
678
|
// 1. Create a restricted keystone
|
|
679
679
|
let id = "read_only";
|
|
680
680
|
const restrictedConfig = createStandardPoolConfig({ id, salt: id });
|
|
@@ -707,7 +707,7 @@ await respecfully(sir, 'Suite E: Structural Evolution (addPools)', async () => {
|
|
|
707
707
|
iReckon(sir, errorCaught).asTo('permission denied').isGonnaBeTrue();
|
|
708
708
|
});
|
|
709
709
|
|
|
710
|
-
await
|
|
710
|
+
await ifWe(sir, 'fails on ID collision', async () => {
|
|
711
711
|
// Try to add "pool_bob" again (it was added in Happy Path)
|
|
712
712
|
const duplicatePool = await createForeignPool("pool_bob");
|
|
713
713
|
|
|
@@ -796,7 +796,7 @@ await respecfully(sir, 'Suite E: Structural Evolution (addPools)', async () => {
|
|
|
796
796
|
});
|
|
797
797
|
|
|
798
798
|
await respecfully(sir, 'Happy Path', async () => {
|
|
799
|
-
await
|
|
799
|
+
await ifWe(sir, 'authorizes and adds a foreign pool', async () => {
|
|
800
800
|
const bobPool = await createForeignPool("pool_bob", ["post"]);
|
|
801
801
|
|
|
802
802
|
const updatedKeystone = await service.addPools({
|
|
@@ -835,7 +835,7 @@ await respecfully(sir, 'Suite E: Structural Evolution (addPools)', async () => {
|
|
|
835
835
|
});
|
|
836
836
|
|
|
837
837
|
await respecfully(sir, 'Permissions & Logic', async () => {
|
|
838
|
-
await
|
|
838
|
+
await ifWe(sir, 'fails if no pool allows "manage" verb', async () => {
|
|
839
839
|
// 1. Create a restricted keystone (read-only)
|
|
840
840
|
let id = "read_only";
|
|
841
841
|
const restrictedConfig = createStandardPoolConfig({ id, salt: id });
|
|
@@ -868,7 +868,7 @@ await respecfully(sir, 'Suite E: Structural Evolution (addPools)', async () => {
|
|
|
868
868
|
iReckon(sir, errorCaught).asTo('permission denied').isGonnaBeTrue();
|
|
869
869
|
});
|
|
870
870
|
|
|
871
|
-
await
|
|
871
|
+
await ifWe(sir, 'fails on ID collision', async () => {
|
|
872
872
|
// Try to add "pool_bob" again (it was added in Happy Path)
|
|
873
873
|
const duplicatePool = await createForeignPool("pool_bob");
|
|
874
874
|
|
|
@@ -930,7 +930,7 @@ await respecfully(sir, 'Suite F: Deep Inspection', async () => {
|
|
|
930
930
|
|
|
931
931
|
await respecfully(sir, 'Proof Granularity & Math', async () => {
|
|
932
932
|
|
|
933
|
-
await
|
|
933
|
+
await ifWe(sir, 'generates exactly the expected number of solutions', async () => {
|
|
934
934
|
signedKeystone = await service.sign({
|
|
935
935
|
latestKeystone: genesisKeystone,
|
|
936
936
|
masterSecret: aliceSecret,
|
|
@@ -947,7 +947,7 @@ await respecfully(sir, 'Suite F: Deep Inspection', async () => {
|
|
|
947
947
|
iReckon(sir, solutions.length).asTo('solution count').willEqual(4);
|
|
948
948
|
});
|
|
949
949
|
|
|
950
|
-
await
|
|
950
|
+
await ifWe(sir, 'verifies the math manually (White-box Crypto Check)', async () => {
|
|
951
951
|
const proof = signedKeystone.data!.proofs[0];
|
|
952
952
|
const poolSnapshot = genesisKeystone.data!.challengePools.find(p => p.id === salt)!;
|
|
953
953
|
|
|
@@ -976,7 +976,7 @@ await respecfully(sir, 'Suite F: Deep Inspection', async () => {
|
|
|
976
976
|
}
|
|
977
977
|
});
|
|
978
978
|
|
|
979
|
-
await
|
|
979
|
+
await ifWe(sir, 'verifies FIFO logic (Deterministic Selection)', async () => {
|
|
980
980
|
const proof = signedKeystone.data!.proofs[0];
|
|
981
981
|
const poolSnapshot = genesisKeystone.data!.challengePools.find(p => p.id === salt)!;
|
|
982
982
|
|
|
@@ -998,7 +998,7 @@ await respecfully(sir, 'Suite F: Deep Inspection', async () => {
|
|
|
998
998
|
|
|
999
999
|
await respecfully(sir, 'DTO & Serialization', async () => {
|
|
1000
1000
|
|
|
1001
|
-
await
|
|
1001
|
+
await ifWe(sir, 'survives a clone/JSON-cycle without corruption', async () => {
|
|
1002
1002
|
// 1. Create a DTO (simulate network transmission/storage)
|
|
1003
1003
|
// 'clone' does a JSON stringify/parse under the hood (usually) or structured clone.
|
|
1004
1004
|
const dto = clone(signedKeystone);
|
|
@@ -1018,7 +1018,7 @@ await respecfully(sir, 'Suite F: Deep Inspection', async () => {
|
|
|
1018
1018
|
iReckon(sir, errors.length).asTo('DTO validation errors').willEqual(0);
|
|
1019
1019
|
});
|
|
1020
1020
|
|
|
1021
|
-
await
|
|
1021
|
+
await ifWe(sir, 'ensures data contains no functions or circular refs', async () => {
|
|
1022
1022
|
// A crude but effective test: ensure JSON.stringify doesn't throw
|
|
1023
1023
|
// and the result is equal to the object (if we parsed it back).
|
|
1024
1024
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { HashAlgorithm } from "@ibgib/helper-gib/dist/helpers/utils-helper.mjs";
|
|
2
|
+
import { IbGibAddr } from "@ibgib/ts-gib/dist/types.mjs";
|
|
1
3
|
import { IbGib_V1, IbGibData_V1, IbGibRel8ns_V1 } from "@ibgib/ts-gib/dist/V1/types.mjs";
|
|
2
4
|
|
|
3
5
|
import { KEYSTONE_ATOM } from "./keystone-constants.mjs";
|
|
6
|
+
import type { KeystoneVerb } from "./keystone-constants.mjs";
|
|
4
7
|
|
|
5
8
|
// #region KeystoneChallengeType
|
|
6
9
|
export const KEYSTONE_CHALLENGE_TYPE_HASH_REVEAL_V1 = 'hash-reveal-v1';
|
|
@@ -140,8 +143,8 @@ export interface KeystonePoolConfigBase {
|
|
|
140
143
|
}
|
|
141
144
|
|
|
142
145
|
export interface KeystonePoolConfig_HashV1 extends KeystonePoolConfigBase {
|
|
143
|
-
type:
|
|
144
|
-
algo:
|
|
146
|
+
type: typeof KeystoneChallengeType.hash_reveal_v1;
|
|
147
|
+
algo: HashAlgorithm;
|
|
145
148
|
rounds: number;
|
|
146
149
|
}
|
|
147
150
|
|
|
@@ -157,7 +160,7 @@ export interface KeystoneChallengeBase {
|
|
|
157
160
|
|
|
158
161
|
export interface KeystoneChallenge_HashV1 extends KeystoneChallengeBase {
|
|
159
162
|
id: string;
|
|
160
|
-
type:
|
|
163
|
+
type: typeof KeystoneChallengeType.hash_reveal_v1;
|
|
161
164
|
/**
|
|
162
165
|
* The hash that must be matched by the solution.
|
|
163
166
|
*/
|
|
@@ -258,12 +261,29 @@ export interface KeystoneChallengePool {
|
|
|
258
261
|
}
|
|
259
262
|
|
|
260
263
|
/**
|
|
261
|
-
*
|
|
264
|
+
* Describes the specific privilege that the evolution of the keystone
|
|
265
|
+
* authorizes.
|
|
262
266
|
*/
|
|
263
267
|
export interface KeystoneClaim {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
268
|
+
/**
|
|
269
|
+
* what action/ability does the claim make?
|
|
270
|
+
*
|
|
271
|
+
* @see {@link KeystoneVerb} and all of its members for just a list of some
|
|
272
|
+
* common verbs. But really, this can be any string.
|
|
273
|
+
*/
|
|
274
|
+
verb: string;
|
|
275
|
+
/**
|
|
276
|
+
* What specific ibgib does this claim relate to?
|
|
277
|
+
*
|
|
278
|
+
* For example, if we are signing a keystone to witness some specific ibgib
|
|
279
|
+
* itself, similar to the most conventional use of digital signatures, then
|
|
280
|
+
* this will be the address of that ibgib.
|
|
281
|
+
*/
|
|
282
|
+
target: IbGibAddr;
|
|
283
|
+
/**
|
|
284
|
+
* What limitations are narrowed down to beyond just target + verb?
|
|
285
|
+
*/
|
|
286
|
+
scope?: string;
|
|
267
287
|
}
|
|
268
288
|
|
|
269
289
|
/**
|
|
@@ -85,8 +85,8 @@ await respecfully(sir, `Multi-round/timeline permutations`, async () => {
|
|
|
85
85
|
async function newTestPeer(): Promise<SyncPeerInnerspace_V1> {
|
|
86
86
|
const peer = new SyncPeerInnerspace_V1(clone(SYNC_PEER_INNERSPACE_DEFAULT_DATA_V1));
|
|
87
87
|
await peer.initialized;
|
|
88
|
-
await peer.
|
|
89
|
-
|
|
88
|
+
await peer.initializeOpts({
|
|
89
|
+
localSpace: sourceSpace,
|
|
90
90
|
receiverSpace: destSpace,
|
|
91
91
|
receiverCoordinator: receiverCoordinator,
|
|
92
92
|
receiverMetaspace: metaspace,
|
|
@@ -221,8 +221,8 @@ await respecfully(sir, `Two different fields`, async () => {
|
|
|
221
221
|
|
|
222
222
|
const peer = new SyncPeerInnerspace_V1(clone(SYNC_PEER_INNERSPACE_DEFAULT_DATA_V1));
|
|
223
223
|
await peer.initialized;
|
|
224
|
-
await peer.
|
|
225
|
-
|
|
224
|
+
await peer.initializeOpts({
|
|
225
|
+
localSpace: sourceSpace, // "Client"
|
|
226
226
|
receiverSpace: destSpace, // "Server"
|
|
227
227
|
receiverCoordinator,
|
|
228
228
|
receiverMetaspace: metaspace,
|
|
@@ -207,8 +207,8 @@ await respecfully(sir, `Two different fields and rel8d`, async () => {
|
|
|
207
207
|
|
|
208
208
|
const peer = new SyncPeerInnerspace_V1(clone(SYNC_PEER_INNERSPACE_DEFAULT_DATA_V1));
|
|
209
209
|
await peer.initialized;
|
|
210
|
-
await peer.
|
|
211
|
-
|
|
210
|
+
await peer.initializeOpts({
|
|
211
|
+
localSpace: sourceSpace, // "Client"
|
|
212
212
|
receiverSpace: destSpace, // "Server"
|
|
213
213
|
receiverCoordinator,
|
|
214
214
|
receiverMetaspace: metaspace,
|
|
@@ -87,8 +87,8 @@ await respecfully(sir, `Text merge (LCS) conflict resolution`, async () => {
|
|
|
87
87
|
async function newTestPeer(): Promise<SyncPeerInnerspace_V1> {
|
|
88
88
|
const peer = new SyncPeerInnerspace_V1(clone(SYNC_PEER_INNERSPACE_DEFAULT_DATA_V1));
|
|
89
89
|
await peer.initialized;
|
|
90
|
-
await peer.
|
|
91
|
-
|
|
90
|
+
await peer.initializeOpts({
|
|
91
|
+
localSpace: sourceSpace,
|
|
92
92
|
receiverSpace: destSpace,
|
|
93
93
|
receiverCoordinator: receiverCoordinator,
|
|
94
94
|
receiverMetaspace: metaspace,
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { HashAlgorithm } from "@ibgib/helper-gib/dist/helpers/utils-helper.mjs";
|
|
1
2
|
import { ROOT_ADDR } from "@ibgib/ts-gib/dist/V1/constants.mjs";
|
|
3
|
+
import { KeystoneReplenishStrategy } from "../keystone/keystone-types.mjs";
|
|
4
|
+
import { KEYSTONE_VERB_MANAGE, KEYSTONE_VERB_SIGN, POOL_ID_DEFAULT, POOL_ID_DELEGATE, POOL_ID_TRANSITION } from "../keystone/keystone-constants.mjs";
|
|
2
5
|
|
|
3
6
|
export const SYNC_ATOM = "sync";
|
|
4
7
|
|
|
@@ -78,6 +81,18 @@ export function isValidSyncConflictStrategy(strategy: string): strategy is SyncC
|
|
|
78
81
|
}
|
|
79
82
|
// #endregion SyncConflictStrategy
|
|
80
83
|
|
|
84
|
+
/**
|
|
85
|
+
* to be used by the sender
|
|
86
|
+
*/
|
|
87
|
+
export const SESSION_IDENTITY_KEYSTONE_PRIMARY_POOL_ID = POOL_ID_DEFAULT;
|
|
88
|
+
/**
|
|
89
|
+
* single use pool
|
|
90
|
+
*/
|
|
91
|
+
export const SESSION_IDENTITY_KEYSTONE_TRANSITION_POOL_ID = POOL_ID_TRANSITION;
|
|
92
|
+
/**
|
|
93
|
+
* to be used by the receiver, created via the single-use transition pool.
|
|
94
|
+
*/
|
|
95
|
+
export const SESSION_IDENTITY_KEYSTONE_DELEGATE_POOL_ID = POOL_ID_DELEGATE;
|
|
81
96
|
/**
|
|
82
97
|
* When synchronizing, the plan for identity integration is to create a session
|
|
83
98
|
* keystone. This keystone will have a primary pool, driven by the sender's
|
|
@@ -86,4 +101,39 @@ export function isValidSyncConflictStrategy(strategy: string): strategy is SyncC
|
|
|
86
101
|
* use this to then change the keystone to use a secret chosen by the
|
|
87
102
|
* receiver's end.
|
|
88
103
|
*/
|
|
89
|
-
export const
|
|
104
|
+
export const SESSION_IDENTITY_KEYSTONE_SECRET_TRANSITIONPOOL = ROOT_ADDR;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* has to be big enough to avoid our currently poor (atow 02/24/2026)
|
|
108
|
+
* implementation of the binding target.
|
|
109
|
+
*/
|
|
110
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_SIZE = 100;
|
|
111
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_ALGO = HashAlgorithm.sha_256;
|
|
112
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_ROUNDS = 3;
|
|
113
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_RANDOM = 2;
|
|
114
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_SEQUENTIAL = 2;
|
|
115
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_TARGET_BINDING = 4;
|
|
116
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_REPLENISH_STRATEGY = KeystoneReplenishStrategy.topUp;
|
|
117
|
+
/**
|
|
118
|
+
* verbs associated with primary/sender participant.
|
|
119
|
+
*
|
|
120
|
+
* todo: would be slightly cleaner to have the sender/primary genesis with two pools, one for signing and one being one-time manage use (to add the transition pool) just like the transition pool, but this is a finesse and not for V1. Still it is neat that this possibility/mechanism exists.
|
|
121
|
+
*/
|
|
122
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_VERBS_PRIMARY = [KEYSTONE_VERB_MANAGE];
|
|
123
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_VERBS_DELEGATE = [KEYSTONE_VERB_SIGN];
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* transition pool is purposefully weak with a known password.
|
|
127
|
+
*/
|
|
128
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_SIZE_TRANSITIONPOOL = 1;
|
|
129
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_ALGO_TRANSITIONPOOL = HashAlgorithm.sha_256;
|
|
130
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_ROUNDS_TRANSITIONPOOL = 1;
|
|
131
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_RANDOM_TRANSITIONPOOL = 0;
|
|
132
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_SEQUENTIAL_TRANSITIONPOOL = 1;
|
|
133
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_TARGET_BINDING_TRANSITIONPOOL = 0;
|
|
134
|
+
/**
|
|
135
|
+
* This pool is to be used only once, by the receiver, in order for the receiver
|
|
136
|
+
* to create their own pool.
|
|
137
|
+
*/
|
|
138
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_REPLENISH_STRATEGY_TRANSITIONPOOL = KeystoneReplenishStrategy.deleteAll;
|
|
139
|
+
export const SESSION_IDENTITY_KEYSTONE_CONFIG_VERBS_TRANSITIONPOOL = [KEYSTONE_VERB_MANAGE];
|
|
@@ -72,8 +72,8 @@ await respecfully(sir, `Sync Constants (No TJP)`, async () => {
|
|
|
72
72
|
|
|
73
73
|
const peer = new SyncPeerInnerspace_V1(clone(SYNC_PEER_INNERSPACE_DEFAULT_DATA_V1));
|
|
74
74
|
await peer.initialized;
|
|
75
|
-
await peer.
|
|
76
|
-
|
|
75
|
+
await peer.initializeOpts({
|
|
76
|
+
localSpace: sourceSpace, // "Client"
|
|
77
77
|
receiverSpace: destSpace, // "Server"
|
|
78
78
|
receiverCoordinator,
|
|
79
79
|
receiverMetaspace: metaspace,
|
|
@@ -103,8 +103,8 @@ await respecfully(sir, `Sync InnerSpaces (Deep Updates)`, async () => {
|
|
|
103
103
|
|
|
104
104
|
const peer = new SyncPeerInnerspace_V1(clone(SYNC_PEER_INNERSPACE_DEFAULT_DATA_V1));
|
|
105
105
|
await peer.initialized;
|
|
106
|
-
await peer.
|
|
107
|
-
|
|
106
|
+
await peer.initializeOpts({
|
|
107
|
+
localSpace: sourceSpace, // "Client"
|
|
108
108
|
receiverSpace: destSpace, // "Server"
|
|
109
109
|
receiverCoordinator,
|
|
110
110
|
receiverMetaspace: metaspace,
|
|
@@ -29,6 +29,8 @@ import { ErrorIbGib_V1 } from '../common/error/error-types.mjs';
|
|
|
29
29
|
import { SyncIbGib_V1 } from './sync-types.mjs';
|
|
30
30
|
import { getFullSyncSagaHistory } from './sync-helpers.mjs';
|
|
31
31
|
import { getIbGibsFromCache_fallbackToSpaces } from '../common/other/ibgib-helper.mjs';
|
|
32
|
+
import { SyncSagaContextIbGib_V1 } from './sync-saga-context/sync-saga-context-types.mjs';
|
|
33
|
+
import { isSyncSagaContextIbGib } from './sync-saga-context/sync-saga-context-helpers.mjs';
|
|
32
34
|
|
|
33
35
|
const logalot = false;
|
|
34
36
|
const lc = `[sync-innerspace-dest-ahead.respec]`;
|
|
@@ -38,6 +40,9 @@ await respecfully(sir, `Sync InnerSpaces (Dest Ahead)`, async () => {
|
|
|
38
40
|
let metaspace: Metaspace_Innerspace;
|
|
39
41
|
let sourceSpace: InnerSpace_V1;
|
|
40
42
|
let destSpace: InnerSpace_V1;
|
|
43
|
+
let secretSender = 'secret for sender';
|
|
44
|
+
let secretReceiver = 'secret for receiver';
|
|
45
|
+
let secretAdversary = 'secret for adversary';
|
|
41
46
|
|
|
42
47
|
interface TestData {
|
|
43
48
|
type: string;
|
|
@@ -137,8 +142,8 @@ await respecfully(sir, `Sync InnerSpaces (Dest Ahead)`, async () => {
|
|
|
137
142
|
|
|
138
143
|
const peer = new SyncPeerInnerspace_V1(clone(SYNC_PEER_INNERSPACE_DEFAULT_DATA_V1));
|
|
139
144
|
await peer.initialized;
|
|
140
|
-
await peer.
|
|
141
|
-
|
|
145
|
+
await peer.initializeOpts({
|
|
146
|
+
localSpace: sourceSpace, // "Client"
|
|
142
147
|
receiverSpace: destSpace, // "Server"
|
|
143
148
|
receiverCoordinator,
|
|
144
149
|
receiverMetaspace: metaspace,
|
|
@@ -152,8 +157,10 @@ await respecfully(sir, `Sync InnerSpaces (Dest Ahead)`, async () => {
|
|
|
152
157
|
metaspace: metaspace,
|
|
153
158
|
domainIbGibs: [v1], // Source tries to push V1
|
|
154
159
|
useSessionIdentity: true,
|
|
160
|
+
identitySecret: secretSender,
|
|
155
161
|
});
|
|
156
162
|
|
|
163
|
+
const syncSagaContextIbGibs: SyncSagaContextIbGib_V1[] = [];
|
|
157
164
|
const sublc = `${lc}[updates$]`;
|
|
158
165
|
/**
|
|
159
166
|
* I have added this so you can see how to subscribe to an ibgib
|
|
@@ -163,6 +170,11 @@ await respecfully(sir, `Sync InnerSpaces (Dest Ahead)`, async () => {
|
|
|
163
170
|
next: async (ctxIbGib) => {
|
|
164
171
|
// console.log(`${sublc} next fired. ${JSON.stringify(ctxIbGib)}`);
|
|
165
172
|
console.log(`${sublc} next fired. (I: e68d8894bac8800f9f3430e8a38d6626)`);
|
|
173
|
+
// each context ibgib
|
|
174
|
+
if (!isSyncSagaContextIbGib(ctxIbGib)) {
|
|
175
|
+
throw new Error(`(UNEXPECTED) ctxIbGib isn't a SyncSagaContextIbGib_V1? (E: ee116e6b6208e615dbcd3e715643e826)`);
|
|
176
|
+
}
|
|
177
|
+
syncSagaContextIbGibs.push(ctxIbGib);
|
|
166
178
|
},
|
|
167
179
|
error: async (e: ErrorIbGib_V1) => {
|
|
168
180
|
if (e.data) {
|
|
@@ -178,13 +190,6 @@ await respecfully(sir, `Sync InnerSpaces (Dest Ahead)`, async () => {
|
|
|
178
190
|
}));
|
|
179
191
|
await done;
|
|
180
192
|
|
|
181
|
-
// TODO: Get saga IbGib to access session keystones
|
|
182
|
-
// Bill suggested either:
|
|
183
|
-
// 1. Subscribe to updates$ to inspect frames as sync progresses
|
|
184
|
-
// 2. Change done from Promise<void> to Promise<IbGibAddr>, return saga addr,
|
|
185
|
-
// then use getIbGibsFromCache_fallbackToSpaces and getFullSyncSagaHistory
|
|
186
|
-
// For now, leaving implementation for next step.
|
|
187
|
-
|
|
188
193
|
// 5. Verify Sync (v2 should be in both source and dest now)
|
|
189
194
|
console.log(`${lc} Verifying Sync...`);
|
|
190
195
|
|
|
@@ -234,6 +239,18 @@ await respecfully(sir, `Sync InnerSpaces (Dest Ahead)`, async () => {
|
|
|
234
239
|
// Once saga access is implemented (per Bill's guidance), retrieve keystone addr from:
|
|
235
240
|
// const keystoneAddrs = sagaIbGib.rel8ns?.sessionKeystones;
|
|
236
241
|
// Then verify keystone exists in space
|
|
242
|
+
debugger;
|
|
243
|
+
|
|
244
|
+
// #region leaving off here
|
|
245
|
+
|
|
246
|
+
// receiver is not putting the session keystone on the return
|
|
247
|
+
// context ibgib. need to ensure that peer's do the most recent
|
|
248
|
+
// session keystone manually, so session keystone should be
|
|
249
|
+
// transferred alongside context ibgib (which is signed but
|
|
250
|
+
// intrinsically points to the **previous** frame of the keystone)
|
|
251
|
+
|
|
252
|
+
// #endregion leaving off here
|
|
253
|
+
syncSagaContextIbGibs.forEach(x => console.log(pretty(x)));
|
|
237
254
|
|
|
238
255
|
// Placeholder - test passes because keystone creation works
|
|
239
256
|
iReckon(sir, true)
|
|
@@ -134,8 +134,8 @@ await respecfully(sir, `Sync InnerSpaces (Dest Ahead)`, async () => {
|
|
|
134
134
|
|
|
135
135
|
const peer = new SyncPeerInnerspace_V1(clone(SYNC_PEER_INNERSPACE_DEFAULT_DATA_V1));
|
|
136
136
|
await peer.initialized;
|
|
137
|
-
await peer.
|
|
138
|
-
|
|
137
|
+
await peer.initializeOpts({
|
|
138
|
+
localSpace: sourceSpace, // "Client"
|
|
139
139
|
receiverSpace: destSpace, // "Server"
|
|
140
140
|
receiverCoordinator,
|
|
141
141
|
receiverMetaspace: metaspace,
|
|
@@ -107,8 +107,8 @@ await respecfully(sir, `Sync InnerSpaces (Multiple Timelines)`, async () => {
|
|
|
107
107
|
|
|
108
108
|
const peer = new SyncPeerInnerspace_V1(clone(SYNC_PEER_INNERSPACE_DEFAULT_DATA_V1));
|
|
109
109
|
await peer.initialized;
|
|
110
|
-
await peer.
|
|
111
|
-
|
|
110
|
+
await peer.initializeOpts({
|
|
111
|
+
localSpace: sourceSpace, // "Client"
|
|
112
112
|
receiverSpace: destSpace, // "Server"
|
|
113
113
|
receiverCoordinator,
|
|
114
114
|
receiverMetaspace: metaspace,
|
|
@@ -115,8 +115,8 @@ await respecfully(sir, `Sync InnerSpaces (Partial Update)`, async () => {
|
|
|
115
115
|
|
|
116
116
|
const peer = new SyncPeerInnerspace_V1(clone(SYNC_PEER_INNERSPACE_DEFAULT_DATA_V1));
|
|
117
117
|
await peer.initialized;
|
|
118
|
-
await peer.
|
|
119
|
-
|
|
118
|
+
await peer.initializeOpts({
|
|
119
|
+
localSpace: sourceSpace, // "Client"
|
|
120
120
|
receiverSpace: destSpace, // "Server"
|
|
121
121
|
receiverCoordinator,
|
|
122
122
|
receiverMetaspace: metaspace,
|
|
@@ -107,8 +107,8 @@ await respecfully(sir, `Sync InnerSpaces`, async () => {
|
|
|
107
107
|
// Peer (The "Network")
|
|
108
108
|
const peer = new SyncPeerInnerspace_V1(clone(SYNC_PEER_INNERSPACE_DEFAULT_DATA_V1));
|
|
109
109
|
await peer.initialized;
|
|
110
|
-
await peer.
|
|
111
|
-
|
|
110
|
+
await peer.initializeOpts({
|
|
111
|
+
localSpace: sourceSpace, // "Client"
|
|
112
112
|
receiverSpace: destSpace, // "Server"
|
|
113
113
|
receiverCoordinator,
|
|
114
114
|
receiverMetaspace: metaspace,
|