1.0.2 • Published 1 year ago

odinprotocoljs v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Install

npm install odinjs

Usage

First you need to import the odin client and connect it to your RPC. Then you can call the methods of the client.

All methods for Odin Client are defined in the interface extension types/generated/odin/odinExtension.ts

RPC Clients

import { odinQueryClient } from "../src/odinClient";

const config_rpc = "https://node.odin-freya-website.odinprotocol.io/mainnet/a/"

const myOdinClient = new odinQueryClient()
await myOdinClient.connect(config_rpc);

const dataSource = await myOdinClient.queryClient.oracle.getDataSourceById(14)
console.log(dataSource)