Choose a provider

Select a provider and query data from the blockchain.

Provider selection

There are multiple builtin providers you can choose from in Lucid.


import { Blockfrost, Lucid } from "";

const lucid = await
  new Blockfrost(


Kupmios is a mix of Ogmios and Kupo.

import { Kupmios, Lucid } from "";

const lucid = await
  new Kupmios(


import { Lucid, Maestro } from "";

const lucid = await
  new Maestro({
    network: "Preprod",  // For MAINNET: "Mainnet".
    apiKey: "<Your-API-Key>",  // Get yours by visiting
    turboSubmit: false  // Read about paid turbo transaction submission feature at
  "Preprod", // For MAINNET: "Mainnet".


Lucid may add more providers in the future, but you also have the option to create your own custom provider that meets your specific requirements. Simply follow the provider interface to implement your custom provider.

import { Lucid } from ""

class MyProvider { ... }

const lucid = await
  new MyProvider(), "Preprod"

Query provider

Query UTxOs

const utxos = await lucid.provider.getUtxos("addr_test...");

For convenience you can also query utxos like this:

const utxos = await lucid.utxosAt("addr_test...");

Query datums

const datum = await lucid.provider.getDatum("<datum_hash>");

For convenience you can also query datums directly from utxos. When you query the datum for a UTxO, Lucid automatically adds the datum to the UTxO. This means that subsequent queries for the same UTxO will return the result instantly, without the need for an additional network request.

const [scriptUtxo] = await lucid.utxosAt("addr_test...");
const datum = await lucid.datumOf(scriptUtxo);

Query protocol parameters

const protocolParameters = await lucid.provider.getProtocolParameters();

Provider API reference
Lucid API reference