Evolution SDK
Advanced

Performance

Optimize transaction building and UTxO management

Performance

Evolution SDK provides several configuration options to optimize transaction building for different use cases.

Coin Selection Algorithms

AlgorithmStrategyStatus
"largest-first"Select largest UTxOs first, fewer inputsAvailable
"random-improve"Random selection with improvementPlanned
Custom functionYour own selection logicAvailable

The default algorithm is "largest-first". You can also provide a custom coin selection function:

import { , ,  } from "@evolution-sdk/evolution"

const  = ({
  : "preprod",
  : { : "blockfrost", : "https://cardano-preprod.blockfrost.io/api/v0", : ..! },
  : { : "seed", : ..!, : 0 }
})

const  = await 
  .()
  .({
    : .("addr_test1qz2fxv2umyhttkxyxp8x0dlpdt3k6cwng5pxj3jhsydzer3n0d3vllmyqwsx5wktcd8cc3sq835lu7drv2xwl2wywfgs68faae"),
    : .(2_000_000n)
  })
  .({ : "largest-first" })

UTxO Optimization (Unfrack)

The unfrack option optimizes your wallet's UTxO structure during transaction building:

import { , ,  } from "@evolution-sdk/evolution"

const  = ({
  : "preprod",
  : { : "blockfrost", : "https://cardano-preprod.blockfrost.io/api/v0", : ..! },
  : { : "seed", : ..!, : 0 }
})

const  = await 
  .()
  .({
    : .("addr_test1vrm9x2dgvdau8vckj4duc89m638t8djmluqw5pdrFollw8qd9k63"),
    : .(2_000_000n)
  })
  .({
    : {
      : { /* token bundling options */ },
      : { /* ADA consolidation/subdivision options */ }
    }
  })

Debug Mode

Enable debug logging to inspect the build process:

.build({ debug: true })

This logs progress and state at each build phase, helping diagnose issues with coin selection, balancing, and script evaluation.

Next Steps