Skip to content

Conversation

@Taseen08
Copy link
Contributor

@Taseen08 Taseen08 commented Oct 17, 2025

TICKET: CAAS-491

  • Streamlining the CaaS Go Account creation by extending the generate wallet endpoint to support Go account wallets
  • Add a separate sub-handler to create Go account wallet
  • Create new GoAccountWalletWithUserKeychain type since Go accounts operate with 1 key - the user key
  • Extended the KeyChain type to include ethAddress since 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)
  • added go account creation example script and unit test
  • Tested this locally on testnet and created a Go account successfully

@Taseen08 Taseen08 marked this pull request as ready for review October 17, 2025 04:07
@Taseen08 Taseen08 requested review from a team as code owners October 17, 2025 04:07
@Taseen08 Taseen08 self-assigned this Oct 17, 2025
@sampras-saha
Copy link
Contributor

@claude review as grug

@sampras-saha sampras-saha requested a review from Copilot October 17, 2025 12:38
Copy link

Copilot AI left a 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 generateGoAccountWallet method to handle Go Account wallet creation with single keychain
  • Introduced GoAccountWalletWithUserKeychain type to represent the unique structure of Go Account wallets
  • Extended Keychain interface to include ethAddress field 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.

Copy link
Contributor

@sampras-saha sampras-saha left a 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

@Taseen08 Taseen08 merged commit d557e31 into master Oct 17, 2025
18 checks passed
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.

5 participants