Spend Validator

Detailed guide on spend validators including overview, use cases, and example Anvil API interactions.

Overview

Spend validators control the conditions under which UTXOs can be spent from script addresses.

Real-world Use Cases

  • Asset Locking: Define conditions for when locked assets can be accessed

  • Multi-signature Schemes: Require approval from multiple parties

  • Time-locked Funds: Allow access only after certain time conditions

  • Conditional Payments: Release funds when specific on-chain/off-chain conditions are met

Required UTxO Fields and Deployed Blueprint

Spend Validator API Interaction Example

Use the below examples to build transactions that interact with the spend validator.

If you are unfamiliar with the Anvil API transaction builder, review the Transaction Overview guide first.

1. Locking Assets at Script Address

2. Spending (Unlocking) Locked UTxO

See Examples

https://github.com/Cardano-Forge/anvil-api/blob/main/docs/guides/hello-world-smart-contract.mdhttps://github.com/Cardano-Forge/anvil-api/blob/main/docs/guides/escrow/README.md

Last updated

Was this helpful?