@rosen-chains/cardano-koios-network
v10.0.8
Published
cardano koios network package for rosen cardano chain
Downloads
345
Readme
@rosen-chains/cardano-koio-network
Table of contents
Introduction
@rosen-chains/cardano-koios-network
is a package to be used as network api
provider for @rosen-chains/cardano
package.
Installation
npm:
npm i @rosen-chains/cardano-koios-network
yarn:
yarn add @rosen-chains/cardano-koios-network
Usage
import { CardanoChain } from '@rosen-chains/cardano';
import CardanoKoiosNetwork from '@rosen-chains/cardano-koios-network';
let tokens: RosenTokens;
const cardanoKoiosNetwork = new CardanoKoiosNetwork(
'https://api.koios.rest/api/v0', // koios api url
'lockAddress', // bridge lock address in Cardano (used in CardanoRosenExtractor)
tokens, // bridge supported tokens config, provided by `rosen-bridge/contract`
loggerFactory('KoiosNetwork') // logger (optional)
);
const height = await cardanoKoiosNetwork.getHeight();