UtxoSpend
data class UtxoSpend(val intentHash: String, val outputNo: Int, val value: BigInteger, val owner: String, val ownerPublicKey: String, val tokenType: String)
Represents a UTXO being spent (input) in an unshielded transaction.
Source: Based on midnight-ledger UtxoSpend structure File: midnight-ledger/ledger/src/structure.rs
Purpose:
References an existing UTXO by intentHash and outputNo
Specifies the owner address (for signature verification)
Includes value and token type for balancing
CRITICAL: The blockchain identifies UTXOs by intentHash + outputNo.
Usage in Transaction:
val input = UtxoSpend(
intentHash = "87eb8bd03bfb2cd7...", // Intent hash from indexer
outputNo = 0,
value = BigInteger("1000000"), // 1.0 NIGHT
owner = "mn_addr_undeployed1...",
tokenType = "0000...000" // NIGHT token
)Content copied to clipboard