@agether/sdk 2.18.1 → 2.18.2
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/dist/cli.js +9 -5
- package/dist/index.js +9 -5
- package/dist/index.mjs +9 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -600,7 +600,7 @@ var init_MorphoClient = __esm({
|
|
|
600
600
|
init_retry();
|
|
601
601
|
init_types();
|
|
602
602
|
init_abis();
|
|
603
|
-
MORPHO_API_URL = "https://api.morpho.org/graphql";
|
|
603
|
+
MORPHO_API_URL = "https://blue-api.morpho.org/graphql";
|
|
604
604
|
morphoIface = new import_ethers2.ethers.Interface(MORPHO_BLUE_ABI);
|
|
605
605
|
erc20Iface = new import_ethers2.ethers.Interface(ERC20_ABI);
|
|
606
606
|
MorphoClient = class _MorphoClient extends AgentAccountClient {
|
|
@@ -648,7 +648,7 @@ var init_MorphoClient = __esm({
|
|
|
648
648
|
first: 500
|
|
649
649
|
orderBy: SupplyAssetsUsd
|
|
650
650
|
orderDirection: Desc
|
|
651
|
-
where: { chainId_in: [${chainId}] }
|
|
651
|
+
where: { chainId_in: [${chainId}], whitelisted: true }
|
|
652
652
|
) {
|
|
653
653
|
items {
|
|
654
654
|
uniqueKey
|
|
@@ -1057,7 +1057,7 @@ var init_MorphoClient = __esm({
|
|
|
1057
1057
|
first: 100
|
|
1058
1058
|
orderBy: SupplyAssetsUsd
|
|
1059
1059
|
orderDirection: Desc
|
|
1060
|
-
where: { chainId_in: [${chainId}]${loanFilter}${collateralFilter}${searchClause} }
|
|
1060
|
+
where: { chainId_in: [${chainId}], whitelisted: true${loanFilter}${collateralFilter}${searchClause} }
|
|
1061
1061
|
) {
|
|
1062
1062
|
items {
|
|
1063
1063
|
uniqueKey
|
|
@@ -1067,6 +1067,8 @@ var init_MorphoClient = __esm({
|
|
|
1067
1067
|
state {
|
|
1068
1068
|
borrowAssets
|
|
1069
1069
|
supplyAssets
|
|
1070
|
+
supplyAssetsUsd
|
|
1071
|
+
borrowAssetsUsd
|
|
1070
1072
|
utilization
|
|
1071
1073
|
supplyApy
|
|
1072
1074
|
borrowApy
|
|
@@ -1097,8 +1099,8 @@ var init_MorphoClient = __esm({
|
|
|
1097
1099
|
supplyApy: m.state?.supplyApy ? Number(m.state.supplyApy) : 0,
|
|
1098
1100
|
borrowApy: m.state?.borrowApy ? Number(m.state.borrowApy) : 0,
|
|
1099
1101
|
utilization: m.state?.utilization ? Number(m.state.utilization) : 0,
|
|
1100
|
-
totalSupplyUsd: m.state?.supplyAssets ? Number(m.state.supplyAssets) / 10 ** loanDecimals : 0,
|
|
1101
|
-
totalBorrowUsd: m.state?.borrowAssets ? Number(m.state.borrowAssets) / 10 ** loanDecimals : 0,
|
|
1102
|
+
totalSupplyUsd: m.state?.supplyAssetsUsd ? Number(m.state.supplyAssetsUsd) : m.state?.supplyAssets ? Number(m.state.supplyAssets) / 10 ** loanDecimals : 0,
|
|
1103
|
+
totalBorrowUsd: m.state?.borrowAssetsUsd ? Number(m.state.borrowAssetsUsd) : m.state?.borrowAssets ? Number(m.state.borrowAssets) / 10 ** loanDecimals : 0,
|
|
1102
1104
|
lltv: `${(Number(m.lltv) / 1e16).toFixed(0)}%`,
|
|
1103
1105
|
marketId: m.uniqueKey
|
|
1104
1106
|
};
|
|
@@ -1136,6 +1138,8 @@ var init_MorphoClient = __esm({
|
|
|
1136
1138
|
state {
|
|
1137
1139
|
borrowAssets
|
|
1138
1140
|
supplyAssets
|
|
1141
|
+
supplyAssetsUsd
|
|
1142
|
+
borrowAssetsUsd
|
|
1139
1143
|
utilization
|
|
1140
1144
|
supplyApy
|
|
1141
1145
|
borrowApy
|
package/dist/index.js
CHANGED
|
@@ -1570,7 +1570,7 @@ async function withRetry(fn, options = {}) {
|
|
|
1570
1570
|
}
|
|
1571
1571
|
|
|
1572
1572
|
// src/clients/MorphoClient.ts
|
|
1573
|
-
var MORPHO_API_URL2 = "https://api.morpho.org/graphql";
|
|
1573
|
+
var MORPHO_API_URL2 = "https://blue-api.morpho.org/graphql";
|
|
1574
1574
|
var morphoIface = new import_ethers3.ethers.Interface(MORPHO_BLUE_ABI);
|
|
1575
1575
|
var erc20Iface2 = new import_ethers3.ethers.Interface(ERC20_ABI);
|
|
1576
1576
|
var _MorphoClient = class _MorphoClient extends AgentAccountClient {
|
|
@@ -1618,7 +1618,7 @@ var _MorphoClient = class _MorphoClient extends AgentAccountClient {
|
|
|
1618
1618
|
first: 500
|
|
1619
1619
|
orderBy: SupplyAssetsUsd
|
|
1620
1620
|
orderDirection: Desc
|
|
1621
|
-
where: { chainId_in: [${chainId}] }
|
|
1621
|
+
where: { chainId_in: [${chainId}], whitelisted: true }
|
|
1622
1622
|
) {
|
|
1623
1623
|
items {
|
|
1624
1624
|
uniqueKey
|
|
@@ -2027,7 +2027,7 @@ var _MorphoClient = class _MorphoClient extends AgentAccountClient {
|
|
|
2027
2027
|
first: 100
|
|
2028
2028
|
orderBy: SupplyAssetsUsd
|
|
2029
2029
|
orderDirection: Desc
|
|
2030
|
-
where: { chainId_in: [${chainId}]${loanFilter}${collateralFilter}${searchClause} }
|
|
2030
|
+
where: { chainId_in: [${chainId}], whitelisted: true${loanFilter}${collateralFilter}${searchClause} }
|
|
2031
2031
|
) {
|
|
2032
2032
|
items {
|
|
2033
2033
|
uniqueKey
|
|
@@ -2037,6 +2037,8 @@ var _MorphoClient = class _MorphoClient extends AgentAccountClient {
|
|
|
2037
2037
|
state {
|
|
2038
2038
|
borrowAssets
|
|
2039
2039
|
supplyAssets
|
|
2040
|
+
supplyAssetsUsd
|
|
2041
|
+
borrowAssetsUsd
|
|
2040
2042
|
utilization
|
|
2041
2043
|
supplyApy
|
|
2042
2044
|
borrowApy
|
|
@@ -2067,8 +2069,8 @@ var _MorphoClient = class _MorphoClient extends AgentAccountClient {
|
|
|
2067
2069
|
supplyApy: m.state?.supplyApy ? Number(m.state.supplyApy) : 0,
|
|
2068
2070
|
borrowApy: m.state?.borrowApy ? Number(m.state.borrowApy) : 0,
|
|
2069
2071
|
utilization: m.state?.utilization ? Number(m.state.utilization) : 0,
|
|
2070
|
-
totalSupplyUsd: m.state?.supplyAssets ? Number(m.state.supplyAssets) / 10 ** loanDecimals : 0,
|
|
2071
|
-
totalBorrowUsd: m.state?.borrowAssets ? Number(m.state.borrowAssets) / 10 ** loanDecimals : 0,
|
|
2072
|
+
totalSupplyUsd: m.state?.supplyAssetsUsd ? Number(m.state.supplyAssetsUsd) : m.state?.supplyAssets ? Number(m.state.supplyAssets) / 10 ** loanDecimals : 0,
|
|
2073
|
+
totalBorrowUsd: m.state?.borrowAssetsUsd ? Number(m.state.borrowAssetsUsd) : m.state?.borrowAssets ? Number(m.state.borrowAssets) / 10 ** loanDecimals : 0,
|
|
2072
2074
|
lltv: `${(Number(m.lltv) / 1e16).toFixed(0)}%`,
|
|
2073
2075
|
marketId: m.uniqueKey
|
|
2074
2076
|
};
|
|
@@ -2106,6 +2108,8 @@ var _MorphoClient = class _MorphoClient extends AgentAccountClient {
|
|
|
2106
2108
|
state {
|
|
2107
2109
|
borrowAssets
|
|
2108
2110
|
supplyAssets
|
|
2111
|
+
supplyAssetsUsd
|
|
2112
|
+
borrowAssetsUsd
|
|
2109
2113
|
utilization
|
|
2110
2114
|
supplyApy
|
|
2111
2115
|
borrowApy
|
package/dist/index.mjs
CHANGED
|
@@ -1492,7 +1492,7 @@ async function withRetry(fn, options = {}) {
|
|
|
1492
1492
|
}
|
|
1493
1493
|
|
|
1494
1494
|
// src/clients/MorphoClient.ts
|
|
1495
|
-
var MORPHO_API_URL2 = "https://api.morpho.org/graphql";
|
|
1495
|
+
var MORPHO_API_URL2 = "https://blue-api.morpho.org/graphql";
|
|
1496
1496
|
var morphoIface = new ethers3.Interface(MORPHO_BLUE_ABI);
|
|
1497
1497
|
var erc20Iface2 = new ethers3.Interface(ERC20_ABI);
|
|
1498
1498
|
var _MorphoClient = class _MorphoClient extends AgentAccountClient {
|
|
@@ -1540,7 +1540,7 @@ var _MorphoClient = class _MorphoClient extends AgentAccountClient {
|
|
|
1540
1540
|
first: 500
|
|
1541
1541
|
orderBy: SupplyAssetsUsd
|
|
1542
1542
|
orderDirection: Desc
|
|
1543
|
-
where: { chainId_in: [${chainId}] }
|
|
1543
|
+
where: { chainId_in: [${chainId}], whitelisted: true }
|
|
1544
1544
|
) {
|
|
1545
1545
|
items {
|
|
1546
1546
|
uniqueKey
|
|
@@ -1949,7 +1949,7 @@ var _MorphoClient = class _MorphoClient extends AgentAccountClient {
|
|
|
1949
1949
|
first: 100
|
|
1950
1950
|
orderBy: SupplyAssetsUsd
|
|
1951
1951
|
orderDirection: Desc
|
|
1952
|
-
where: { chainId_in: [${chainId}]${loanFilter}${collateralFilter}${searchClause} }
|
|
1952
|
+
where: { chainId_in: [${chainId}], whitelisted: true${loanFilter}${collateralFilter}${searchClause} }
|
|
1953
1953
|
) {
|
|
1954
1954
|
items {
|
|
1955
1955
|
uniqueKey
|
|
@@ -1959,6 +1959,8 @@ var _MorphoClient = class _MorphoClient extends AgentAccountClient {
|
|
|
1959
1959
|
state {
|
|
1960
1960
|
borrowAssets
|
|
1961
1961
|
supplyAssets
|
|
1962
|
+
supplyAssetsUsd
|
|
1963
|
+
borrowAssetsUsd
|
|
1962
1964
|
utilization
|
|
1963
1965
|
supplyApy
|
|
1964
1966
|
borrowApy
|
|
@@ -1989,8 +1991,8 @@ var _MorphoClient = class _MorphoClient extends AgentAccountClient {
|
|
|
1989
1991
|
supplyApy: m.state?.supplyApy ? Number(m.state.supplyApy) : 0,
|
|
1990
1992
|
borrowApy: m.state?.borrowApy ? Number(m.state.borrowApy) : 0,
|
|
1991
1993
|
utilization: m.state?.utilization ? Number(m.state.utilization) : 0,
|
|
1992
|
-
totalSupplyUsd: m.state?.supplyAssets ? Number(m.state.supplyAssets) / 10 ** loanDecimals : 0,
|
|
1993
|
-
totalBorrowUsd: m.state?.borrowAssets ? Number(m.state.borrowAssets) / 10 ** loanDecimals : 0,
|
|
1994
|
+
totalSupplyUsd: m.state?.supplyAssetsUsd ? Number(m.state.supplyAssetsUsd) : m.state?.supplyAssets ? Number(m.state.supplyAssets) / 10 ** loanDecimals : 0,
|
|
1995
|
+
totalBorrowUsd: m.state?.borrowAssetsUsd ? Number(m.state.borrowAssetsUsd) : m.state?.borrowAssets ? Number(m.state.borrowAssets) / 10 ** loanDecimals : 0,
|
|
1994
1996
|
lltv: `${(Number(m.lltv) / 1e16).toFixed(0)}%`,
|
|
1995
1997
|
marketId: m.uniqueKey
|
|
1996
1998
|
};
|
|
@@ -2028,6 +2030,8 @@ var _MorphoClient = class _MorphoClient extends AgentAccountClient {
|
|
|
2028
2030
|
state {
|
|
2029
2031
|
borrowAssets
|
|
2030
2032
|
supplyAssets
|
|
2033
|
+
supplyAssetsUsd
|
|
2034
|
+
borrowAssetsUsd
|
|
2031
2035
|
utilization
|
|
2032
2036
|
supplyApy
|
|
2033
2037
|
borrowApy
|