Skip to content

Domain.VaultLive reference

Source: packages/domain/src/VaultLive.ts Kind: Layer · Provides: Domain.Vault

A Vault that encrypts with AES-256-GCM under one key per subject. A KeyWrap makes each key and a KeyStore keeps it. A box is bound to its subject: under another subject, or under a key the subject got after being shredded, it does not open.

export const BankLive = Bank.layer(BankHandlers).pipe(
Layer.provide(Domain.VaultLive),
Layer.provide(Domain.HostKeyStore),
Layer.provide(Domain.RootKeyWrap(Config.Redacted("VAULT_ROOT_KEY"))),
Layer.provide(Platform),
);