Skip to content

feat(sdk-api): add registerToken method to BitGoAPI#8367

Open
manas-at-bitgo wants to merge 1 commit intomasterfrom
feat/ams-register-token-cshld-89
Open

feat(sdk-api): add registerToken method to BitGoAPI#8367
manas-at-bitgo wants to merge 1 commit intomasterfrom
feat/ams-register-token-cshld-89

Conversation

@manas-at-bitgo
Copy link
Copy Markdown
Contributor

Summary

  • Adds registerToken(coinConfig, coinConstructor) method to BitGoAPI in modules/sdk-api/src/bitgoAPI.ts
  • Delegates directly to GlobalCoinFactory.registerToken — idempotent, does not affect existing statics coins
  • Enables runtime registration of AMS-sourced tokens without requiring statics library updates or releases
  • Uses Parameters<CoinFactory['registerToken']>[0] for the coin config type (no new direct dep on @bitgo/statics)

Test plan

  • Unit test: sdk.coin(name) resolves correctly after registerToken
  • Unit test: calling registerToken twice for the same token does not throw (idempotency)
  • Unit test: existing statics coins are unaffected after registerToken calls
  • Full unit-test suite passes (114 tests)

Closes CSHLD-89

Copy link
Copy Markdown
Contributor

@alextse-bg alextse-bg left a comment

Choose a reason for hiding this comment

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

CI is failing

@manas-at-bitgo manas-at-bitgo force-pushed the feat/ams-register-token-cshld-89 branch 2 times, most recently from 6b64045 to c326748 Compare March 31, 2026 08:51
Adds a `registerToken(coinConfig, coinConstructor)` method to `BitGoAPI`
that delegates to `GlobalCoinFactory.registerToken`. Enables runtime
registration of AMS-sourced tokens without requiring statics library
updates. Method is idempotent and does not affect existing statics coins.

Closes CSHLD-89
@manas-at-bitgo manas-at-bitgo force-pushed the feat/ams-register-token-cshld-89 branch from c326748 to a6a1ca0 Compare March 31, 2026 09:08
@manas-at-bitgo manas-at-bitgo requested a review from a team as a code owner March 31, 2026 09:08
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.

2 participants