venusprotocol / venus-js Goto Github PK
View Code? Open in Web Editor NEWVenus Protocol JavaScript SDK
License: BSD 3-Clause "New" or "Revised" License
Venus Protocol JavaScript SDK
License: BSD 3-Clause "New" or "Revised" License
It's using outdated URLs, I'm trying to use it to fetch my borrow limit usage, but it gives a 404 error.
Mainnet API has changed URLs, but even if I update the base api url it still doesn't work, is this lib deprecated? Is there a new one?
The installation instructions reported in the README file should match the package name at npmjs
Hi,
When I call the redeem method (redeem underlying) to redeem the max balance it seems that very small amount of vTokens still stay in the venus protocol. I think that this amount is the interest rate generated from the last block after I called the redeem method.
How can I redeem tokens incl. the interest so that the vToken amount is 0?
example:
On the main site app.venus.io the redeem (withdraw) function works perfectly.
Thank you.
`const Venus = require('@swipewallet/venus-js');
let main = async function () {
let venus = new Venus('https://bsc-dataseed1.binance.org',{privateKey});
console.log('Supplying usdt to the Venus Protocol...');
const trxOptions = {gasPrice: 5, gasLimit: 40000, mantissa: false};
const trx = await venus.supply(Venus.USDT, 5, true, trxOptions);
console.log('Ethers.js transaction object', trx);
}`
TypeError: Cannot read properties of undefined (reading 'vUSDT') at Object.<anonymous> (/Users/buyu/Documents/BlockChainDemo/node_modules/@swipewallet/venus-js/src/vToken.ts:60:52) at step (/Users/buyu/Documents/BlockChainDemo/node_modules/@swipewallet/venus-js/dist/nodejs/vToken.js:49:23) at Object.next (/Users/buyu/Documents/BlockChainDemo/node_modules/@swipewallet/venus-js/dist/nodejs/vToken.js:30:53) at fulfilled (/Users/buyu/Documents/BlockChainDemo/node_modules/@swipewallet/venus-js/dist/nodejs/vToken.js:21:58) at processTicksAndRejections (node:internal/process/task_queues:96:5)
I can't find code error ,help me!
This version is still outdated 0.0.4 on the npm repository (https://www.npmjs.com/package/@swipewallet/venus-js)
0.0.4 Using the old hostname will cause an error
Please keep updated
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.