Static
Readonly
confirmationStatic
Readonly
plutusAwaits confirmation of a transaction.
ID of the transaction to await confirmation for.
Optional timeout in milliseconds.
A promise that resolves to a boolean indicating confirmation status.
Gets the protocol parameters from the blockchain.
A promise that resolves to the protocol parameters.
Get the slot config, which describes how to translate between slots and unix timestamps TODO: this is brittle; in theory this should work with the era histories; also, networkName is awkward
Gets unspent outputs containing a specific asset.
Address to fetch unspent outputs for.
Asset ID to filter by.
A promise that resolves to an array of unspent outputs.
Resolves the script deployment by finding a UTxO containing the script reference.
The script or its hash to resolve.
Optional
address: Address = ...The address to search for the script deployment. Defaults to a burn address.
This is a default implementation that works but may not be optimal. Subclasses of Provider should implement their own version for better performance.
The method searches for a UTxO at the given address (or a burn address by default) that contains a script reference matching the provided script or script hash.
const scriptUtxo = await provider.resolveScriptRef(myScript);
if (scriptUtxo) {
console.log("Script found in UTxO:", scriptUtxo.input().toCore());
} else {
console.log("Script not found");
}
Static
serialize
Abstract class for the Provider. This class provides an interface for interacting with the blockchain.