weft-radix-test
v0.0.0
Published
This to toolkit provide utility function to help front end integration
Downloads
3
Readme
@weft-finance/toolkit
This to toolkit provide utility function to help front end integration
how to use this sdk ?
import {LendingMarket, LendingPool} from "sdk-js-weft";
let lendingMarketComponentAddress : string = 'component_tdx_c_1qwcex9zrwe06h4yxu6387wptjemj7fx0qhk0wcdkrgksqw43qj';
let cdp_resource_address : string = 'resource_tdx_c_1qt9z66swx9xtjrdt58w5cjfqycqnrh3qtkceqlake0hss96chh';
//instantiate lending market
let lendingMarket = new LendingMarket(lendingMarketComponentAddress,cdp_resource_address);
// load lending market Data
await lendingMarket.load();
// you can now access for example to lendingPools information
let pools = lendingMarket.lending_pools;
for (const poolComponentAddress in pools) {
let lendingPool = pools[poolComponentAddress];
// TODO
}