@curvefi/api 2.22.0 → 2.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1020,8 +1020,10 @@ import curve from "@curvefi/api";
1020
1020
  // ]
1021
1021
  const swapTx = await curve.router.swap('DAI', 'CRV', '1000');
1022
1022
  // OR const swapTx = await curve.router.swap('0x6B175474E89094C44Da98b954EedeAC495271d0F', '0xD533a949740bb3306d119CC777fa900bA034cd52', '1000');
1023
- console.log(swapTx);
1023
+ console.log(swapTx.hash);
1024
1024
  // 0xc7ba1d60871c0295ac5471bb602c37ec0f00a71543b3a041308ebd91833f26ba
1025
+ const swappedAmount = await curve.router.getSwappedAmount(swapTx, 'CRV');
1026
+ // 1573.668171170839785062
1025
1027
 
1026
1028
  await curve.getBalances(['DAI', 'CRV']);
1027
1029
  // [ '8900.0', '100428.626463428100672494' ]