UTxO.ts
UTxO overview
Table of contents
combinators
add
Add a UTxO to the set.
Signature
export declare const add: (set: UTxOSet, utxo: UTxO) => UTxOSetAdded in v2.0.0
difference
Difference of two UTxO sets (elements in a but not in b).
Signature
export declare const difference: (a: UTxOSet, b: UTxOSet) => UTxOSetAdded in v2.0.0
filter
Filter UTxOs in the set by predicate.
Signature
export declare const filter: (set: UTxOSet, predicate: (utxo: UTxO) => boolean) => UTxOSetAdded in v2.0.0
intersection
Intersection of two UTxO sets.
Signature
export declare const intersection: (a: UTxOSet, b: UTxOSet) => UTxOSetAdded in v2.0.0
remove
Remove a UTxO from the set.
Signature
export declare const remove: (set: UTxOSet, utxo: UTxO) => UTxOSetAdded in v2.0.0
union
Union of two UTxO sets.
Signature
export declare const union: (a: UTxOSet, b: UTxOSet) => UTxOSetAdded in v2.0.0
constructors
empty
Create an empty UTxO set.
Signature
export declare const empty: () => UTxOSetAdded in v2.0.0
fromIterable
Create a UTxO set from an iterable of UTxOs.
Signature
export declare const fromIterable: (utxos: Iterable<UTxO>) => UTxOSetAdded in v2.0.0
conversions
toArray
Convert a UTxO set to an array.
Signature
export declare const toArray: (set: UTxOSet) => Array<UTxO>Added in v2.0.0
getters
size
Get the number of UTxOs in the set.
Signature
export declare const size: (set: UTxOSet) => numberAdded in v2.0.0
toOutRefString
Get the output reference string for a UTxO (txHash#index format).
Signature
export declare const toOutRefString: (utxo: UTxO) => stringAdded in v2.0.0
model
UTxO (class)
UTxO (Unspent Transaction Output) - A transaction output with its on-chain reference.
Combines TransactionOutput with the transaction reference (transactionId + index) that uniquely identifies it on the blockchain.
Signature
export declare class UTxOAdded in v2.0.0
toJSON (method)
Signature
toJSON()toString (method)
Signature
toString(): string[Equal.symbol] (method)
Signature
[Equal.symbol](that: unknown): boolean[Hash.symbol] (method)
Signature
[Hash.symbol](): numbermodels
UTxOSet (type alias)
A set of UTxOs with efficient lookups and set operations. Uses Effect's HashSet for automatic deduplication via Hash protocol.
Signature
export type UTxOSet = HashSet.HashSet<UTxO>Added in v2.0.0
predicates
has
Check if a UTxO exists in the set.
Signature
export declare const has: (set: UTxOSet, utxo: UTxO) => booleanAdded in v2.0.0
isEmpty
Check if the set is empty.
Signature
export declare const isEmpty: (set: UTxOSet) => booleanAdded in v2.0.0
isUTxO
Check if the given value is a valid UTxO.
Signature
export declare const isUTxO: (u: unknown, overrideOptions?: ParseOptions | number) => u is UTxOAdded in v2.0.0