fix(ext/setup): wizard writes settings.enc to match CLI init

Add default_vault_settings_json() to the hand-written wasm.d.ts
declarations, then use it in attachStep3New to encrypt and push
settings.enc after manifest.enc during new-vault creation. Wizard-
created vaults now have all four files the SW expects (salt,
params.json, manifest.enc, settings.enc), preventing the
get_vault_settings 404 on first unlock.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken
2026-04-27 18:29:10 -04:00
parent 3aa17e6be2
commit 214f8da673
2 changed files with 14 additions and 0 deletions

View File

@@ -40,6 +40,7 @@ declare module 'relicario-wasm' {
export function item_encrypt(handle: SessionHandle, item_json: string): Uint8Array;
export function settings_decrypt(handle: SessionHandle, encrypted: Uint8Array): unknown;
export function settings_encrypt(handle: SessionHandle, settings_json: string): Uint8Array;
export function default_vault_settings_json(): string;
export function attachment_encrypt(
handle: SessionHandle,