Kupmios
Usage example to initialize Lucid with Kupmios:
import { Lucid, Kupmios } from "@lucid-evolution/lucid";
const lucid = await Lucid(
new Kupmios(
"http://localhost:1442", // Kupo endpoint
"http://localhost:1337", // Ogmios endpoint
),
"Preview",
);If you have API keys
const lucid = await Lucid(
new Kupmios("http://localhost:1442", "http://localhost:1337", {
kupoHeader: { "priv-api-key": "<kupo-api-key>" }, // for example: "dmtr-api-key": "<kupo-api-key>"
ogmiosHeader: { "priv-api-key": "<ogmios-api-key>" },
}),
"Preview",
);Kupmios is a mix of Ogmios (opens in a new tab) and Kupo (opens in a new tab).
Kupmios exposes structured KupmiosError and OgmiosJsonRpcError instances.
Callers can inspect the operation, protocol, HTTP status, retryability,
retryAfterMs, JSON-RPC code and data, and the original cause without parsing
formatted error strings.
Transaction confirmation queries intentionally do not use Kupo's unspent
filter. A confirmed transaction remains confirmed when one of its outputs is
spent shortly after inclusion.