@rosen-chains/cardano-blockfrost-network
v7.0.4
Published
a package to be used as network api provider for @rosen-chains/cardano package
Downloads
508
Readme
@rosen-chains/cardano-blockfrost-network
Table of contents
Introduction
@rosen-chains/cardano-blockfrost-network
is a package to be used as network api provider for @rosen-chains/cardano
package
Installation
npm:
npm i @rosen-chains/cardano-blockfrost-network
yarn:
yarn add @rosen-chains/cardano-blockfrost-network
Usage
import { CardanoChain } from '@rosen-chains/cardano';
import CardanoBlockFrostNetwork from '@rosen-chains/cardano-blockfrost-network';
let tokens: RosenTokens;
const cardanoBlockFrostNetwork = new CardanoBlockFrostNetwork(
'PROJECT_ID', // blockFrost project id
'lockAddress', // bridge lock address in Cardano (used in CardanoRosenExtractor)
tokens, // bridge supported tokens config, provided by `rosen-bridge/contract`
undefined // backend url, uses main blockFrost backend if no url is passed
);
const height = await cardanoBlockFrostNetwork.getHeight();