Skip to content

chore: synchronize dev with maintained main - #23

Closed
boboliu-1010 wants to merge 111 commits into
BofAI:devfrom
boboliu-1010:chore/sync-main-to-dev
Closed

boboliu-1010 wants to merge 111 commits into
BofAI:devfrom
boboliu-1010:chore/sync-main-to-dev

Conversation

@boboliu-1010

Copy link
Copy Markdown

Summary

Synchronize the stale dev branch with the maintained 3.0.0 implementation on main. Resolve the obsolete pre-refactor directory conflicts using the current main layout; the resulting source tree exactly matches main, and both branch histories are retained.

Validation

  • Resulting Git tree matches current main (c400138) byte for byte.
  • Main CI already passed on this exact source revision, including Linux and Windows checks.
  • No wallet behavior or package version changes are introduced by this synchronization.

This restores a current development baseline for the subsequent BOA SDK dependency fix.

roger-gan and others added 28 commits July 23, 2026 17:51
- Extract normalizeValue/requireFields as exported pure functions
- Base class delegates to them via protected field aliases
- PrivyConfigResolver now extends the shared base, removing ~30 lines
  of duplicated normalizeValue/normalizeSource/requiredMissing helpers
- Public API unchanged (resolve/isEnabled/constructor signature)
Align naming with PrivyAdapter — both implement Wallet + Eip712Capable
and delegate to an external signing source. Renamed across source,
tests, and docs.
…tion

Remove the encrypted local key store (SecureKVStore, local_secure wallet
type, master password, runtime_secrets.json) and replace it with a
secret-resolver that fetches external signer credentials via exec scripts
(e.g. 1Password CLI). Credentials may now be plaintext strings or
{ exec: "/path/to/script" } references resolved at adapter construction.

- Remove WalletType.LOCAL_SECURE, SecureKVStore, local-secure adapter,
  secret-loader, RUNTIME_SECRETS_FILENAME, cmdInit/cmdChangePassword/
  cmdSignMsg and related CLI flags (--password, --save-runtime-secrets)
- Simplify Wallet interface: drop signRaw and signMessage, keep
  signTransaction (+ signTypedData via Eip712Capable)
- Make createAdapter and ExternalSignerConfigResolver.resolve async to
  support exec script resolution
- Add SecretValue/SecretRef schemas to privy and wallet_cli config params
- Add --app-secret-exec / --cli-password-exec CLI flags
- Update docs, examples, and tests to match the new API
- Catch WalletError at top level in main() to print clean one-line
  messages instead of raw stack traces
- Remove redundant "Error: " prefixes from start/add/sign catch blocks
- Probe wallet-cli binary after start/add wallet_cli: in interactive
  mode prompt to install via npm i -g; in non-interactive mode print a
  warning with install instructions. Non-blocking — wallet config is
  saved regardless of probe result.
Move the wallet-cli availability probe to the start of the wallet_cli
branch in cmdStart and cmdAdd, before prompting for wallet ID, account,
or password. Previously the probe ran after the wallet was already
created, so the user had already entered all credentials before
learning the binary was missing.

Also switch the probe from currentAccount (which needs keystore unlock)
to `wallet-cli list` (no auth required), since credentials are not yet
available at probe time.
If the wallet-cli binary is not found, print a concise install hint and
exit before collecting credentials. A keystore password without a
wallet-cli keystore is meaningless, so the flow must stop early.
Removes the previous interactive auto-install flow and spawn dependency.
If the wallet-cli binary is not found, print a concise hint and exit
before collecting credentials. A keystore password without a wallet-cli
keystore is meaningless, so the flow must stop early. Removes the
previous interactive auto-install flow and spawn dependency.
The local_secure wallet type and init command were removed in the
secret-resolver refactor. Update the CI smoke test to use the
equivalent raw_secret flow: start a wallet with a private key, sign
typed data, and verify wallets_config.json exists.
Add shell: process.platform === 'win32' to spawn calls in
WalletCliClient.run() and secret-resolver execSecret(). On Windows,
spawn cannot execute .cmd shims (npm global bins) or batch scripts
without a shell, causing spawn UNKNOWN errors. Unix behavior is
unchanged.

Also make secret-resolver tests cross-platform: generate .cmd batch
files on Windows and sh scripts on Unix instead of bash-only scripts.
Windows has no executable bit — accessSync with X_OK fails for .cmd
batch files, causing spawn UNKNOWN errors before the shell even runs.
Use F_OK (existence check only) on Windows; keep X_OK on POSIX.
fix: require patched Node.js security releases
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.

8 participants