@serfab/cadre-core 1.15.0 → 1.17.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/README.md +1 -1
- package/dist/bootstrap-peer-store-file.js +1 -1
- package/dist/bootstrap-peer-store.d.ts +1 -1
- package/dist/bootstrap-peer-store.js +4 -4
- package/dist/cadre-invite-protocol.d.ts +55 -138
- package/dist/cadre-invite-protocol.js +94 -449
- package/dist/cadre-invite-protocol.js.map +1 -1
- package/dist/cadre-join-request.d.ts +15 -2
- package/dist/cadre-join-request.js +22 -3
- package/dist/cadre-join-request.js.map +1 -1
- package/dist/cadre-node.d.ts +530 -247
- package/dist/cadre-node.js +1046 -525
- package/dist/cadre-node.js.map +1 -1
- package/dist/control-authorization.d.ts +36 -14
- package/dist/control-authorization.js +20 -3
- package/dist/control-authorization.js.map +1 -1
- package/dist/control-cohort.d.ts +22 -23
- package/dist/control-cohort.js +24 -24
- package/dist/control-cohort.js.map +1 -1
- package/dist/control-database.d.ts +416 -136
- package/dist/control-database.js +757 -378
- package/dist/control-database.js.map +1 -1
- package/dist/control-protocol-guard.d.ts +5 -4
- package/dist/control-protocol-guard.js +6 -3
- package/dist/control-protocol-guard.js.map +1 -1
- package/dist/control-schema-version.d.ts +80 -0
- package/dist/control-schema-version.js +203 -0
- package/dist/control-schema-version.js.map +1 -0
- package/dist/control-schema.d.ts +45 -5
- package/dist/control-schema.js +254 -70
- package/dist/control-schema.js.map +1 -1
- package/dist/control-write-retry.d.ts +5 -5
- package/dist/control-write-retry.js +10 -8
- package/dist/control-write-retry.js.map +1 -1
- package/dist/delegate-admission.d.ts +13 -0
- package/dist/delegate-admission.js +27 -0
- package/dist/delegate-admission.js.map +1 -1
- package/dist/ed25519-key.d.ts +10 -7
- package/dist/ed25519-key.js +23 -20
- package/dist/ed25519-key.js.map +1 -1
- package/dist/edge-node/config.d.ts +122 -0
- package/dist/edge-node/config.js +199 -0
- package/dist/edge-node/config.js.map +1 -0
- package/dist/edge-node/dissolve.d.ts +95 -0
- package/dist/edge-node/dissolve.js +184 -0
- package/dist/edge-node/dissolve.js.map +1 -0
- package/dist/edge-node/edge-join.d.ts +44 -0
- package/dist/edge-node/edge-join.js +227 -0
- package/dist/edge-node/edge-join.js.map +1 -0
- package/dist/edge-node/edge-node.d.ts +295 -0
- package/dist/edge-node/edge-node.js +704 -0
- package/dist/edge-node/edge-node.js.map +1 -0
- package/dist/edge-node/index.d.ts +18 -0
- package/dist/edge-node/index.js +18 -0
- package/dist/edge-node/index.js.map +1 -0
- package/dist/edge-node/join-credential.d.ts +11 -0
- package/dist/edge-node/join-credential.js +11 -0
- package/dist/edge-node/join-credential.js.map +1 -0
- package/dist/edge-node/lazy-raw-storage.d.ts +40 -0
- package/dist/edge-node/lazy-raw-storage.js +134 -0
- package/dist/edge-node/lazy-raw-storage.js.map +1 -0
- package/dist/edge-node/node-local.d.ts +60 -0
- package/dist/edge-node/node-local.js +58 -0
- package/dist/edge-node/node-local.js.map +1 -0
- package/dist/edge-node/options.d.ts +83 -0
- package/dist/edge-node/options.js +110 -0
- package/dist/edge-node/options.js.map +1 -0
- package/dist/edge-node/owner-grant.d.ts +41 -0
- package/dist/edge-node/owner-grant.js +38 -0
- package/dist/edge-node/owner-grant.js.map +1 -0
- package/dist/edge-node/platform.d.ts +140 -0
- package/dist/edge-node/platform.js +12 -0
- package/dist/edge-node/platform.js.map +1 -0
- package/dist/edge-node/strand-move.d.ts +115 -0
- package/dist/edge-node/strand-move.js +223 -0
- package/dist/edge-node/strand-move.js.map +1 -0
- package/dist/edge-node/strands.d.ts +28 -0
- package/dist/edge-node/strands.js +60 -0
- package/dist/edge-node/strands.js.map +1 -0
- package/dist/index.d.ts +16 -7
- package/dist/index.js +26 -7
- package/dist/index.js.map +1 -1
- package/dist/joined-strand-store.d.ts +3 -3
- package/dist/joined-strand-store.js +3 -3
- package/dist/joined-strand-store.js.map +1 -1
- package/dist/key-store.d.ts +9 -4
- package/dist/key-store.js +9 -4
- package/dist/key-store.js.map +1 -1
- package/dist/machine-removal.d.ts +19 -39
- package/dist/machine-removal.js +24 -98
- package/dist/machine-removal.js.map +1 -1
- package/dist/member-redemption.d.ts +250 -0
- package/dist/member-redemption.js +485 -0
- package/dist/member-redemption.js.map +1 -0
- package/dist/owner-anchor-sync.d.ts +4 -4
- package/dist/owner-anchor-sync.js +16 -15
- package/dist/owner-anchor-sync.js.map +1 -1
- package/dist/owner-grant-protocol.d.ts +247 -0
- package/dist/owner-grant-protocol.js +330 -0
- package/dist/owner-grant-protocol.js.map +1 -0
- package/dist/owner-key-export.d.ts +70 -0
- package/dist/owner-key-export.js +279 -0
- package/dist/owner-key-export.js.map +1 -0
- package/dist/owner-key-flows.d.ts +55 -0
- package/dist/owner-key-flows.js +60 -0
- package/dist/owner-key-flows.js.map +1 -0
- package/dist/owner-key-store.d.ts +31 -0
- package/dist/owner-key-store.js +81 -0
- package/dist/owner-key-store.js.map +1 -0
- package/dist/owner-keys.d.ts +78 -0
- package/dist/owner-keys.js +133 -0
- package/dist/owner-keys.js.map +1 -0
- package/dist/owner-signer.d.ts +54 -0
- package/dist/owner-signer.js +51 -0
- package/dist/owner-signer.js.map +1 -0
- package/dist/peer-authorization.d.ts +83 -18
- package/dist/peer-authorization.js +123 -53
- package/dist/peer-authorization.js.map +1 -1
- package/dist/provider/rent-node.js +1 -1
- package/dist/provider/rent-node.js.map +1 -1
- package/dist/seed-bootstrap.d.ts +131 -109
- package/dist/seed-bootstrap.js +260 -248
- package/dist/seed-bootstrap.js.map +1 -1
- package/dist/seed-trust-policy.js +4 -4
- package/dist/strand-addr-protocol.d.ts +4 -1
- package/dist/strand-addr-protocol.js +8 -2
- package/dist/strand-addr-protocol.js.map +1 -1
- package/dist/strand-cohort.d.ts +3 -0
- package/dist/strand-cohort.js.map +1 -1
- package/dist/strand-database.d.ts +1 -0
- package/dist/strand-database.js +3 -0
- package/dist/strand-database.js.map +1 -1
- package/dist/strand-first-sync-gate.d.ts +4 -3
- package/dist/strand-first-sync-gate.js +4 -3
- package/dist/strand-first-sync-gate.js.map +1 -1
- package/dist/strand-instance-manager.d.ts +1 -1
- package/dist/strand-membership-writer.d.ts +13 -2
- package/dist/strand-membership-writer.js +52 -16
- package/dist/strand-membership-writer.js.map +1 -1
- package/dist/strand-move.d.ts +6 -5
- package/dist/strand-move.js +31 -30
- package/dist/strand-move.js.map +1 -1
- package/dist/strand-peer-redial.js +2 -3
- package/dist/strand-peer-redial.js.map +1 -1
- package/dist/types.d.ts +286 -103
- package/dist/types.js.map +1 -1
- package/package.json +16 -7
- package/src/bootstrap-peer-store-file.ts +44 -44
- package/src/bootstrap-peer-store.ts +214 -214
- package/src/cadre-invite-protocol.ts +131 -531
- package/src/cadre-join-request.ts +188 -167
- package/src/cadre-node.ts +1166 -541
- package/src/control-authorization.ts +47 -14
- package/src/control-cohort.ts +127 -128
- package/src/control-database.ts +940 -456
- package/src/control-protocol-guard.ts +7 -4
- package/src/control-schema-version.ts +251 -0
- package/src/control-schema.ts +265 -70
- package/src/control-write-retry.ts +569 -567
- package/src/delegate-admission.ts +37 -0
- package/src/ed25519-key.ts +174 -171
- package/src/edge-node/config.ts +277 -0
- package/src/edge-node/dissolve.ts +251 -0
- package/src/edge-node/edge-join.ts +319 -0
- package/src/edge-node/edge-node.ts +1045 -0
- package/src/edge-node/index.ts +59 -0
- package/src/edge-node/join-credential.ts +16 -0
- package/src/edge-node/lazy-raw-storage.ts +178 -0
- package/src/edge-node/node-local.ts +84 -0
- package/src/edge-node/options.ts +179 -0
- package/src/edge-node/owner-grant.ts +63 -0
- package/src/edge-node/platform.ts +151 -0
- package/src/edge-node/strand-move.ts +270 -0
- package/src/edge-node/strands.ts +72 -0
- package/src/index.ts +102 -5
- package/src/joined-strand-store.ts +4 -4
- package/src/key-store.ts +10 -4
- package/src/machine-removal.ts +26 -111
- package/src/member-redemption.ts +642 -0
- package/src/owner-anchor-sync.ts +19 -18
- package/src/owner-grant-protocol.ts +532 -0
- package/src/owner-key-export.ts +348 -0
- package/src/owner-key-flows.ts +109 -0
- package/src/owner-key-store.ts +85 -0
- package/src/owner-keys.ts +178 -0
- package/src/owner-signer.ts +94 -0
- package/src/peer-authorization.ts +558 -488
- package/src/provider/rent-node.ts +1 -1
- package/src/seed-bootstrap.ts +301 -312
- package/src/seed-trust-policy.ts +4 -4
- package/src/strand-addr-protocol.ts +547 -538
- package/src/strand-cohort.ts +4 -0
- package/src/strand-database.ts +3 -0
- package/src/strand-first-sync-gate.ts +4 -3
- package/src/strand-instance-manager.ts +1 -1
- package/src/strand-membership-writer.ts +61 -16
- package/src/strand-move.ts +45 -36
- package/src/strand-peer-redial.ts +2 -3
- package/src/types.ts +304 -103
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strand helpers every edge app needs around a running node, from sereus-chat's bring-up.
|
|
3
|
+
*/
|
|
4
|
+
import { StrandAwaitingFirstSyncError } from '../strand-first-sync-gate.js';
|
|
5
|
+
/** Default patience for {@link attachStrandWhenWritable}: generous enough that running out means something is wrong. */
|
|
6
|
+
export const DEFAULT_STRAND_PATIENCE_MS = 240000;
|
|
7
|
+
/**
|
|
8
|
+
* `addStrand`, then keep waiting when the first sync outlasts its budget.
|
|
9
|
+
*
|
|
10
|
+
* `addStrand` rejects with `StrandAwaitingFirstSyncError` when the first sync has not finished,
|
|
11
|
+
* and leaves the strand launched and syncing: the timeout is a progress report, not an outcome.
|
|
12
|
+
* Measured on a link with a 1.8 s round trip, a first sync completed at about 150 s against a
|
|
13
|
+
* 120 s budget. So this waits for the strand to become writable, and rejects only when it has not
|
|
14
|
+
* within `patienceMs`.
|
|
15
|
+
*/
|
|
16
|
+
export async function attachStrandWhenWritable(node, config, options = {}) {
|
|
17
|
+
try {
|
|
18
|
+
return await node.addStrand(config);
|
|
19
|
+
}
|
|
20
|
+
catch (err) {
|
|
21
|
+
if (!(err instanceof StrandAwaitingFirstSyncError))
|
|
22
|
+
throw err;
|
|
23
|
+
const patienceMs = options.patienceMs ?? DEFAULT_STRAND_PATIENCE_MS;
|
|
24
|
+
console.info(`[cadre-core/edge-node] first sync of ${config.strandRow.Id} still arriving; ` +
|
|
25
|
+
`waiting up to ${patienceMs / 1000} s for it to become writable`);
|
|
26
|
+
return await node.whenStrandWritable(config.strandRow.Id, { timeoutMs: patienceMs });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Optimystic's cluster coordinator reports a write that could not gather enough approvals this
|
|
31
|
+
* way. It is transient right after a node restarts alone: its cohort has not reconnected yet.
|
|
32
|
+
*
|
|
33
|
+
* NOTE: matched on the message because Optimystic throws a plain `Error` here. If it gains a typed
|
|
34
|
+
* error, match on that instead — a reworded message would silently stop the retries.
|
|
35
|
+
*/
|
|
36
|
+
const SUPER_MAJORITY_FAILURE = /Failed to get super-majority/i;
|
|
37
|
+
/**
|
|
38
|
+
* Run a write, retrying only on the transient super-majority failure the first writes after a lone
|
|
39
|
+
* restart hit (v1.9 release notes): `attempts` tries, `delayMs` apart. Any other error, and the
|
|
40
|
+
* last attempt's, propagates.
|
|
41
|
+
*/
|
|
42
|
+
export async function retryAfterRestart(write, options = {}) {
|
|
43
|
+
const attempts = options.attempts ?? 5;
|
|
44
|
+
const delayMs = options.delayMs ?? 3000;
|
|
45
|
+
for (let attempt = 1;; attempt++) {
|
|
46
|
+
try {
|
|
47
|
+
return await write();
|
|
48
|
+
}
|
|
49
|
+
catch (err) {
|
|
50
|
+
if (!isTransientWriteFailure(err) || attempt >= attempts)
|
|
51
|
+
throw err;
|
|
52
|
+
console.info(`[cadre-core/edge-node] write attempt ${attempt} lacked a super-majority; retrying in ${delayMs} ms`);
|
|
53
|
+
await new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function isTransientWriteFailure(err) {
|
|
58
|
+
return SUPER_MAJORITY_FAILURE.test(err instanceof Error ? err.message : String(err));
|
|
59
|
+
}
|
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QACnC,IAAI,CAAC;YACJ,OAAO,MAAM,KAAK,EAAE,CAAC;QACtB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,IAAI,OAAO,IAAI,QAAQ;gBAAE,MAAM,GAAG,CAAC;YACpE,OAAO,CAAC,IAAI,CAAC,wCAAwC,OAAO,yCAAyC,OAAO,KAAK,CAAC,CAAC;YACnH,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;QAC9D,CAAC;IACF,CAAC;AACF,CAAC;AAED,SAAS,uBAAuB,CAAC,GAAY;IAC5C,OAAO,sBAAsB,CAAC,IAAI,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AACtF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
export * from './types.js';
|
|
2
2
|
export { canonicalJson } from './canonical-json.js';
|
|
3
|
-
export { CadreNode,
|
|
3
|
+
export { CadreNode, CADRE_INVITATION_DEFAULT_TTL_MS, OWNER_GRANT_DEFAULT_TTL_MS } from './cadre-node.js';
|
|
4
4
|
export { MachineRemovalRefusedError } from './machine-removal.js';
|
|
5
|
-
export {
|
|
5
|
+
export { OwnerKeyAddRefusedError, OwnerKeyRemovalRefusedError } from './owner-keys.js';
|
|
6
|
+
export { ControlDatabase, parseNullableStoredDatetimeMs, MissingHostStrandError, InvitationExhaustedError, CadreInviteIssuerUnknownError, OwnerGrantIssuerUnknownError, IssuedRowNotHereYetError, buildAuthorizationMessage, registerPartyIdFunction, formationVouchMessage, formationConsentMessage, cadreInviteAddMessage, cadreInviteRedeemMessage, cadreInviteConsentMessage, ownerGrantAddMessage, ownerGrantRedeemMessage, ownerGrantConsentMessage, projectSeedPeers, REAPABLE_TABLES, type ReapableTable, type ControlDatabaseConfig, type ControlTable, type RevocableTable, type FormationUsageResult, type FormationInviteRow, type MembershipChangeListener, type GuardedDeleteListener, type ControlWriteAbandonedListener, type RevokedRowRef, type ControlSign, type OwnerGrantRedemptionFields } from './control-database.js';
|
|
7
|
+
export { CONTROL_SCHEMA_VERSION, CONTROL_SCHEMA_BASELINE_VERSION } from './control-schema.js';
|
|
8
|
+
export { ControlStoreIncompatibleError } from './control-schema-version.js';
|
|
6
9
|
export { CONTROL_WRITE_ATTEMPTS, CONTROL_WRITE_RETRY_BUDGET_MS, SCHEMA_INIT_ATTEMPTS, SCHEMA_INIT_RETRY_POLICY, isRetriableControlWriteFailure, isRetriableSchemaInitFailure, retryControlWrite, type ControlWriteRetryOptions } from './control-write-retry.js';
|
|
7
10
|
export { CONTROL_READ_ATTEMPTS, CONTROL_READ_RETRY_DELAYS_MS, CONTROL_READ_RETRY_BUDGET_MS, isRetriableControlReadFailure, retryControlRead, type ControlReadRetryOptions } from './control-read-retry.js';
|
|
8
11
|
export type { ControlRetryAbandonment, ControlRetryAbandonReason, ControlRetryAbandonListener } from './control-retry.js';
|
|
9
|
-
export { controlAuthorizationFields, unboundAuthorizationFields, cadreInviteRowFields, type ControlDomain, type BoundControlDomain, type UnboundControlDomain, type ControlAction, type CadreInviteSignedFields } from './control-authorization.js';
|
|
10
|
-
export { ed25519KeyPairFromLibp2p, ed25519PublicKeyFromPrivate, ed25519PublicKeyB64FromPeerId, requireEd25519PublicKeyB64, type Ed25519KeyPair } from './ed25519-key.js';
|
|
11
|
-
export { InMemoryKeyStore, KeyStoreAccessError, DEFAULT_IDENTITY_KEY_ID, type KeyStore, type KeyId } from './key-store.js';
|
|
12
|
+
export { controlAuthorizationFields, unboundAuthorizationFields, cadreInviteRowFields, ownerGrantRowFields, type ControlDomain, type BoundControlDomain, type UnboundControlDomain, type ControlAction, type CadreInviteSignedFields, type OwnerGrantSignedFields } from './control-authorization.js';
|
|
13
|
+
export { ed25519KeyPairFromLibp2p, ed25519PublicKeyFromPrivate, ed25519PublicKeyB64FromPeerId, requireEd25519PublicKeyB64, requireEd25519PrivateKeyB64, type Ed25519KeyPair } from './ed25519-key.js';
|
|
14
|
+
export { InMemoryKeyStore, KeyStoreAccessError, DEFAULT_IDENTITY_KEY_ID, DEFAULT_OWNER_KEY_ID, type KeyStore, type KeyId } from './key-store.js';
|
|
12
15
|
export { encodeFileSafeComponent } from './file-safe-name.js';
|
|
13
16
|
export { loadOrCreateIdentityKey } from './identity-key.js';
|
|
17
|
+
export { softwareOwnerSigner, OwnerSigningDeclinedError, type OwnerSigner, type OwnerSign, type OwnerSigningRequest } from './owner-signer.js';
|
|
18
|
+
export { createOwnerKey, loadOwnerSigner, importOwnerKey, readOwnerPrivateKey, OwnerKeySlotOccupiedError } from './owner-key-store.js';
|
|
19
|
+
export { encodeOwnerKeyExport, decodeOwnerKeyExport, unlockOwnerKeyExport, OwnerKeyExportError, OWNER_KEY_EXPORT_PREFIX, LOCKED_OWNER_KEY_EXPORT_PREFIX, OWNER_KEY_MAX_LABEL, type OwnerKeyExportErrorCode, type OwnerKeyExportContents, type OwnerKeyExportInput, type DecodedOwnerKeyExport } from './owner-key-export.js';
|
|
20
|
+
export { exportOwnerKey, importOwnerKeyInto, type ExportedOwnerKey, type ImportedOwnerKey, type OwnerKeyExportOptions } from './owner-key-flows.js';
|
|
14
21
|
export { MemoryTrustedOwnerStore, PersistentTrustedOwnerStore, type TrustedOwnerStore, type TrustSource } from './trusted-owner-store.js';
|
|
15
22
|
export type { DurableSlot } from './node-local-snapshot.js';
|
|
16
23
|
export { MemoryBootstrapPeerStore, PersistentBootstrapPeerStore, type BootstrapPeerStore, type BootstrapPeerEntry } from './bootstrap-peer-store.js';
|
|
@@ -40,7 +47,7 @@ export { signStrandPayload, verifyStrandPayload, signStrandApproval, generateStr
|
|
|
40
47
|
export { canonicalDatetime } from './canonical-datetime.js';
|
|
41
48
|
export { StrandMemberRegistry, StrandMemberVerifier, memberRegistrationPayload, type StrandAdmission } from './strand-member-registry.js';
|
|
42
49
|
export { SeedBootstrapService, SEED_PROTOCOL, mergeSeedPeers, seedDigest, type SeedBootstrapConfig, type SeedEventCallbacks } from './seed-bootstrap.js';
|
|
43
|
-
export { peerAuthorizationDigest, cadrePeerVoucherDigest, cadrePeerRemoveDigest, deviceTokenAddDigest, deviceTokenRemoveDigest, formationConsentDigest, cadreInviteAddDigest, cadreInviteRedeemDigest, cadreInviteConsentDigest, ownerKeyAddDigest, verifyPeerAuthorization, verifyCadrePeerVoucher, verifyOwnerKeyVoucher, verifyRevocationSigner, verifyFormationConsent, verifyInvitationAdmission,
|
|
50
|
+
export { peerAuthorizationDigest, cadrePeerVoucherDigest, cadrePeerRemoveDigest, deviceTokenAddDigest, deviceTokenRemoveDigest, formationConsentDigest, cadreInviteAddDigest, cadreInviteRedeemDigest, cadreInviteConsentDigest, ownerKeyAddDigest, verifyPeerAuthorization, verifyCadrePeerVoucher, verifyOwnerKeyVoucher, verifyRevocationSigner, verifyFormationConsent, verifyInvitationAdmission, verifyCadreInviteRow, verifyCadreInviteRedemption, ownerGrantAddDigest, ownerGrantRedeemDigest, ownerGrantConsentDigest, verifyOwnerGrantRow, verifyOwnerGrantRedemption, verifyOwnerGrantAdmission, type DeviceTokenAuthorizedRow } from './peer-authorization.js';
|
|
44
51
|
export { deriveOwnerAnchor, type OwnerAnchorInputs, type OwnerAnchorDerivation } from './owner-anchor-sync.js';
|
|
45
52
|
export { StrandWakeService, dialWake, WAKE_PROTOCOL, DEFAULT_WAKE_DIAL_BUDGET_MS, type StrandWakeServiceOptions, type DialWakeOptions } from './strand-wake-protocol.js';
|
|
46
53
|
export { StrandAddrService, collectStrandAddrs, STRAND_ADDR_PROTOCOL, type StrandAddrServiceOptions, type StrandAddrPeer, type CollectStrandAddrsOptions, type StrandAddrOutcome, type StrandAddrCollection } from './strand-addr-protocol.js';
|
|
@@ -57,13 +64,15 @@ export { anchoredTrustPolicy, pinnedKeyTrustPolicy, tofuTrustPolicy, claimSecret
|
|
|
57
64
|
export { parseClaimSecret, claimProof, verifyClaimProof, ClaimRefusedError, CLAIM_SECRET_BYTES } from './claim-proof.js';
|
|
58
65
|
export { encodeNodeClaimPayload, decodeNodeClaimPayload, selectNodeClaimAddresses, withClaimDestination, destinationPeerIdOf, classifyDialAddress, NODE_CLAIM_PAYLOAD_PREFIX, type NodeClaimPayload, type NodeClaimAddressOptions, type DialAddressKind } from './node-claim-payload.js';
|
|
59
66
|
export { exportStrandBundle, adoptStrandBundle, readStrandHoldings, unheldBundleContent, StrandMoveNotOwnerError, StrandMoveSamePartyError, type StrandHoldings, type StrandBundle, type StrandBundleEntry, type FormationInviteEntry, type StrandMoveReport, type StrandMoveFailure } from './strand-move.js';
|
|
60
|
-
export { encodeCadreJoinRequest, decodeCadreJoinRequest, requireCadreJoinReply, CADRE_JOIN_REQUEST_PREFIX, CADRE_INVITATION_PREFIX, CADRE_JOIN_REQUEST_MAX_APP_NAME, type CadreJoinReply, type CadreJoinRequest } from './cadre-join-request.js';
|
|
67
|
+
export { encodeCadreJoinRequest, decodeCadreJoinRequest, requireCadreJoinReply, CADRE_JOIN_REQUEST_PREFIX, CADRE_INVITATION_PREFIX, OWNER_KEY_EXPORT_STEM, OWNER_GRANT_PREFIX, CADRE_JOIN_REQUEST_MAX_APP_NAME, type CadreJoinReply, type CadreJoinRequest } from './cadre-join-request.js';
|
|
61
68
|
export * from './provider/index.js';
|
|
62
69
|
export { signSchema, verifySchema, assertSchemaSignature, SchemaVerificationError } from './schema-verification.js';
|
|
63
70
|
export { FormationListener, dialFormation, dialFormationByMachine, isValidResponderCreatesResult, isWellFormedMembershipInvite, sanitizeStrandAddrs, FORMATION_PROTOCOL, type FormationParty, type FormationContactMessage, type FormationResultMessage, type FormationProvisionResult, type FormationStrandInfo, type FormationDbConnectionInfo, type FormationListenerOptions, type FormationDialOptions, type FormationDialResult, type FormationRejection, type FormationTokenCheck, type ResponderProvisionOutcome } from './strand-formation-protocol.js';
|
|
64
71
|
export { FormationRejectedError, FormationUnreachableError, FormationPostApprovalError, FORMATION_REJECTION_RETRYABLE, isFormationRejectionCode, type FormationRejectionCode } from './strand-formation-rejection.js';
|
|
65
72
|
export { formationDeadlines, type FormationDeadlines } from './strand-formation-deadlines.js';
|
|
66
73
|
export { CadreInviteHandler, redeemAtMembers, redeemInPasses, signRedeemRequest, verifyRedeemReply, encodeCadreInvitation, decodeCadreInvitation, isWellFormedCadreInviteRow, sanitizeAddrs, CadreInviteRejectedError, CadreInviteUnreachableError, CadreInviteReplyInvalidError, CADRE_INVITE_PROTOCOL, CADRE_INVITE_REJECTION_RETRYABLE, isCadreInviteRejectionCode, type CadreInvitation, type CadreInviteRedeemRequest, type CadreInviteRedeemReply, type CadreInviteAccepted, type CadreInviteRejectionCode, type CadreInviteAddressOutcome, type CadreInviteHandlerOptions, type CadreInviteStore, type RedeemAtMembersOptions, type RedeemInPassesOptions, type RedeemSigner, type CadreInviteRedemption } from './cadre-invite-protocol.js';
|
|
74
|
+
export { OwnerGrantHandler, redeemOwnerGrantAtMembers, redeemOwnerGrantInPasses, signOwnerGrantRequest, verifyOwnerGrantReply, encodeOwnerGrant, decodeOwnerGrant, isWellFormedOwnerGrantRow, OwnerGrantRejectedError, OwnerGrantUnreachableError, OwnerGrantReplyInvalidError, OWNER_GRANT_PROTOCOL, OWNER_GRANT_REJECTION_RETRYABLE, isOwnerGrantRejectionCode, type OwnerGrantBundle, type OwnerGrantRedeemRequest, type OwnerGrantRedeemReply, type OwnerGrantAccepted, type OwnerGrantRejectionCode, type OwnerGrantHandlerOptions, type OwnerGrantStore, type RedeemOwnerGrantAtMembersOptions, type RedeemOwnerGrantInPassesOptions, type OwnerGrantRedemption } from './owner-grant-protocol.js';
|
|
75
|
+
export { MemberRedemptionHandler, dialRedemption, dialRedemptionInPasses, MAX_REDEMPTION_FRAME_BYTES, type MemberRedemptionHandlerOptions, type MemberRedemptionOptions, type MemberRedemptionPassOptions, type MemberRedemption, type RedemptionAddressOutcome, type RedemptionRejection, type RedemptionRefusalFrame } from './member-redemption.js';
|
|
67
76
|
export { selectCadreInvitationMembers, cadreInvitationReach, CADRE_INVITATION_MAX_ADDRS, CADRE_INVITATION_ADDRS_PER_SIBLING } from './invitation-bootstrap.js';
|
|
68
77
|
export { PENDING_JOIN_POLL_MS, PENDING_JOIN_MAX_BACKOFF_MS, MAX_PENDING_JOIN_MS } from './pending-join-runner.js';
|
|
69
78
|
export { StrandFormationManager, createStrandFormationManager, MEMBERSHIP_INVITE_TTL_MS, MEMBERSHIP_INVITE_UNAVAILABLE_REASON, HOST_STRAND_MUST_BE_RECREATED_REASON, type CadrePeerAddrsSource, type MembershipInviteIssuer, type StrandFormationManagerConfig, type StrandFormationManagerOptions } from './strand-formation-manager.js';
|
package/dist/index.js
CHANGED
|
@@ -3,12 +3,19 @@ export * from './types.js';
|
|
|
3
3
|
// Canonical JSON serialization (shared signing payload format)
|
|
4
4
|
export { canonicalJson } from './canonical-json.js';
|
|
5
5
|
// Main CadreNode class
|
|
6
|
-
export { CadreNode,
|
|
6
|
+
export { CadreNode, CADRE_INVITATION_DEFAULT_TTL_MS, OWNER_GRANT_DEFAULT_TTL_MS } from './cadre-node.js';
|
|
7
7
|
// Removing a machine from a cadre: the by-name refusal `CadreNode.removeMachine` throws
|
|
8
8
|
// (the listing, plan and result types are in types.ts)
|
|
9
9
|
export { MachineRemovalRefusedError } from './machine-removal.js';
|
|
10
|
+
// Adding and removing an owner key: the by-name refusals `CadreNode.addOwner` and
|
|
11
|
+
// `CadreNode.removeOwner` throw (the listing, plan and result types are in types.ts)
|
|
12
|
+
export { OwnerKeyAddRefusedError, OwnerKeyRemovalRefusedError } from './owner-keys.js';
|
|
10
13
|
// Control database
|
|
11
|
-
export { ControlDatabase, parseNullableStoredDatetimeMs, MissingHostStrandError, InvitationExhaustedError, CadreInviteIssuerUnknownError, buildAuthorizationMessage, registerPartyIdFunction, formationVouchMessage, formationConsentMessage, cadreInviteAddMessage, cadreInviteRedeemMessage, cadreInviteConsentMessage, projectSeedPeers, REAPABLE_TABLES } from './control-database.js';
|
|
14
|
+
export { ControlDatabase, parseNullableStoredDatetimeMs, MissingHostStrandError, InvitationExhaustedError, CadreInviteIssuerUnknownError, OwnerGrantIssuerUnknownError, IssuedRowNotHereYetError, buildAuthorizationMessage, registerPartyIdFunction, formationVouchMessage, formationConsentMessage, cadreInviteAddMessage, cadreInviteRedeemMessage, cadreInviteConsentMessage, ownerGrantAddMessage, ownerGrantRedeemMessage, ownerGrantConsentMessage, projectSeedPeers, REAPABLE_TABLES } from './control-database.js';
|
|
15
|
+
// What `start()` throws when the control store was written with a control schema this build
|
|
16
|
+
// cannot apply to it (recreate procedure: docs/architecture.md)
|
|
17
|
+
export { CONTROL_SCHEMA_VERSION, CONTROL_SCHEMA_BASELINE_VERSION } from './control-schema.js';
|
|
18
|
+
export { ControlStoreIncompatibleError } from './control-schema-version.js';
|
|
12
19
|
// Bounded retry for transient control-write failures (classifier + loop behind
|
|
13
20
|
// ControlDatabase.lockedWithRetry; exported so the integration package can drive the
|
|
14
21
|
// classifier against real engine errors)
|
|
@@ -17,21 +24,28 @@ export { CONTROL_WRITE_ATTEMPTS, CONTROL_WRITE_RETRY_BUDGET_MS, SCHEMA_INIT_ATTE
|
|
|
17
24
|
// ControlDatabase.readRows; the loop is shared with the write side via control-retry.ts)
|
|
18
25
|
export { CONTROL_READ_ATTEMPTS, CONTROL_READ_RETRY_DELAYS_MS, CONTROL_READ_RETRY_BUDGET_MS, isRetriableControlReadFailure, retryControlRead } from './control-read-retry.js';
|
|
19
26
|
// Control-plane authorization field vector (the domain/action tagging every signer shares)
|
|
20
|
-
export { controlAuthorizationFields, unboundAuthorizationFields, cadreInviteRowFields } from './control-authorization.js';
|
|
27
|
+
export { controlAuthorizationFields, unboundAuthorizationFields, cadreInviteRowFields, ownerGrantRowFields } from './control-authorization.js';
|
|
21
28
|
// Ed25519 key bridge (libp2p Ed25519 -> base64url keypair)
|
|
22
|
-
export { ed25519KeyPairFromLibp2p, ed25519PublicKeyFromPrivate, ed25519PublicKeyB64FromPeerId, requireEd25519PublicKeyB64 } from './ed25519-key.js';
|
|
29
|
+
export { ed25519KeyPairFromLibp2p, ed25519PublicKeyFromPrivate, ed25519PublicKeyB64FromPeerId, requireEd25519PublicKeyB64, requireEd25519PrivateKeyB64 } from './ed25519-key.js';
|
|
23
30
|
// Pluggable key store (backend-agnostic identity/owner key material seam).
|
|
24
31
|
// Dependency-free: the interface, error, default slot id, and in-memory backend
|
|
25
32
|
// are safe in every (RN/browser/Node) entry graph. The Node FileKeyStore is a
|
|
26
33
|
// separate subpath module ('@serfab/cadre-core/key-store-file') so its node:fs
|
|
27
34
|
// import never lands here.
|
|
28
|
-
export { InMemoryKeyStore, KeyStoreAccessError, DEFAULT_IDENTITY_KEY_ID } from './key-store.js';
|
|
35
|
+
export { InMemoryKeyStore, KeyStoreAccessError, DEFAULT_IDENTITY_KEY_ID, DEFAULT_OWNER_KEY_ID } from './key-store.js';
|
|
29
36
|
// The filename-safe form of an id that every Node-only per-party file store names its file
|
|
30
37
|
// with (`<name>.<encoded party>.json`), for an embedder keeping its own file beside theirs.
|
|
31
38
|
export { encodeFileSafeComponent } from './file-safe-name.js';
|
|
32
39
|
// The KeyStore-backed identity rule, shared with embedding apps that need the
|
|
33
40
|
// node key BEFORE `CadreNode` exists.
|
|
34
41
|
export { loadOrCreateIdentityKey } from './identity-key.js';
|
|
42
|
+
// Owner keys (`docs/architecture.md` → Owner Keys): the one interface owner signatures go
|
|
43
|
+
// through, the key-store slot an owner key lives in apart from the identity slot, and the
|
|
44
|
+
// text form a key is exported and imported in. Cross-platform: pure JS crypto only.
|
|
45
|
+
export { softwareOwnerSigner, OwnerSigningDeclinedError } from './owner-signer.js';
|
|
46
|
+
export { createOwnerKey, loadOwnerSigner, importOwnerKey, readOwnerPrivateKey, OwnerKeySlotOccupiedError } from './owner-key-store.js';
|
|
47
|
+
export { encodeOwnerKeyExport, decodeOwnerKeyExport, unlockOwnerKeyExport, OwnerKeyExportError, OWNER_KEY_EXPORT_PREFIX, LOCKED_OWNER_KEY_EXPORT_PREFIX, OWNER_KEY_MAX_LABEL } from './owner-key-export.js';
|
|
48
|
+
export { exportOwnerKey, importOwnerKeyInto } from './owner-key-flows.js';
|
|
35
49
|
// Node-local trusted-owner anchor: the NON-replicated, per-party record of
|
|
36
50
|
// out-of-band-established owner keys (the trust anchor the replicated OwnerKey
|
|
37
51
|
// table cannot be). Cross-platform: interface + in-memory store only — the
|
|
@@ -135,7 +149,7 @@ export { StrandMemberRegistry, StrandMemberVerifier, memberRegistrationPayload }
|
|
|
135
149
|
// Seed Bootstrap
|
|
136
150
|
export { SeedBootstrapService, SEED_PROTOCOL, mergeSeedPeers, seedDigest } from './seed-bootstrap.js';
|
|
137
151
|
// Peer Authorization (shared owner-signature digest + offline verifier)
|
|
138
|
-
export { peerAuthorizationDigest, cadrePeerVoucherDigest, cadrePeerRemoveDigest, deviceTokenAddDigest, deviceTokenRemoveDigest, formationConsentDigest, cadreInviteAddDigest, cadreInviteRedeemDigest, cadreInviteConsentDigest, ownerKeyAddDigest, verifyPeerAuthorization, verifyCadrePeerVoucher, verifyOwnerKeyVoucher, verifyRevocationSigner, verifyFormationConsent, verifyInvitationAdmission,
|
|
152
|
+
export { peerAuthorizationDigest, cadrePeerVoucherDigest, cadrePeerRemoveDigest, deviceTokenAddDigest, deviceTokenRemoveDigest, formationConsentDigest, cadreInviteAddDigest, cadreInviteRedeemDigest, cadreInviteConsentDigest, ownerKeyAddDigest, verifyPeerAuthorization, verifyCadrePeerVoucher, verifyOwnerKeyVoucher, verifyRevocationSigner, verifyFormationConsent, verifyInvitationAdmission, verifyCadreInviteRow, verifyCadreInviteRedemption, ownerGrantAddDigest, ownerGrantRedeemDigest, ownerGrantConsentDigest, verifyOwnerGrantRow, verifyOwnerGrantRedemption, verifyOwnerGrantAdmission } from './peer-authorization.js';
|
|
139
153
|
// How the trusted-owner anchor follows the replicated OwnerKey table along verifiable
|
|
140
154
|
// chains: the pure derivation rule `CadreNode.syncOwnerAnchor` applies on every membership
|
|
141
155
|
// refresh (owner-anchor-sync.ts).
|
|
@@ -188,7 +202,7 @@ export { encodeNodeClaimPayload, decodeNodeClaimPayload, selectNodeClaimAddresse
|
|
|
188
202
|
export { exportStrandBundle, adoptStrandBundle, readStrandHoldings, unheldBundleContent, StrandMoveNotOwnerError, StrandMoveSamePartyError } from './strand-move.js';
|
|
189
203
|
// The join request: what an app that wants to join a cadre copies to the app that manages it,
|
|
190
204
|
// which mints an invitation targeted at the request's peer id. Both paste-text prefixes live here.
|
|
191
|
-
export { encodeCadreJoinRequest, decodeCadreJoinRequest, requireCadreJoinReply, CADRE_JOIN_REQUEST_PREFIX, CADRE_INVITATION_PREFIX, CADRE_JOIN_REQUEST_MAX_APP_NAME } from './cadre-join-request.js';
|
|
205
|
+
export { encodeCadreJoinRequest, decodeCadreJoinRequest, requireCadreJoinReply, CADRE_JOIN_REQUEST_PREFIX, CADRE_INVITATION_PREFIX, OWNER_KEY_EXPORT_STEM, OWNER_GRANT_PREFIX, CADRE_JOIN_REQUEST_MAX_APP_NAME } from './cadre-join-request.js';
|
|
192
206
|
// Renting a node from a hosting provider: the provider's descriptor, the app's side of the
|
|
193
207
|
// OAuth 2 + PKCE sign-in, the typed client for its container API, and `rentNode` /
|
|
194
208
|
// `finishRental`, which add the rented container to this node's cadre by invitation or by
|
|
@@ -206,6 +220,11 @@ export { formationDeadlines } from './strand-formation-deadlines.js';
|
|
|
206
220
|
// Cadre invitation redemption transport: the bundle an owner hands out, the wire messages, the
|
|
207
221
|
// member-side handler and the device-side dialer, and how a redemption fails
|
|
208
222
|
export { CadreInviteHandler, redeemAtMembers, redeemInPasses, signRedeemRequest, verifyRedeemReply, encodeCadreInvitation, decodeCadreInvitation, isWellFormedCadreInviteRow, sanitizeAddrs, CadreInviteRejectedError, CadreInviteUnreachableError, CadreInviteReplyInvalidError, CADRE_INVITE_PROTOCOL, CADRE_INVITE_REJECTION_RETRYABLE, isCadreInviteRejectionCode } from './cadre-invite-protocol.js';
|
|
223
|
+
// Owner grant redemption transport: the bundle an owner hands out, the wire messages, the
|
|
224
|
+
// member-side handler and the holder-side dialer, and how a redemption fails
|
|
225
|
+
export { OwnerGrantHandler, redeemOwnerGrantAtMembers, redeemOwnerGrantInPasses, signOwnerGrantRequest, verifyOwnerGrantReply, encodeOwnerGrant, decodeOwnerGrant, isWellFormedOwnerGrantRow, OwnerGrantRejectedError, OwnerGrantUnreachableError, OwnerGrantReplyInvalidError, OWNER_GRANT_PROTOCOL, OWNER_GRANT_REJECTION_RETRYABLE, isOwnerGrantRejectionCode } from './owner-grant-protocol.js';
|
|
226
|
+
// The exchange shape both redemption protocols are built on
|
|
227
|
+
export { MemberRedemptionHandler, dialRedemption, dialRedemptionInPasses, MAX_REDEMPTION_FRAME_BYTES } from './member-redemption.js';
|
|
209
228
|
// Which machines, and how many addresses of each, an invitation names; how far a cadre invitation reaches
|
|
210
229
|
export { selectCadreInvitationMembers, cadreInvitationReach, CADRE_INVITATION_MAX_ADDRS, CADRE_INVITATION_ADDRS_PER_SIBLING } from './invitation-bootstrap.js';
|
|
211
230
|
// The pending-join retry loop behind CadreNode.requestJoin (PendingJoinStatus is in types.ts)
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,cAAc,YAAY,CAAC;AAE3B,+DAA+D;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,uBAAuB;AACvB,OAAO,EAAE,SAAS,EAAE,+BAA+B,EAAE
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,cAAc,YAAY,CAAC;AAE3B,+DAA+D;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEp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CAAoC,EAKrC,MAAM,+BAA+B,CAAC;AAEvC,kFAAkF;AAClF,OAAO,EACL,sBAAsB,EAEvB,MAAM,6BAA6B,CAAC;AAErC,wEAAwE;AACxE,OAAO,EACL,+BAA+B,EAC/B,iCAAiC,EACjC,sCAAsC,EACtC,mCAAmC,EACnC,6BAA6B,EAG9B,MAAM,kCAAkC,CAAC;AAE1C,iFAAiF;AACjF,iFAAiF;AACjF,mFAAmF;AACnF,sFAAsF;AACtF,uFAAuF;AACvF,yEAAyE;AACzE,EAAE;AACF,qFAAqF;AACrF,qFAAqF;AACrF,uFAAuF;AACvF,wFAAwF;AACxF,wFAAwF;AACxF,YAAY;AACZ,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACxB,kBAAkB,EACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAwB,MAAM,4BAA4B,CAAC;AACnF,yFAAyF;AACzF,8DAA8D;AAC9D,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,kBAAkB,EAAmB,MAAM,iBAAiB,CAAC;AACrG,2FAA2F;AAC3F,8FAA8F;AAC9F,+EAA+E;AAC/E,OAAO,EACL,kBAAkB,EAClB,4BAA4B,EAC5B,8BAA8B,EAG/B,MAAM,mBAAmB,CAAC;AAE3B,gFAAgF;AAChF,0EAA0E;AAC1E,6BAA6B;AAC7B,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,gCAAgC,EAChC,6BAA6B,EAC7B,sBAAsB,EACtB,4BAA4B,EAC5B,4BAA4B,EAM7B,MAAM,wBAAwB,CAAC;AAEhC,2EAA2E;AAC3E,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EAMzB,MAAM,kCAAkC,CAAC"}
|
|
@@ -22,8 +22,8 @@ export interface JoinedStrandStore {
|
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* The {@link StrandRow} a record stands for — the shape `addStrand` and `strand:discovered`
|
|
25
|
-
* carry.
|
|
26
|
-
* reads null as "not mine" and joins.
|
|
25
|
+
* carry. The founder columns are null because a joiner never founds; `CadreNode.launchStrand`
|
|
26
|
+
* reads a null `FounderPeerId` as "not mine" and joins.
|
|
27
27
|
*/
|
|
28
28
|
export declare function joinedStrandRow(record: JoinedStrandRecord): StrandRow;
|
|
29
29
|
/**
|
|
@@ -79,7 +79,7 @@ export declare class KeyStoreJoinedStrandStore implements JoinedStrandStore {
|
|
|
79
79
|
* key; this module sees only the seam, so it stays free of the runtime.
|
|
80
80
|
*/
|
|
81
81
|
export interface PartyJoinedStrandLedger {
|
|
82
|
-
/** Every party-wide join, as offerable rows (
|
|
82
|
+
/** Every party-wide join, as offerable rows (null founder columns). */
|
|
83
83
|
list(): Promise<StrandRow[]>;
|
|
84
84
|
/** Whether this party's control database names `strandId`, as its own strand or as a party-wide join. */
|
|
85
85
|
names(strandId: string): Promise<boolean>;
|
|
@@ -40,11 +40,11 @@ import { assertStrandScopeKey, isValidStrandScopeKey } from './storage-scope.js'
|
|
|
40
40
|
const log = debug('sereus:cadre:joined-strand-store');
|
|
41
41
|
/**
|
|
42
42
|
* The {@link StrandRow} a record stands for — the shape `addStrand` and `strand:discovered`
|
|
43
|
-
* carry.
|
|
44
|
-
* reads null as "not mine" and joins.
|
|
43
|
+
* carry. The founder columns are null because a joiner never founds; `CadreNode.launchStrand`
|
|
44
|
+
* reads a null `FounderPeerId` as "not mine" and joins.
|
|
45
45
|
*/
|
|
46
46
|
export function joinedStrandRow(record) {
|
|
47
|
-
return { Id: record.Id, Type: record.Type, MemberPrivateKey: record.MemberPrivateKey, FounderOwnerKey: null };
|
|
47
|
+
return { Id: record.Id, Type: record.Type, MemberPrivateKey: record.MemberPrivateKey, FounderOwnerKey: null, FounderPeerId: null };
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
50
|
* Ephemeral store for a node without a `keyStore`. Warns once, at the first join it is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3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IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAClC,GAAG,CAAC,sFAAsF,EAAE,QAAQ,CAAC,CAAC;QACvG,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,GAAG,CAAC,0EAA0E,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;QAClG,CAAC;IACF,CAAC;CACD"}
|
package/dist/key-store.d.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Backend-agnostic store for raw private key material.
|
|
3
3
|
*
|
|
4
4
|
* Mobile cadre nodes hold sensitive key material at rest: the libp2p
|
|
5
|
-
* peer/node identity key and
|
|
6
|
-
*
|
|
7
|
-
* through so a platform-secure backend (iOS Keychain / Android Keystore)
|
|
8
|
-
* plugged in without `@serfab/cadre-core` taking any platform dependency.
|
|
5
|
+
* peer/node identity key and, on a device the user made an owner, an owner key
|
|
6
|
+
* in a slot of its own (`owner-key-store.ts`). This module defines the seam those
|
|
7
|
+
* keys flow through so a platform-secure backend (iOS Keychain / Android Keystore)
|
|
8
|
+
* can be plugged in without `@serfab/cadre-core` taking any platform dependency.
|
|
9
9
|
*
|
|
10
10
|
* This file is dependency-free (no node:/RN imports) so it is safe in every
|
|
11
11
|
* entry graph. The Node reference {@link FileKeyStore} lives in a separate
|
|
@@ -20,6 +20,11 @@ export type KeyId = string;
|
|
|
20
20
|
* `identityKeyId`.
|
|
21
21
|
*/
|
|
22
22
|
export declare const DEFAULT_IDENTITY_KEY_ID: KeyId;
|
|
23
|
+
/**
|
|
24
|
+
* Default slot id for an owner key (`owner-key-store.ts`). Not party-scoped: one
|
|
25
|
+
* owner key may own several cadres, each owner signature binding its party id.
|
|
26
|
+
*/
|
|
27
|
+
export declare const DEFAULT_OWNER_KEY_ID: KeyId;
|
|
23
28
|
/**
|
|
24
29
|
* Backend-agnostic store for raw private key material. Implementations may be
|
|
25
30
|
* file-based, OS-keyring, or platform secure-enclave backed (iOS Keychain /
|
package/dist/key-store.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Backend-agnostic store for raw private key material.
|
|
3
3
|
*
|
|
4
4
|
* Mobile cadre nodes hold sensitive key material at rest: the libp2p
|
|
5
|
-
* peer/node identity key and
|
|
6
|
-
*
|
|
7
|
-
* through so a platform-secure backend (iOS Keychain / Android Keystore)
|
|
8
|
-
* plugged in without `@serfab/cadre-core` taking any platform dependency.
|
|
5
|
+
* peer/node identity key and, on a device the user made an owner, an owner key
|
|
6
|
+
* in a slot of its own (`owner-key-store.ts`). This module defines the seam those
|
|
7
|
+
* keys flow through so a platform-secure backend (iOS Keychain / Android Keystore)
|
|
8
|
+
* can be plugged in without `@serfab/cadre-core` taking any platform dependency.
|
|
9
9
|
*
|
|
10
10
|
* This file is dependency-free (no node:/RN imports) so it is safe in every
|
|
11
11
|
* entry graph. The Node reference {@link FileKeyStore} lives in a separate
|
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
* `identityKeyId`.
|
|
19
19
|
*/
|
|
20
20
|
export const DEFAULT_IDENTITY_KEY_ID = 'cadre/identity';
|
|
21
|
+
/**
|
|
22
|
+
* Default slot id for an owner key (`owner-key-store.ts`). Not party-scoped: one
|
|
23
|
+
* owner key may own several cadres, each owner signature binding its party id.
|
|
24
|
+
*/
|
|
25
|
+
export const DEFAULT_OWNER_KEY_ID = 'cadre/owner';
|
|
21
26
|
/**
|
|
22
27
|
* Thrown by {@link KeyStore.get} when access was denied or could not be
|
|
23
28
|
* satisfied (e.g. a biometric/device-unlock prompt was cancelled or failed).
|
package/dist/key-store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-store.js","sourceRoot":"","sources":["../src/key-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAU,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"key-store.js","sourceRoot":"","sources":["../src/key-store.ts"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
|
|
3
|
-
* read-only plan behind its confirmation step (`CadreNode.planMachineRemoval`)
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `ControlDatabase.removeMachine`'s.
|
|
2
|
+
* Removing a machine from a cadre: the listing an app shows (`CadreNode.listMachines`) and the
|
|
3
|
+
* read-only plan behind its confirmation step (`CadreNode.planMachineRemoval`). Pure
|
|
4
|
+
* projections over rows the node has already read; the reads and writes themselves are
|
|
5
|
+
* `CadreNode.removeMachine`'s and `ControlDatabase.removeMachine`'s.
|
|
7
6
|
*
|
|
8
|
-
* A machine
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* and an owner key with no machine row is still listed, as the machine it names.
|
|
7
|
+
* A machine is a `CadrePeer` row and nothing more: an owner key is the person's, so removing a
|
|
8
|
+
* machine leaves every owner key standing, the one the machine's user signed with included
|
|
9
|
+
* (removing one is `CadreNode.removeOwner`, `owner-keys.ts`).
|
|
12
10
|
*/
|
|
13
|
-
import type { CadreInviteStatus, CadreInviteUsageRow, CadreMachine, CadrePeerRow, MachineRemovalPlan, MachineRemovalRefusal
|
|
11
|
+
import type { CadreInviteStatus, CadreInviteUsageRow, CadreMachine, CadrePeerRow, MachineRemovalPlan, MachineRemovalRefusal } from './types.js';
|
|
14
12
|
/**
|
|
15
13
|
* `CadreNode.removeMachine` refused by name, before any write. `code` says which rule
|
|
16
14
|
* (`MachineRemovalRefusal`), for an app to switch on; the message is for a log.
|
|
@@ -26,53 +24,35 @@ export interface MachineListingInput {
|
|
|
26
24
|
selfPeerId: string | null;
|
|
27
25
|
/** Live `CadrePeer` rows (`ControlDatabase.queryCadrePeers`). */
|
|
28
26
|
rows: readonly CadrePeerRow[];
|
|
29
|
-
/** Live `OwnerKey` rows (`ControlDatabase.queryOwnerKeyRows`). */
|
|
30
|
-
owners: readonly OwnerKeyRow[];
|
|
31
27
|
/** This node's authorized-membership predicate for one row (`CadreNode.listAuthorizedMembers`'s). */
|
|
32
28
|
trusted: (row: CadrePeerRow) => boolean;
|
|
33
29
|
}
|
|
34
30
|
/**
|
|
35
|
-
* One entry per live `CadrePeer` row
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* bump `UpdatedAt` without re-signing.
|
|
31
|
+
* One entry per live `CadrePeer` row. `profile` and `lastPublishedAt` are reported only when
|
|
32
|
+
* the row's self-signature verifies under the key behind its peer id, as
|
|
33
|
+
* `CadreNode.resolvePeerAddrs` judges the same record: no insert rule constrains `Profile`, and
|
|
34
|
+
* an owner re-vouch may bump `UpdatedAt` without re-signing.
|
|
40
35
|
*/
|
|
41
36
|
export declare function describeMachines(input: MachineListingInput): CadreMachine[];
|
|
42
37
|
/** What {@link planMachineRemoval} judges from. */
|
|
43
38
|
export interface MachineRemovalPlanInput {
|
|
44
39
|
peerId: string;
|
|
45
40
|
machines: readonly CadreMachine[];
|
|
46
|
-
rows: readonly CadrePeerRow[];
|
|
47
|
-
owners: readonly OwnerKeyRow[];
|
|
48
41
|
selfPeerId: string | null;
|
|
49
|
-
/**
|
|
50
|
-
|
|
42
|
+
/** Whether this node's owner signer is an enrolled owner (`CadreNode.ownerSignerEnrolledIn`), so it can sign the removal. */
|
|
43
|
+
canSign: boolean;
|
|
51
44
|
invites: readonly CadreInviteStatus[];
|
|
52
45
|
usages: readonly CadreInviteUsageRow[];
|
|
53
46
|
}
|
|
54
47
|
/**
|
|
55
|
-
* The plan for removing `peerId` from these rows. The refusals come first and by name: a
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* owner, but the local count can be wrong under concurrency, so the name stays.
|
|
60
|
-
*
|
|
61
|
-
* `dependents` are the rows the machine's owner key vouched, which every reader judges
|
|
62
|
-
* against its anchor through `VouchOwner`: once the key is removed they stop passing the
|
|
63
|
-
* membership predicate on every machine unless re-vouched first. This node's own rows are
|
|
64
|
-
* reported as `ownDependency` instead, since it cannot re-vouch them itself.
|
|
48
|
+
* The plan for removing `peerId` from these rows. The refusals come first and by name: a node
|
|
49
|
+
* that cannot sign, and the node itself (leaving a cadre is the embedder's flow, which stops
|
|
50
|
+
* the node and deletes its data; the removal notice a machine acts on is built around another
|
|
51
|
+
* machine removing it).
|
|
65
52
|
*
|
|
66
53
|
* `invitations` are the live ones the machine could redeem to come back: targeted at it,
|
|
67
54
|
* or already redeemed by it and still redeemable (a multi-use invitation, or an open
|
|
68
|
-
*
|
|
55
|
+
* invitation inside its lifetime). The schema's rule: keeping a device out is removing
|
|
69
56
|
* its row and withdrawing the invitation.
|
|
70
57
|
*/
|
|
71
58
|
export declare function planMachineRemoval(input: MachineRemovalPlanInput): MachineRemovalPlan;
|
|
72
|
-
/**
|
|
73
|
-
* The re-vouch a caller asked for, checked against the plan: every key and peer must be in
|
|
74
|
-
* `plan.dependents`, so a caller cannot re-vouch a row the removed owner never vouched (nor
|
|
75
|
-
* the machine itself, which `dependents.peers` excludes). Throws naming the offenders, before
|
|
76
|
-
* `CadreNode.removeMachine` writes anything. Duplicates are dropped.
|
|
77
|
-
*/
|
|
78
|
-
export declare function revouchWithinPlan(plan: MachineRemovalPlan, revouch: RemoveMachineOptions['revouch']): MachineRemovalPlan['dependents'];
|