DustActionsBuilder
Builds DustActions for transaction fee payment.
High-Level Flow:
1. Calculate transaction fee (FeeCalculator)
2. Load DustLocalState from repository
3. Create DustSpend for each UTXO in state (DustSpendCreator)
4. Save updated state (contains new nullifiers)
5. Return DustActions (ready to add to Intent)DustActions Structure:
spends: List of DustSpend actions (one per UTXO)registrations: List of DustRegistration actions (empty for fee payment)
Integration with TransactionSubmitter:
val dustActions = dustActionsBuilder.buildDustActions(
transactionHex = serializedTx,
ledgerParamsHex = paramsHex,
address = userAddress,
seed = userSeed
)
// Add dustActions to Intent
val intentWithFees = intent.copy(dustActions = dustActions)Note: This implementation works directly with DustLocalState (Rust FFI), bypassing the database for fee payment. Database sync is only needed for UI display.
See also
/midnight-wallet/packages/dust-wallet/src/Transacting.ts:addFeePayment (TypeScript SDK reference)
Constructors
Types
Result of building dust actions.
Functions
Builds dust actions for transaction fee payment.
Confirms dust actions (marks coins as spent after transaction success).
Rolls back dust actions (unlocks coins after transaction failure).
Validates dust actions before submission.