odinprotocoljs
v1.0.2
Published
Typescript Protobuf Messages for Odin
Downloads
4
Readme
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)