Skip to content

Conversation

@bhavidhingra
Copy link
Contributor

@bhavidhingra bhavidhingra commented Aug 13, 2025

This pull request adds comprehensive tests for the fromBroadcastString method in message builder factories for multiple coins (ETH, ADA, SOL), ensuring that broadcastable strings are parsed correctly and return the appropriate builder types. Each test verifies that the parsed message payload, signers, destination addresses, amounts, and signatures match expected values, improving reliability and coverage for message serialization and deserialization.

Message builder factory broadcast string parsing tests:

  • Added a test for EIP-191 messages to validate parsing of broadcastable strings, checking payload, signer address, destination address, amount, signature, and public key. (modules/abstract-eth/test/unit/messages/eip191/eip191MessageBuilder.ts)
  • Added a test for CIP8 ADA messages to validate parsing of broadcastable strings, checking payload, signer address, destination address, amount, signature, public key, and COSE encoding outputs. (modules/sdk-coin-ada/test/unit/messages/cip8/cip8MessageBuilder.ts)
  • Added a test for Solana simple messages to validate parsing of broadcastable strings, checking payload, signer address, destination address, amount, signature in both base58 and hex formats, and public key. (modules/sdk-coin-sol/test/unit/messages/simpleMessageBuilder.ts)

Test setup improvements:

  • Updated imports in test files to include MessageBuilderFactory and other required utilities to support the new tests. (modules/abstract-eth/test/unit/messages/eip191/eip191MessageBuilder.ts, modules/sdk-coin-ada/test/unit/messages/cip8/cip8MessageBuilder.ts, modules/sdk-coin-sol/test/unit/messages/simpleMessageBuilder.ts) [1] [2] [3]

Example usage addition:

  • Added an example script to demonstrate how to obtain an access token for a BitGo account using the SDK. (examples/ts/access-token.ts)

TICKET: COIN-5225

@bhavidhingra bhavidhingra requested a review from a team as a code owner August 13, 2025 09:54
@bhavidhingra bhavidhingra merged commit 6fa7eaa into master Aug 13, 2025
11 of 12 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.

2 participants