-
Notifications
You must be signed in to change notification settings - Fork 300
feat(sdk-core): generate Go account wallet #7268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@claude review as grug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for generating Go Account wallets through the SDK's generateWallet endpoint, streamlining the CaaS Go Account creation process. Go Accounts use a single user keychain (1-of-1 signature) and are identified by the wallet type 'trading' within the 'ofc' coin family.
Key Changes:
- Added a dedicated
generateGoAccountWalletmethod to handle Go Account wallet creation with single keychain - Introduced
GoAccountWalletWithUserKeychaintype to represent the unique structure of Go Account wallets - Extended
Keychaininterface to includeethAddressfield for Ethereum address derived from xpub
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/sdk-core/src/bitgo/wallet/wallets.ts | Implements Go Account wallet generation logic and routing based on 'ofc' family + 'trading' type |
| modules/sdk-core/src/bitgo/wallet/iWallets.ts | Defines types and interfaces for Go Account wallet generation options and return type |
| modules/sdk-core/src/bitgo/keychain/iKeychains.ts | Adds optional ethAddress field to Keychain interface |
| modules/sdk-core/src/bitgo/baseCoin/iBaseCoin.ts | Extends wallet type enum to include 'trading' for Go Accounts |
| modules/bitgo/test/v2/unit/wallets.ts | Adds unit test coverage for Go Account wallet generation flow |
| examples/ts/create-go-account.ts | Provides example script demonstrating Go Account wallet creation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
sampras-saha
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with some comments
TICKET: CAAS-491
GoAccountWalletWithUserKeychaintype since Go accounts operate with 1 key - the user keyethAddresssince that was missing from the types but various wallet types has an ethAddress derived from the xpub key in the keychain (checked it out with Go, lightning btc, and hot self-custody)