Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/lucid/src/types/mod.ts>Provider

Lucid is a library, which allows you to create Cardano transactions and off-chain code for your Plutus contracts in JavaScript, Deno and Node.js.
Go to Latest
interface Provider
import { type Provider } from "https://deno.land/x/lucid@0.7.8/src/types/mod.ts";

Methods

getProtocolParameters(): Promise<ProtocolParameters>
getUtxos(address: Address): Promise<UTxO[]>

Query UTxOs by the payment credential of the address

getUtxosWithUnit(address: Address, unit: Unit): Promise<UTxO[]>

Query UTxOs by the payment credential of the address filtered by a specific unit.

getUtxoByUnit(unit: Unit): Promise<UTxO>

Query a UTxO by a unit. It needs to be an NFT (or optionally the entire supply in one UTxO).

getUtxosByOutRef(outRefs: Array<OutRef>): Promise<UTxO[]>

Query UTxOs by the output reference (tx hash and index).

getDelegation(rewardAddress: RewardAddress): Promise<Delegation>
getDatum(datumHash: DatumHash): Promise<Datum>
awaitTx(txHash: TxHash): Promise<boolean>
submitTx(tx: Transaction): Promise<TxHash>