VaultTransactionBuilder is the default high-level execution API for manager flows. It sits on top of the low-level sync transaction helpers and is the best choice when you want to sequence multiple strategy steps, mix standard vault actions with Loopscale responses, or let the SDK manage setup instructions, price refreshes, lookup tables, and Loopscale co-signing for you.
For pre-flight state checks before sending a transaction, see VaultAssertion. It returns an
allow / warn / block report you can use to gate send() calls.- Use
createVaultSyncTransactions(...)when you want wrapped sync transaction results but still want the SDK to fan a logical action out into multiple sequential transactions when needed. - Use
createVaultSyncTransaction(...)only when you specifically require exactly one sync transaction result.
Create a builder
vault.state.squadsVault.
Config fields
Add standard vault steps
EachaddActions() call becomes a separate Squads sync transaction.
If you pass multiple actions in one
addActions([...]) array, the builder packs them into one sync transaction. Large combinations can exceed Solana’s transaction size limit.Step options
StepOptions applies to addActions(...):
LoopscaleStepOptions applies to addLoopscaleResponse(...):
Loopscale steps only accept
label. Compute overrides stay on the raw Loopscale response and are not reapplied by the builder.
AMM swap (Market Two)
marketTwoAction.tradePt, marketTwoAction.buyYt, and marketTwoAction.sellYt plug into the builder like any other standard vault step. Each addActions(...) call becomes its own Squads sync transaction.
createVaultSyncTransaction flow.
Kamino Vault to Kamino Farm sequence
Use the builder when you want to deposit into a Kamino Vault and then stake the resulting shares into a Kamino Farm.Mix standard steps with Loopscale
UseaddLoopscaleResponse(...) when you already have a raw response from LoopscaleClient.
result.send(...) only calls Loopscale MPC co-signing for transaction sets that require it.
Manager: fill a withdrawal
managerAction.fillWithdrawal({...}) fills one depositor withdrawal account from the vault’s token entries. Use it to clear the withdrawal queue without leaving the builder pipeline.
Add multiple
fillWithdrawal actions in one builder call to fill multiple withdrawal accounts in the same flow.
Build result
build() returns a VaultTransactionBuildResult:
send() is sequential, not atomic. If a later transaction fails, earlier ones may already have landed.
Ephemeral ALT handling
If the vault’s existing lookup tables do not cover every account in the flow,send() can create an ephemeral address lookup table automatically. In that case, the returned SendResult includes:
ephemeralAlt is non-null, you can deactivate and later close that lookup table to reclaim rent.