Skip to content

Conversation

@sidmorizon
Copy link
Contributor

Summary

  • Add keylessCredential to ICloudSyncCredential type for unified credential handling
  • Update cloudSyncItemBuilder to support keyless encryption/decryption based on credential type
  • Modify getSyncCredentialWithCache to return keyless credential when in Keyless sync mode
  • Update sync flow to properly handle keylessData and keylessDataTime fields
  • Fix LocalDbBase to persist keyless data fields on updates
  • Change IDBCloudSyncItem keyless fields from optional (?) to explicit | undefined type

Test plan

  • Verify keyless sync mode encryption/decryption works correctly
  • Verify OneKey ID sync mode still works as expected
  • Test mode switching between Keyless and OneKey ID modes
  • Verify data persistence with keylessData fields

🤖 Generated with Claude Code

@revan-zhang
Copy link
Contributor

revan-zhang commented Jan 27, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@socket-security
Copy link

socket-security bot commented Jan 28, 2026

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

@sidmorizon sidmorizon force-pushed the feat/keyless-sync branch 3 times, most recently from a5e866b to 415e922 Compare January 30, 2026 07:13
sidmorizon and others added 12 commits January 30, 2026 15:42
Add keylessData and keylessDataTime fields to cloud sync schemas and types to support keyless wallet encryption alongside existing password-based encryption.
Add comprehensive keyless cloud sync methods to ServicePrimeCloudSync:
- Keyless credential derivation and caching
- Active sync mode detection (OnekeyId/Keyless/None)
- Data source determination based on timestamps
- Bidirectional encryption conversion between modes
- Mode switch handling with automatic data migration

This enables seamless switching between OneKey ID sync and Keyless wallet sync while preserving user data integrity.
Implement local mock storage and API methods for keyless cloud sync:
- Add keylessMockApi with query, upload, and clear operations
- Add mockApiDownloadItemsKeyless, mockApiUploadItemsKeyless methods
- Add mockApiCheckServerStatusKeyless for status checking
- Add getKeylessSyncAuth for authentication headers
- Skip Lock/Reset/Flush operations in keyless mode
- Fix null safety for convertServerItemToLocalItem return type
Allow cloud sync mode to proceed when enabled and register a new developer gallery route.
…ystem

- Add keylessCredential to ICloudSyncCredential type for unified credential handling
- Update cloudSyncItemBuilder to support keyless encryption/decryption
- Modify getSyncCredentialWithCache to return keyless credential in Keyless mode
- Update sync flow to properly handle keylessData and keylessDataTime fields
- Fix LocalDbBase to persist keylessData and keylessDataTime on updates
- Change IDBCloudSyncItem keyless fields from optional to explicit undefined type
- Disable swift-lsp plugin in settings
- Update spell checker skip words with 'pwdhash'
- Remove keylessData and keylessDataTime fields from LocalDbBase, RealmSchemaCloudSyncItem, and related types
- Introduce pwdHash in relevant data structures for cloud sync
- Introduce a unified method for computing pwdHash based on sync mode.
- Refactor cloud sync item handling to utilize the new pwdHash logic.
- Update ServicePrimeCloudSync to streamline data conversion and encryption processes.
- Remove deprecated keylessData and keylessDataTime fields, focusing on pwdHash for validation.
- Enhance keyless credential management by integrating pwdHash computation into the sync workflow.
- Add keyless mock server build and start scripts to root package.json
- Implement HTTP-based mock API with signature verification
- Add onPressLoadingEnabled prop to Button component for async operations
- Connect CloudSyncGallery to use loading-enabled buttons
- Replace in-memory storage with mock server HTTP endpoints
- Create standalone keyless cloud sync mock server with HTTP API endpoints
- Add build scripts and TypeScript config for mock server
- Refactor keylessCloudSyncMockApi to use HTTP client instead of in-memory storage
- Add environment variable support for mock server URL configuration
- Support upload, download, check-status, and clear operations via HTTP
- Add CLI entry point for starting mock server independently

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
…g and unified pwdHash

- Add comprehensive BIP32 key encryption documentation
- Fix keyless credential derivation to use deterministic decrypted keys
- Remove keyless wallet filtering from sync flow managers
- Unify pwdHash retrieval from sync credential across all modes
- Clean up duplicate API calls in mock server
- Add debug tools and UI improvements for keyless sync testing
- Remove unused import in Button component
…ation

- Add a guideline to avoid using JSON.stringify() for cryptographic operations, promoting the use of stringUtils.stableStringify() for deterministic serialization.
- Refactor keylessCloudSyncUtils to export functions directly, improving usability and clarity.
- Update BIP32 key documentation to clarify encryption states and usage.
- Clean up ServiceMasterPassword and CloudSyncItemBuilder by removing unnecessary checks and improving error handling.
- Adjust keyless sync constants to reflect updated derivation paths for better clarity and consistency.
…ylessWallet

- Comment out the createKeylessWallet function calls in both useKeylessWallet and FinalizeWalletSetupPage to prevent unintended execution during onboarding.
- Add a new property `skipAddHDNextIndexedAccount` to IDBCreateHDWalletParams for improved wallet creation flexibility.
…ndling

- Comment out the wait timer in getKeylessWallet for future removal.
- Add checks for deviceId in context to enhance flow control.
- Introduce skipAddHDNextIndexedAccount property to improve wallet creation parameters.
- Introduce timing logs for `isCloudSyncIsAvailable` and `getSyncCredentialSafe` methods to monitor performance.
- Update `LocalDbBase` to handle existing sync items more robustly with optional chaining.
- Add `IExistingSyncItemsInfo` type for improved type safety in sync item handling.
- Implement a conditional check for `skipAddHDNextIndexedAccount` during indexed account addition to enhance wallet creation flexibility.
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedtailwindcss@​3.4.18981008798100

View full report

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