Skip to content

feat(sdk-coin-xlm): add accountConfig and authorizeTrustline support#9078

Open
prajwalu142 wants to merge 1 commit into
masterfrom
prajwalu142/cshld-1089-xlm-add-account-config-and-authorize-trustline-support-to
Open

feat(sdk-coin-xlm): add accountConfig and authorizeTrustline support#9078
prajwalu142 wants to merge 1 commit into
masterfrom
prajwalu142/cshld-1089-xlm-add-account-config-and-authorize-trustline-support-to

Conversation

@prajwalu142

Copy link
Copy Markdown
Contributor

Problem

BitGoJS had no way to forward accountConfig or authorizeTrustline params to the server prebuild, and no verification logic to confirm the returned transaction matches the client's intent.

Goal

Enable end-to-end accountConfig and authorizeTrustline flows: params reach the server and the signed prebuild is verified before signing.

Fix

  • verifyAccountConfigTxOperations: validates setOptions bitmasks match the expected setFlags/clearFlags from the intent
  • verifyAuthorizeTrustlineTxOperations: validates setTrustLineFlags authorized flag matches intent (reads op.flags as object, not bitmask)
  • getExtraPrebuildParams: zeroes recipients for both new types
  • BuildParams.ts (sdk-core): whitelist accountConfig and authorizeTrustline so params are forwarded in prebuild API requests

Testing

95 unit tests pass. New describe blocks in test/unit/xlm.ts cover accountConfig (4 tests) and authorizeTrustline (5 tests) including bitmask mismatch and flag mismatch error paths.

Ticket: CSHLD-1089
🤖 Generated with Claude Code

@linear-code

linear-code Bot commented Jun 22, 2026

Copy link
Copy Markdown

CSHLD-1089

@prajwalu142 prajwalu142 force-pushed the prajwalu142/cshld-1089-xlm-add-account-config-and-authorize-trustline-support-to branch from cb2f5eb to 8a62116 Compare June 22, 2026 13:42
@prajwalu142 prajwalu142 marked this pull request as ready for review June 22, 2026 16:23
@prajwalu142 prajwalu142 requested review from a team as code owners June 22, 2026 16:23
@prajwalu142 prajwalu142 force-pushed the prajwalu142/cshld-1089-xlm-add-account-config-and-authorize-trustline-support-to branch from 8a62116 to ba64d6e Compare June 22, 2026 17:59
## Problem

BitGoJS had no way to forward accountConfig or authorizeTrustline
params to the server prebuild, and no verification logic to confirm
the returned transaction matches the client's intent.

## Goal

Enable end-to-end accountConfig and authorizeTrustline flows: params
reach the server and the signed prebuild is verified before signing.

## Fix

- verifyAccountConfigTxOperations: validates setOptions bitmasks
  match the expected setFlags/clearFlags from the intent
- verifyAuthorizeTrustlineTxOperations: validates setTrustLineFlags
  authorized flag matches intent (reads op.flags as object, not bitmask)
- getExtraPrebuildParams: zeroes recipients for both new types
- BuildParams.ts (sdk-core): whitelist accountConfig and
  authorizeTrustline so params are forwarded in prebuild API requests

## Testing

95 unit tests pass. New describe blocks in test/unit/xlm.ts cover
accountConfig (4 tests) and authorizeTrustline (5 tests) including
bitmask mismatch and flag mismatch error paths.

Ticket: CSHLD-1089
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@prajwalu142 prajwalu142 force-pushed the prajwalu142/cshld-1089-xlm-add-account-config-and-authorize-trustline-support-to branch from ba64d6e to fb08403 Compare June 22, 2026 18:19
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.

1 participant