Skip to content

feat: update environment configuration for local custodial mnemonic e… - #9

Merged
iflames1 merged 1 commit into
devfrom
feat/add-custodial-dev-secret-for-local-kms-encrytion
Aug 1, 2026
Merged

feat: update environment configuration for local custodial mnemonic e…#9
iflames1 merged 1 commit into
devfrom
feat/add-custodial-dev-secret-for-local-kms-encrytion

Conversation

@iflames1

@iflames1 iflames1 commented Aug 1, 2026

Copy link
Copy Markdown
Member

…ncryption

Copilot AI review requested due to automatic review settings August 1, 2026 22:58
@cursor

cursor Bot commented Aug 1, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@vercel

vercel Bot commented Aug 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stacks-wars Building Building Preview Aug 1, 2026 10:58pm

@iflames1
iflames1 merged commit 6033837 into dev Aug 1, 2026
2 of 3 checks passed
@iflames1
iflames1 deleted the feat/add-custodial-dev-secret-for-local-kms-encrytion branch August 1, 2026 22:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a local-development encryption option for custodial mnemonics by introducing CUSTODIAL_DEV_SECRET-based envelope encryption, while keeping Google Cloud KMS as the production mechanism.

Changes:

  • Add AES-256-GCM encryption/decryption path gated by CUSTODIAL_DEV_SECRET, with a dev1: ciphertext prefix for local-only blobs.
  • Update local environment template to include CUSTODIAL_DEV_SECRET.
  • Update README stack description to clarify local vs production custodial encryption configuration.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
README.md Documents local (CUSTODIAL_DEV_SECRET) vs production (Google Cloud KMS) custodial wallet encryption.
lib/kms/envelope.ts Implements dev-secret AES-GCM encryption fallback and a dev1: prefix to distinguish local ciphertexts from KMS ciphertexts.
env.example Adds CUSTODIAL_DEV_SECRET for local mnemonic encryption configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/kms/envelope.ts
Comment on lines 97 to 100
throw new Error(
"Google Cloud KMS is required for custodial wallets. Set GOOGLE_CLOUD_PROJECT, KMS_KEY_RING, KMS_CRYPTO_KEY, and GOOGLE_SERVICE_ACCOUNT_KEY."
"Custodial wallet encryption is not configured. For local development set CUSTODIAL_DEV_SECRET (openssl rand -base64 32)."
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants