sdk/provider/Blockfrost.ts
Blockfrost overview
Table of contents
constructors
BlockfrostProvider (class)
Blockfrost provider for Cardano blockchain data access. Supports both mainnet and testnet networks with project-based authentication. Implements rate limiting to respect Blockfrost API limits.
Signature
export declare class BlockfrostProvider {
constructor(baseUrl: string, projectId?: string)
}Added in v2.0.0
Effect (property)
Signature
readonly Effect: ProviderEffectbaseUrl (property)
Signature
readonly baseUrl: stringprojectId (property)
Signature
readonly projectId: string | undefinedgetProtocolParameters (property)
Signature
getProtocolParameters: () => Promise<ProtocolParameters>getUtxos (property)
Signature
getUtxos: (addressOrCredential: Parameters<Provider["getUtxos"]>[0]) => Promise<UTxO[]>getUtxosWithUnit (property)
Signature
getUtxosWithUnit: (
addressOrCredential: Parameters<Provider["getUtxosWithUnit"]>[0],
unit: Parameters<Provider["getUtxosWithUnit"]>[1]
) => Promise<UTxO[]>getUtxoByUnit (property)
Signature
getUtxoByUnit: (unit: Parameters<Provider["getUtxoByUnit"]>[0]) => Promise<UTxO>getUtxosByOutRef (property)
Signature
getUtxosByOutRef: (outRefs: Parameters<Provider["getUtxosByOutRef"]>[0]) => Promise<UTxO[]>getDelegation (property)
Signature
getDelegation: (rewardAddress: Parameters<Provider["getDelegation"]>[0]) => Promise<Delegation>getDatum (property)
Signature
getDatum: (datumHash: Parameters<Provider["getDatum"]>[0]) => Promise<Data>awaitTx (property)
Signature
awaitTx: (
txHash: Parameters<Provider["awaitTx"]>[0],
checkInterval?: Parameters<Provider["awaitTx"]>[1],
timeout?: Parameters<Provider["awaitTx"]>[2]
) => Promise<boolean>submitTx (property)
Signature
submitTx: (cbor: Parameters<Provider["submitTx"]>[0]) => Promise<TransactionHash>evaluateTx (property)
Signature
evaluateTx: (tx: Parameters<Provider["evaluateTx"]>[0], additionalUTxOs?: Parameters<Provider["evaluateTx"]>[1]) =>
Promise<EvalRedeemer[]>custom
Create a custom Blockfrost provider with custom base URL.
Signature
export declare const custom: (baseUrl: string, projectId?: string) => BlockfrostProviderAdded in v2.0.0
mainnet
Pre-configured Blockfrost provider for Cardano mainnet.
Signature
export declare const mainnet: (projectId: string) => BlockfrostProviderAdded in v2.0.0
preprod
Pre-configured Blockfrost provider for Cardano preprod testnet.
Signature
export declare const preprod: (projectId: string) => BlockfrostProviderAdded in v2.0.0
preview
Pre-configured Blockfrost provider for Cardano preview testnet.
Signature
export declare const preview: (projectId: string) => BlockfrostProviderAdded in v2.0.0