Skip to content

feat: cosmology CLI env vars, cosmology-compat rename, bitcoin-first networks - #5

Merged
pyramation merged 1 commit into
mainfrom
feat/env-var-inputs
Jul 27, 2026
Merged

feat: cosmology CLI env vars, cosmology-compat rename, bitcoin-first networks#5
pyramation merged 1 commit into
mainfrom
feat/env-var-inputs

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Every env var the cosmology CLI read now works in dcrypt, restoring script compatibility that the new flags-only design had broken:

Variable Used by
MNEMONIC wallet address / wallet validate
SALT, ENCRYPTED_SALT cosmology decrypt / upgrade
KEYCHAIN_ACCOUNT keychain namespace → keychain-<account>.json (default dcryptkeychain.json)
DCRYPT_PASSPHRASE any passphrase prompt (new, for unattended runs)

Each also has a DCRYPT_-prefixed alias (utils/env.ts is the single resolution point). Precedence everywhere: explicit flag → environment → stdin → interactive prompt; secrets in argv remain rejected.

@decryption/legacy@decryption/cosmology-compat (nothing was published under the old name). The CLI command is now dcrypt cosmology decrypt|upgrade, with dcrypt legacy kept as an alias so existing invocations keep working.

Bitcoin is the default network, Ethereum second: NETWORKS reordered (bitcoin, ethereum, then cosmos-family), DEFAULT_NETWORK = 'bitcoin' exported and used by createWallet and dcrypt wallet (was cosmoshub); the desktop wallet tool's selector now lists all ten networks in the same order and defaults to bitcoin.

New tests: SALT/MNEMONIC/DCRYPT_PASSPHRASE/KEYCHAIN_ACCOUNT paths, the legacy alias, and the bitcoin default (bc1 address).

Link to Devin session: https://app.devin.ai/sessions/04636534e07048089ffb6b78142e12cd
Requested by: @pyramation

@pyramation pyramation self-assigned this Jul 27, 2026
@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@pyramation
pyramation merged commit 1cd60e7 into main Jul 27, 2026
4 checks passed
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.

1 participant