Common Queries
By abstracting away the provider calls, Evolution-SDK library provides different methods to query on-chain data.
UTxOs
UTxOs (Unspent Transaction Outputs) are building blocks of Cardano’s eUTxO model. A nuance from account-based models is that your wallet’s balance is the sum of all UTxOs at your address.
Convenient method
UTxOs can be queried conveniently through a Lucid object:
const utxos = await lucid.utxosAt("addr_test...");
Datums
Datums are pieces of data attached to UTxOs.
Convenient method
Datum can be queried conveniently through a Lucid object by providing its hash:
const datum = await lucid.datumOf("<datum_hash>");
Protocol Parameters
Protocol parameters define the rules and constraints of the Cardano network like transaction fees, maximum block size, maximum transaction size, Plutus execution costs, minimum UTxO ADA value, etc.
const protocolParameters = await lucid.provider.getProtocolParameters();
Remember that you can switch providers using the switchProvider
method if
needed.