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

x/lucid/src/mod.ts>Lucid

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
class Lucid
Re-export
import { Lucid } from "https://deno.land/x/lucid@0.5.2/src/mod.ts";

Properties

network: Network
provider: Provider
txBuilderConfig: Core.TransactionBuilderConfig
utils: Utils
wallet: Wallet

Methods

awaitTx(txHash: TxHash): Promise<boolean>
currentSlot(): Promise<Slot>
datumOf(utxo: UTxO): Promise<Datum>
fromTx(tx: Transaction)
newTx(): Tx
selectWallet(api: WalletApi)
selectWalletFrom(unnamed 0: ExternalWallet)

Emulates a CIP30 wallet by constructing it with the UTxOs, collateral and addresses.

If utxos are not set, utxos are fetched from the provided address

selectWalletFromPrivateKey(privateKey: PrivateKey)

Cardano Private key in bech32; not the BIP32 private key or any key that is not fully derived

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

Static Methods

new(provider?: Provider, network?: Network)