Conversation
c863c6e to
7b61eb3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: WCN-284
This pull request introduces async versions of several cryptographic and wallet management methods in the BitGo SDK, aiming to modernize the codebase and improve compatibility with v2 encryption. It also updates and expands the test suites to cover these new async methods, ensuring both backward compatibility and robust error handling. The most significant changes are grouped below:
Async Cryptographic Methods and API Enhancements
decryptKeysAsync, an async method for decrypting multiple wallet keys with v2 encryption support, and updated related documentation and error handling.handleTokenIssuanceAsync, an async method for securely handling authentication responses and token issuance, and refactored internal usage to prefer the async version. [1] [2] [3]splitSecretAsyncandreconstituteSecretAsyncfor Shamir Secret Sharing, providing async support for splitting and reconstructing secrets, with improved input validation and error messages. [1] [2]encryptAsyncfor private key encryption, ensuring consistency with async cryptography.Test Suite Updates and Coverage
splitSecretAsync,reconstituteSecretAsync,verifyShardsAsync) and added comprehensive new tests for all async Shamir Secret Sharing flows, including error cases and success scenarios. [1] [2]handleTokenIssuanceAsyncand updated authentication response handling tests to use async methods.encryptPrvForUserAsyncanddownloadKeycardAsync, including error handling for Node.js environments and correct output validation. [1] [2]These changes modernize the SDK's cryptographic workflows, improve test coverage, and lay the groundwork for a full migration to async and v2 encryption methods.