stable

Configuration

The full createNoydb reference: every non-strategy option key you pass to createNoydb(), grouped into detailed tables by concern.

The core options below cover every non-strategy key you pass to createNoydb(options). The with*() slots that unlock capabilities beyond the always-on kernel are the strategies — a separate directory: see Strategies.

Core options

Every non-strategy key on the options object passed to createNoydb(options). Strategy slots (historyStrategy, syncStrategy, and the rest) are covered on the Strategies page instead.

Identity and keys

KeyTypeDefaultMeaning
userstring— (required)The user identifier for this session.
secretstring—Secret for key derivation. Required unless encrypt: false or getKeyring is supplied; supplying both secret and getKeyring throws.
getKeyring(vault: string) => Promise<UnlockedKeyring>—Callback that returns an unlocked keyring, for WebAuthn / OIDC / Shamir / any unlock that supplies the keyring directly rather than deriving it from a secret. Called lazily on first use per vault and cached per (instance, vault). Mutually exclusive with secret.
secretMode'standard' | 'managed''standard''standard' uses secret as the plaintext secret; 'managed' generates a random 256-bit secret sealed under sealingKey (rubber-hose-resistant — the user never sees it). 'managed' is mutually exclusive with secret and getKeyring.
sealingKeyNoydbSealer—Seals / unseals the auto-generated managed-mode secret. Required when secretMode === 'managed', ignored otherwise.
shamirRecoveryNoydbShamir—Required to use the 'shamir' recovery profile.
auth'secret' | 'biometric''secret'Auth method.

Encryption

KeyTypeDefaultMeaning
encryptbooleantrueEnable encryption. false stores raw JSON — testing/debugging only.
debugPlaintextbooleanfalseLay plaintext records out as directly-inspectable store objects (fields inlined, _debug: 1). Requires encrypt: false — combined with encryption it throws DebugPlaintextError at construction. Never enable for production or client data. See Enclave → Debug-plaintext layout.
objectStoreObjectProjection—Object projection for external blob fields — routes raw bytes to a servable native object. Sees plaintext bytes, so it sits outside the zero-knowledge guarantee.

Storage

KeyTypeDefaultMeaning
storeNoydbStorebuilt-in toMemory() (non-persistent)The ciphertext store — where encrypted envelopes are persisted. Without it, nothing survives the session. See Stores.

Conflict and sync scheduling

KeyTypeDefaultMeaning
conflictConflictStrategy'version'Conflict-resolution strategy for concurrent writes.
syncNoydbStore | SyncTarget | SyncTarget[]—Remote store target(s) for replication. Configuring this needs the sync service (see Strategies).
syncPolicySyncPolicy— (a store-category policy is resolved, but resolving one does not start automation)Push/pull scheduling. Automation runs only when you declare this option (or a per-target policy) — passing sync: alone gives you explicit db.push() / db.pull() / db.sync() and nothing else. See sync → the automation ladder.
autoSyncboolean—Deprecated — use syncPolicy (which wins when both are set).
syncIntervalnumber—Deprecated — use syncPolicy.

Session lifetime

KeyTypeDefaultMeaning
sessionTimeoutnumber (ms)noneDeprecated — clears keys after inactivity; use sessionPolicy.idleTimeoutMs. Still honored, but sessionPolicy wins.
sessionPolicySessionPolicy—Session lifetime, re-auth requirements, and background-lock behavior. Enforcement needs the session service (see Strategies); replaces the legacy sessionTimeout.

Validation, policy, and recovery

KeyTypeDefaultMeaning
validateSecretbooleanfalseValidate secret strength on first-time keyring creation; weak phrases throw WeakSecretError.
policyVaultPolicyPERSONAL_POLICYVault-level policy-gate document, persisted to _meta/policy on first-time creation and honored only at creation thereafter (change it later with updatePolicy). Use STRICT_POLICY for regulated deployments.
recoveryreadonly RecoveryEnrollment[]—Recovery profiles to enroll. 'paper' is supported end-to-end; other profiles ship the API shape and throw RecoveryProfileNotImplementedError in use.
requireRecoverybooleanfalseWhen true, createNoydb rejects a vault with no recovery entries persisted (throws RecoveryNotEnrolledError). Turn on for regulated environments.
onInvalidKey'error' | 'reset''error'What to do when an existing keyring can't be decrypted with the supplied credentials. 'error' propagates InvalidKeyError; 'reset' deletes the stale keyring and re-initializes from scratch — all previously encrypted data becomes unrecoverable. Secret path only.

Public envelope, history, and translation

KeyTypeDefaultMeaning
covertrue | CoverSchemaoffEnable the cover service — the owner-curated plaintext vault label. See cover.
historyHistoryConfig—Audit-history configuration (enabled, maxVersions, per-collection ledger participation).
plaintextTranslatorPlaintextTranslatorFn—Consumer-supplied translation function for i18nText fields marked autoTranslate: true. Receives unencrypted text — configuring it lets plaintext leave the zero-knowledge boundary over whatever channel your implementation uses. Calling put() on an autoTranslate field without it throws TranslatorNotConfiguredError.
plaintextTranslatorNamestring'anonymous'Human-readable translator name recorded in the audit log (e.g. 'deepl-pro-with-dpa').

Internal / advanced

A handful of keys exist only so createNoydb() can thread pre-resolved values into the constructor; they are @internal with no supported override, and applications should not set them.

KeyMeaning
coordinationStrategyDrain-barrier coordination transport for the schema fence. Provider injection, not a with*() service — note the name doesn't follow the strategy pattern. Defaults to a store-backed provider that reproduces today's store-polling fence; real-time transports inject a push provider here.
sessionIdStable id for the session that owns this instance's writers; defaults to a fresh ULID per instance.
userApiFactory · policyFactory · policyCheckGateFnPre-resolved factories/functions for the vault.user API and the policy engine, always resolved by createNoydb() itself. No supported override.

See also

  • Strategies — the with*() service-strategy slots you also pass to createNoydb(): all 32, grouped by where the methods they unlock land (client / vault / collection), each linked to its service page.