Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vires.finance/dapp

Package Overview
Dependencies
Maintainers
3
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vires.finance/dapp - npm Package Compare versions

Comparing version 0.0.61 to 0.0.62

7

dappReadV2/advise.d.ts
import fetch from 'node-fetch';
declare type reserveOptionalFields = {
interestReserveRatio?: string;
};
export declare type getReservesSummaryParams = {

@@ -9,3 +12,3 @@ nodeApi: string;

export declare const advise: ({ nodeApi, evaluator, main, _fetch }: getReservesSummaryParams) => Promise<{
reserves: Record<"assetId" | "price" | "aTokenId" | "ABCD" | "reserveFactor" | "collateralFactor" | "liquidationThreshold" | "liquidationPenalty" | "currentTotalDeposit" | "storedTotalDeposit" | "currentTotalDebt" | "storedTotalDebt" | "currentTotalReserve" | "storedTotalReserve" | "currentIndex" | "storedIndex" | "lastUpdateHeight" | "utilization" | "aTokenCirculation" | "aTokenPrice" | "APR" | "APY", string>[];
reserves: (Record<"assetId" | "price" | "aTokenId" | "ABCD" | "reserveFactor" | "collateralFactor" | "liquidationThreshold" | "liquidationPenalty" | "currentTotalDeposit" | "storedTotalDeposit" | "currentTotalDebt" | "storedTotalDebt" | "currentTotalReserve" | "storedTotalReserve" | "currentIndex" | "storedIndex" | "lastUpdateHeight" | "utilization" | "aTokenCirculation" | "aTokenPrice" | "APR" | "APY", string> & reserveOptionalFields)[];
height: string;

@@ -15,2 +18,4 @@ accountHealthThreshold: string;

collapsePenalty: string;
wavesLeasing?: string | undefined;
}>;
export {};

8

dappReadV2/advise.js

@@ -93,5 +93,9 @@ "use strict";

.split('['), globalData = _a[0], reservesData = _a.slice(1);
return __assign(__assign({}, parseAndValidate_1.parseAndValidate(globalData, globalFields)), { reserves: reservesData.map(function (x) {
console.log({
globalData: globalData,
r: reservesData[0],
});
return __assign(__assign({}, parseAndValidate_1.parseAndValidate()(globalData, globalFields)), { reserves: reservesData.map(function (x) {
return x.replace(']', '');
}).map(function (x) { return parseAndValidate_1.parseAndValidate(x, reserveFields); }) });
}).map(function (x) { return parseAndValidate_1.parseAndValidate()(x, reserveFields); }) });
};

@@ -98,0 +102,0 @@ var advise = function (_a) {

@@ -83,5 +83,5 @@ "use strict";

.split('['), globalData = _a[0], reservesData = _a.slice(1);
return __assign(__assign({}, parseAndValidate_1.parseAndValidate(globalData, globalFields)), { reserves: reservesData.map(function (x) {
return __assign(__assign({}, parseAndValidate_1.parseAndValidate()(globalData, globalFields)), { reserves: reservesData.map(function (x) {
return x.replace(']', '');
}).map(function (x) { return parseAndValidate_1.parseAndValidate(x, reserveFields); }) });
}).map(function (x) { return parseAndValidate_1.parseAndValidate()(x, reserveFields); }) });
};

@@ -88,0 +88,0 @@ var adviseUser = function (_a) {

@@ -10,3 +10,5 @@ import fetch from 'node-fetch';

advise: () => Promise<{
reserves: Record<"assetId" | "price" | "aTokenId" | "ABCD" | "reserveFactor" | "collateralFactor" | "liquidationThreshold" | "liquidationPenalty" | "currentTotalDeposit" | "storedTotalDeposit" | "currentTotalDebt" | "storedTotalDebt" | "currentTotalReserve" | "storedTotalReserve" | "currentIndex" | "storedIndex" | "lastUpdateHeight" | "utilization" | "aTokenCirculation" | "aTokenPrice" | "APR" | "APY", string>[];
reserves: (Record<"assetId" | "price" | "aTokenId" | "ABCD" | "reserveFactor" | "collateralFactor" | "liquidationThreshold" | "liquidationPenalty" | "currentTotalDeposit" | "storedTotalDeposit" | "currentTotalDebt" | "storedTotalDebt" | "currentTotalReserve" | "storedTotalReserve" | "currentIndex" | "storedIndex" | "lastUpdateHeight" | "utilization" | "aTokenCirculation" | "aTokenPrice" | "APR" | "APY", string> & {
interestReserveRatio?: string | undefined;
})[];
height: string;

@@ -16,2 +18,3 @@ accountHealthThreshold: string;

collapsePenalty: string;
wavesLeasing?: string | undefined;
}>;

@@ -18,0 +21,0 @@ adviseUser: (userAddress: string) => Promise<{

@@ -1,1 +0,1 @@

export declare const parseAndValidate: <TProps extends readonly string[]>(data: string, props: TProps) => Record<TProps[number], string>;
export declare const parseAndValidate: <TOptionalProps = {}>() => <TProps extends readonly string[]>(data: string, props: TProps) => Record<TProps[number], string> & TOptionalProps;

@@ -15,3 +15,3 @@ "use strict";

exports.parseAndValidate = void 0;
var parseAndValidate = function (data, props) {
var parseAndValidate = function () { return function (data, props) {
var result = data.split(',').map(function (x) { return x.split(':'); })

@@ -27,4 +27,4 @@ .reduce(function (map, _a) {

return result;
};
}; };
exports.parseAndValidate = parseAndValidate;
//# sourceMappingURL=parseAndValidate.js.map
{
"name": "@vires.finance/dapp",
"version": "0.0.61",
"version": "0.0.62",
"description": "vires.finance smart contract interactions",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc