sdk/builders/operations/Collect.ts
Collect overview
Collect operation - adds UTxOs as transaction inputs.
Added in v2.0.0
Table of contents
programs
createCollectFromProgram
Creates a ProgramStep for collectFrom operation. Adds UTxOs as transaction inputs, validates script requirements, and tracks assets.
Implementation:
- Validates that inputs array is not empty
- Checks if any inputs are script-locked (require redeemers)
- Validates redeemer is provided for script-locked UTxOs
- Adds UTxOs to state.selectedUtxos
- Tracks redeemer information for script spending (supports deferred resolution)
- Updates total input assets for balancing
RedeemerBuilder Support:
- Static: Direct Data value stored immediately
- Self: Callback stored for per-input resolution after coin selection
- Batch: Callback + input set stored for multi-input resolution
Signature
export declare const createCollectFromProgram: (
params: CollectFromParams
) => Effect.Effect<void, TransactionBuilderError, TxContext>Added in v2.0.0