Utxo

@Serializable
data class Utxo(val value: String, val owner: String, val ownerPublicKey: String? = null, val tokenType: String, val intentHash: String, val outputIndex: Int, val ctime: Long, val registeredForDustGeneration: Boolean, val transactionHash: String = "")

Unshielded UTXO (Unspent Transaction Output).

Represents an output from a transaction that can be spent. Matches Midnight SDK's WireUtxoSchema.

Constructors

Link copied to clipboard
constructor(value: String, owner: String, ownerPublicKey: String? = null, tokenType: String, intentHash: String, outputIndex: Int, ctime: Long, registeredForDustGeneration: Boolean, transactionHash: String = "")

Properties

Link copied to clipboard
val ctime: Long

Creation time (Unix timestamp in seconds)

Link copied to clipboard

Intent hash (from GraphQL, kept for reference)

Link copied to clipboard

Index of this output in the transaction

Link copied to clipboard

Address that owns this UTXO (Bech32m encoded UserAddress)

Link copied to clipboard
val ownerPublicKey: String? = null

Public key of the owner (hex-encoded, 33 bytes compressed). Null if not from our wallet.

Link copied to clipboard

Whether this UTXO is registered for dust generation

Link copied to clipboard

Token type identifier (e.g., "DUST")

Link copied to clipboard
@Transient
val transactionHash: String

Transaction hash that created this UTXO (set during sync, used for identifier)

Link copied to clipboard

Amount in smallest unit (like satoshis)

Functions

Link copied to clipboard

Unique identifier for LOCAL database storage. Format: "transactionHash:outputIndex"

Link copied to clipboard

Convert value string to BigInteger.

Link copied to clipboard

Create a copy with the transaction hash set. Called during sync when we have access to update.transaction.hash.