UtxoQuery

scalus.cardano.node.UtxoQuery
See theUtxoQuery companion trait
object UtxoQuery

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
UtxoQuery.type

Members list

Type members

Classlikes

case class Or(left: UtxoQuery, right: UtxoQuery, limit: Option[Int] = ..., offset: Option[Int] = ..., minRequiredTotalAmount: Option[Coin] = ...) extends UtxoQuery

Combine two queries - each is evaluated with its own filters, results are merged.

Combine two queries - each is evaluated with its own filters, results are merged.

Value parameters

left

First query

limit

Maximum number of results to return from combined result

minRequiredTotalAmount

Early termination: stop when accumulated lovelace reaches this amount

offset

Number of results to skip from combined result

right

Second query

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait UtxoQuery
class Object
trait Matchable
class Any
Show all
case class Simple(source: UtxoSource, filter: Option[UtxoFilter] = ..., limit: Option[Int] = ..., offset: Option[Int] = ..., minRequiredTotalAmount: Option[Coin] = ...) extends UtxoQuery

A simple query with source, optional filter, and pagination.

A simple query with source, optional filter, and pagination.

Value parameters

filter

Optional refinement conditions

limit

Maximum number of results to return

minRequiredTotalAmount

Early termination: stop when accumulated lovelace reaches this amount

offset

Number of results to skip (for pagination)

source

Where to look for UTxOs (required)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait UtxoQuery
class Object
trait Matchable
class Any
Show all

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply(source: UtxoSource): Simple

Create a simple query from a source

Create a simple query from a source

Attributes

def applyPagination(candidates: Utxos, limit: Option[Int], offset: Option[Int], minRequiredTotalAmount: Option[Coin]): Utxos

Apply pagination and minTotal early termination to a result set

Apply pagination and minTotal early termination to a result set

Value parameters

candidates

The UTxOs to paginate

limit

Maximum number of results

minRequiredTotalAmount

Stop when accumulated lovelace reaches this amount

offset

Number of results to skip

Attributes

Returns

The paginated UTxOs

def evalFilter(filter: UtxoFilter, utxo: (TransactionInput, TransactionOutput)): Boolean

Evaluate a filter against a UTxO

Evaluate a filter against a UTxO

Value parameters

filter

The filter to evaluate

utxo

The UTxO (input, output) pair to test

Attributes

Returns

true if the UTxO matches the filter

def propagate(q: UtxoQuery, limit: Option[Int], minTotal: Option[Coin]): UtxoQuery

Propagate limit and minTotal to a subquery for early termination

Propagate limit and minTotal to a subquery for early termination

Value parameters

limit

Optional limit to propagate

minTotal

Optional minTotal to propagate

q

The query to propagate to

Attributes

Returns

The query with propagated values

Givens

Givens

Implicit conversion from UtxoSource to UtxoQuery for convenience

Implicit conversion from UtxoSource to UtxoQuery for convenience

Attributes