The Oikos-JS library provides a simple pre-packaged API to communicate with Oikos on Tron. You can use it to contribute to DeFi's growing synthetic asset ecosystem.
This is particularly useful for hackathon teams to quickly npm install @oikos/oikos-js
and start building in just a few minutes.
npm install @oikos/oikos-js
const { SynthetixJs } = require('@oikos/oikos-js');
const snxjs = new SynthetixJs();
(async function() {
const totalSUSD = await snxjs.sUSD.totalSupply();
const totalSUSDSupply = snxjs.utils.formatEther(totalSUSD);
console.log('sUSDTotalSupply', totalSUSDSupply);
})();