Skip to content

feat(keyring): add passkey smart account metadata - #236

Closed
sidhujag wants to merge 130 commits into
syscoin:mainfrom
sidhujag:feat/passkey-smart-account-keyring
Closed

sidhujag wants to merge 130 commits into
syscoin:mainfrom
sidhujag:feat/passkey-smart-account-keyring

Conversation

@sidhujag

Copy link
Copy Markdown
Member

Summary

  • Add passkey smart account account type, sponsor metadata, and creation params to sysweb3-keyring.
  • Add a keyring helper for constructing passkey smart account state without private key material.
  • Bump the keyring package version and lockfile for the Pali passkey account integration.

Review context

Test plan

  • Pre-commit lint-staged ran on the staged TypeScript files during commit.

Made with Cursor

jagdeep sidhu and others added 27 commits September 12, 2025 11:13
…versions

avoid converting in getXpub which is only used to verify address and convert to xpub/tpub device format inside signing, while when importing convert to zpub/vpub for backend/display format
SYSCOIN‑PALI2025‑007 (too-fast SHA512/HMAC, single iteration): fixed because we're no longer doing a single fast hash; we're doing 100k/120k PBKDF2 iterations.
SYSCOIN‑PALI2025‑001 (xprv decryptable using stored hash): fixed because the stored value (vault-keys.hash from encryptSHA512Auth) is not the same key used to encrypt xprv (encryptSHA512 session key), and the session key is not stored.
more secure storage in blob using aes-gcm and use derived session key for all vault enc/dec
testnet failure was because test app wasn't used, hardened to fetch xpub from device instead of recreating in software derviation
recreate web3 provider if its not synced with active network, currently it was assuming and never did a reinit
xpub will be missing for some hw wallets potentially so set evm signer and just log a warning
Preserve BIP84 public key versions for imported extended accounts and enrich Syscoin PSBT paths so imported zpub/vpub accounts can sign reliably. Remove zkSync-specific EVM transaction paths now that zkTanenbaum uses standard EVM handling.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fix imported zpub signing and remove zkSync handling
Co-authored-by: Cursor <cursoragent@cursor.com>
@sidhujag

Copy link
Copy Markdown
Member Author

Closing because this was opened against the wrong repository. Reopening against sidhujag/sysweb3, which is the official target for this change.

@sidhujag sidhujag closed this May 31, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 642f17b964

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


// v4 vault is encrypted with the derived session password key (PBKDF2 output).
// If the password is wrong, this will throw and we return canLogin:false below.
await getDecryptedVault(sessionPasswordKey);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Handle legacy vaults before v4 decrypt

For existing wallets created by the previous initializeSession, vault-keys contains only hash and salt while the vault itself was encrypted with the raw password, not the new PBKDF2 sessionPasswordKey; those users do not enter the currentSessionSalt migration branch, so this decrypt attempt throws and unlock() returns canLogin: false. Add a fallback/migration path for the raw-password vault shape before requiring v4 decryption, otherwise upgraded users are locked out.

Useful? React with 👍 / 👎.

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.

3 participants