Skip to content

Domain.RootKeyWrap reference

Source: packages/domain/src/RootKeyWrap.ts Kind: Layer · Provides: Domain.KeyWrap

Wrap each subject’s key under a root key you supply, so the KeyStore alone opens nothing. The root key is a high-entropy secret: 32 random bytes as text, not a password.

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),
);