From 492dd348403c4c5cb70d165c5f9791b08b4dd652 Mon Sep 17 00:00:00 2001 From: fedorovdg Date: Mon, 19 Feb 2024 01:55:08 +0400 Subject: [PATCH 1/3] test: update test for create loan --- test/readme.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/readme.test.ts b/test/readme.test.ts index 84b906d..0f4b04f 100644 --- a/test/readme.test.ts +++ b/test/readme.test.ts @@ -148,6 +148,14 @@ const generalTest = async () => { console.log(await oneWayMarket.userPrices()); console.log(await oneWayMarket.userBandsBalances()); + console.log(await oneWayMarket.calcTickPrice(0)); + console.log(await oneWayMarket.calcTickPrice(1)); + console.log(await oneWayMarket.calcBandPrices(0)); + console.log(await oneWayMarket.calcBandPrices(1)); + console.log(await oneWayMarket.calcRangePct(0)); + console.log(await oneWayMarket.calcRangePct(1)); + console.log(await oneWayMarket.oraclePriceBand()); + console.log("\n--- BORROW MORE ---\n"); console.log(await oneWayMarket.borrowMoreMaxRecv(0.5)); From 0f9e61e4562d8baffa0ea30d9365db784063db6e Mon Sep 17 00:00:00 2001 From: fedorovdg Date: Mon, 19 Feb 2024 03:38:48 +0400 Subject: [PATCH 2/3] docs: add docs for creat loan methods --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 29eca64..4060cae 100644 --- a/README.md +++ b/README.md @@ -492,7 +492,21 @@ import lending from "@curvefi/lending-api"; 206: {collateral: '0.2', borrowed: '0.0'}, } // - + + await oneWayMarket.calcTickPrice(0); + //8595.062092132517715849 + await oneWayMarket.calcTickPrice(1); + //8509.111471211192538691 + await oneWayMarket.calcBandPrices(0); + //['8509.111471211192538691', '8595.062092132517715849'] + await oneWayMarket.calcBandPrices(1); + //['8424.020356499080613304', '8509.111471211192538691'] + await oneWayMarket.calcRangePct(0); + //0.000000 + await oneWayMarket.calcRangePct(1); + //1.000000 + await oneWayMarket.oraclePriceBand(); + //4 // --- BORROW MORE --- From 4d19d892d5df2089bbb5e68bc891d511f827abd5 Mon Sep 17 00:00:00 2001 From: fedorovdg Date: Mon, 19 Feb 2024 03:47:58 +0400 Subject: [PATCH 3/3] build: v0.1.1-alpha --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a73a3aa..f570de2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@curvefi/lending-api", - "version": "0.1.0-alpha", + "version": "0.1.1-alpha", "description": "JavaScript library for Curve Lending", "main": "lib/index.js", "author": "Macket",