Skip to content

feat(wasm-solana): add intent-based transaction building#134

Merged
lcovar merged 1 commit intomasterfrom
BTC-3006-intent-builder
Feb 4, 2026
Merged

feat(wasm-solana): add intent-based transaction building#134
lcovar merged 1 commit intomasterfrom
BTC-3006-intent-builder

Conversation

@lcovar
Copy link
Contributor

@lcovar lcovar commented Feb 4, 2026

Add high-level intent-based transaction building API that accepts BitGo
intent objects directly and builds Solana transactions without requiring
low-level instruction construction.

New API:

  • buildFromIntent(intent, params) - returns Transaction object directly

Supported intent types:

  • payment, stake, unstake, deactivate, claim, delegate
  • enableToken, closeAssociatedTokenAccount, consolidate

Key features:

  • All intent→instruction mapping in Rust/WASM
  • Automatic keypair generation for stake accounts
  • Supports blockhash and durable nonce
  • Includes memo support
  • No serialize/deserialize round-trip (direct Transaction wrapping)

BTC-3006

@lcovar lcovar requested a review from a team as a code owner February 4, 2026 19:50
@lcovar lcovar force-pushed the BTC-3006-intent-builder branch from 80ead61 to 9a5e044 Compare February 4, 2026 20:04
@lcovar lcovar marked this pull request as draft February 4, 2026 20:26
@lcovar lcovar force-pushed the BTC-3006-intent-builder branch 8 times, most recently from 05b8cee to c225850 Compare February 4, 2026 23:18
Add high-level intent-based transaction building API that accepts BitGo
intent objects directly and builds Solana transactions without requiring
low-level instruction construction.

New API:
- buildFromIntent(intent, params) - returns Transaction object directly

Supported intent types:
- payment, stake, unstake, deactivate, claim, delegate
- enableToken, closeAssociatedTokenAccount, consolidate

Key features:
- All intent→instruction mapping in Rust/WASM
- Automatic keypair generation for stake accounts
- Supports blockhash and durable nonce
- Includes memo support
- No serialize/deserialize round-trip (direct Transaction wrapping)

BTC-3006
@lcovar lcovar force-pushed the BTC-3006-intent-builder branch from c225850 to 32e4e8c Compare February 4, 2026 23:30
@lcovar lcovar marked this pull request as ready for review February 4, 2026 23:36
@lcovar lcovar dismissed OttoAllmendinger’s stale review February 4, 2026 23:40

pls still review after merge

@lcovar lcovar merged commit 34aeecd into master Feb 4, 2026
6 checks passed
@lcovar lcovar deleted the BTC-3006-intent-builder branch February 4, 2026 23:40
Comment on lines +33 to +35
# WASM random number generation support (need both 0.1 and 0.2 for all deps)
getrandom_01 = { package = "getrandom", version = "0.1", features = ["wasm-bindgen"] }
getrandom = { version = "0.2", features = ["js"] }
Copy link
Contributor

Choose a reason for hiding this comment

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

weird

Copy link
Contributor Author

@lcovar lcovar Feb 6, 2026

Choose a reason for hiding this comment

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

indeed so it can create the random keypair for solana stake, weird indeed

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.

3 participants