Helios API/ API Reference/ Classes/
BlockfrostV0
Blockfrost specific implementation of Network
.
Implements
Implements
Index
Constructors
constructor
• new BlockfrostV0(networkName
, projectId
)
Constructs a BlockfrostV0 using the network name (preview, preprod or mainnet) and your Blockfrost project_id
.
Parameters
Name | Type |
---|---|
networkName | "preview" | "preprod" | "mainnet" |
projectId | string |
Accessors
networkName
• get
networkName(): string
Returns
string
Methods
dumpMempool
▸ dumpMempool(): Promise
<void
>
Allows inspecting the live Blockfrost mempool.
Returns
Promise
<void
>
getLatestEpoch
▸ getLatestEpoch(): Promise
<any
>
Returns
Promise
<any
>
getParameters
▸ getParameters(): Promise
<NetworkParams
>
Returns
Promise
<NetworkParams
>
Implementation of
getUtxo
▸ getUtxo(id
): Promise
<TxInput
>
If the UTxO isn't found an error is throw with the following message format: "UTxO <txId.utxoId> not found".
Parameters
Name | Type |
---|---|
id | TxOutputId |
Returns
Promise
<TxInput
>
Implementation of
getUtxos
▸ getUtxos(address
): Promise
<TxInput
[]>
Gets a complete list of UTxOs at a given Address
.
Returns oldest UTxOs first, newest last.
Parameters
Name | Type |
---|---|
address | Address |
Returns
Promise
<TxInput
[]>
Implementation of
hasUtxo
▸ hasUtxo(utxo
): Promise
<boolean
>
Used by BlockfrostV0.resolve()
.
Parameters
Name | Type |
---|---|
utxo | TxInput |
Returns
Promise
<boolean
>
submitTx
▸ submitTx(tx
): Promise
<TxId
>
Submits a transaction to the blockchain.
Parameters
Name | Type |
---|---|
tx | Tx |
Returns
Promise
<TxId
>
Implementation of
resolve
▸ Static
resolve(utxoOrWallet
, projectIds
): Promise
<BlockfrostV0
>
Connects to the same network a given Wallet
or the given TxInput
(preview, preprod or mainnet).
Throws an error if a Blockfrost project_id is missing for that specific network.
Parameters
Name | Type |
---|---|
utxoOrWallet | TxInput | Wallet |
projectIds | Object |
projectIds.mainnet? | string |
projectIds.preprod? | string |
projectIds.preview? | string |
Returns
Promise
<BlockfrostV0
>
resolveUsingUtxo
▸ Static
resolveUsingUtxo(refUtxo
, projectIds
): Promise
<BlockfrostV0
>
Throws an error if a Blockfrost project_id is missing for that specific network.
Parameters
Name | Type |
---|---|
refUtxo | TxInput |
projectIds | Object |
projectIds.mainnet? | string |
projectIds.preprod? | string |
projectIds.preview? | string |
Returns
Promise
<BlockfrostV0
>
resolveUsingWallet
▸ Static
resolveUsingWallet(wallet
, projectIds
): Promise
<BlockfrostV0
>
Connects to the same network a given Wallet
is connected to (preview, preprod or mainnet).
Throws an error if a Blockfrost project_id is missing for that specific network.
Parameters
Name | Type |
---|---|
wallet | Wallet |
projectIds | Object |
projectIds.mainnet? | string |
projectIds.preprod? | string |
projectIds.preview? | string |
Returns
Promise
<BlockfrostV0
>