@huma-finance/sdk 0.0.59-beta.463 → 0.0.59-beta.472
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/API.md +3 -17
- package/dist/cjs/services/SubgraphService.d.ts +40 -17
- package/dist/cjs/services/SubgraphService.js +59 -35
- package/dist/cjs/services/SubgraphService.js.map +1 -1
- package/dist/services/SubgraphService.d.ts +40 -17
- package/dist/services/SubgraphService.js +59 -35
- package/dist/services/SubgraphService.js.map +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/package.json +3 -3
package/API.md
CHANGED
|
@@ -324,7 +324,7 @@ in Huma's pools that can be drawn down by the borrower.</p>
|
|
|
324
324
|
* [.createReceivable(signer, poolName, poolType, currencyCode, receivableAmount, maturityDate, uri, [gasOpts])](#ReceivableService.createReceivable) ⇒ <code>Promise.<(TransactionResponse\|null)></code>
|
|
325
325
|
* [.uploadOrFetchMetadataURI(signer, privateKey, chainId, poolName, poolType, metadata, referenceId, extraTags, [lazyFund])](#ReceivableService.uploadOrFetchMetadataURI) ⇒ <code>Promise.<string></code>
|
|
326
326
|
* [.createReceivableWithMetadata(signer, privateKey, chainId, poolName, poolType, currencyCode, receivableAmount, maturityDate, metadata, referenceId, extraTags, [lazyFund], [gasOpts])](#ReceivableService.createReceivableWithMetadata) ⇒ <code>Promise.<TransactionResponse></code>
|
|
327
|
-
* [.loadReceivablesOfOwnerWithMetadata(
|
|
327
|
+
* [.loadReceivablesOfOwnerWithMetadata(chainID, owner, poolName, poolType, pagination)](#ReceivableService.loadReceivablesOfOwnerWithMetadata) ⇒ <code>Promise.<Array.<RealWorldReceivableInfo>></code>
|
|
328
328
|
* [.getTotalCountOfReceivables(provider, owner)](#ReceivableService.getTotalCountOfReceivables) ⇒ <code>Promise.<number></code>
|
|
329
329
|
|
|
330
330
|
<a name="ReceivableService.getTokenIdByURI"></a>
|
|
@@ -459,7 +459,7 @@ in Huma's pools that can be drawn down by the borrower.</p>
|
|
|
459
459
|
|
|
460
460
|
<a name="ReceivableService.loadReceivablesOfOwnerWithMetadata"></a>
|
|
461
461
|
|
|
462
|
-
### ReceivableService.loadReceivablesOfOwnerWithMetadata(
|
|
462
|
+
### ReceivableService.loadReceivablesOfOwnerWithMetadata(chainID, owner, poolName, poolType, pagination) ⇒ <code>Promise.<Array.<RealWorldReceivableInfo>></code>
|
|
463
463
|
<p>Loads all RWRs belonging to the specified owner, including the RWR metadata</p>
|
|
464
464
|
|
|
465
465
|
**Kind**: static method of [<code>ReceivableService</code>](#ReceivableService)
|
|
@@ -469,7 +469,7 @@ in Huma's pools that can be drawn down by the borrower.</p>
|
|
|
469
469
|
|
|
470
470
|
| Param | Type | Description |
|
|
471
471
|
| --- | --- | --- |
|
|
472
|
-
|
|
|
472
|
+
| chainID | <code>number</code> | <p>The chain to query for receivables</p> |
|
|
473
473
|
| owner | <code>string</code> | <p>The receivable token owner to query from.</p> |
|
|
474
474
|
| poolName | <code>POOL\_NAME</code> | <p>The pool name. Used to lookup the pool address to pay to.</p> |
|
|
475
475
|
| poolType | <code>POOL\_TYPE</code> | <p>The pool type. Used to lookup the pool address to pay to.</p> |
|
|
@@ -502,7 +502,6 @@ in Huma's pools that can be drawn down by the borrower.</p>
|
|
|
502
502
|
* [.getCreditEventsForUser(userAddress, chainId, poolName, poolType, event)](#SubgraphService.getCreditEventsForUser) ⇒ <code>Promise.<Array.<CreditEventPayload>></code>
|
|
503
503
|
* [.getLastFactorizedAmountFromPool(userAddress, chainId, poolName, poolType)](#SubgraphService.getLastFactorizedAmountFromPool) ⇒ <code>Promise.<number></code>
|
|
504
504
|
* [.getRWReceivableInfo(userAddress, chainId, poolName, poolType, pagination)](#SubgraphService.getRWReceivableInfo) ⇒ <code>Promise.<RealWorldReceivableInfoBase></code>
|
|
505
|
-
* [.getPoolStats(chainId, pool)](#SubgraphService.getPoolStats) ⇒ <code>Promise.<{PoolStats}></code>
|
|
506
505
|
* [.checkBorrowAndLendHistory(chainId, pool, userAddress)](#SubgraphService.checkBorrowAndLendHistory) ⇒ <code>Promise.<{hasBorrowHistory: boolean, hasLendHistory: boolean}></code>
|
|
507
506
|
|
|
508
507
|
<a name="SubgraphService.getSubgraphUrlForChainId"></a>
|
|
@@ -564,19 +563,6 @@ in Huma's pools that can be drawn down by the borrower.</p>
|
|
|
564
563
|
| poolType | <code>POOL\_TYPE</code> | <p>The type of the pool.</p> |
|
|
565
564
|
| pagination | [<code>Pagination</code>](#Pagination) | <p>The pagination option.</p> |
|
|
566
565
|
|
|
567
|
-
<a name="SubgraphService.getPoolStats"></a>
|
|
568
|
-
|
|
569
|
-
### SubgraphService.getPoolStats(chainId, pool) ⇒ <code>Promise.<{PoolStats}></code>
|
|
570
|
-
<p>Returns the pool's stats.</p>
|
|
571
|
-
|
|
572
|
-
**Kind**: static method of [<code>SubgraphService</code>](#SubgraphService)
|
|
573
|
-
**Returns**: <code>Promise.<{PoolStats}></code> - <p>The pool's stats info.</p>
|
|
574
|
-
|
|
575
|
-
| Param | Type | Description |
|
|
576
|
-
| --- | --- | --- |
|
|
577
|
-
| chainId | <code>number</code> | <p>The ID of the chain.</p> |
|
|
578
|
-
| pool | <code>string</code> | <p>The address of the pool.</p> |
|
|
579
|
-
|
|
580
566
|
<a name="SubgraphService.checkBorrowAndLendHistory"></a>
|
|
581
567
|
|
|
582
568
|
### SubgraphService.checkBorrowAndLendHistory(chainId, pool, userAddress) ⇒ <code>Promise.<{hasBorrowHistory: boolean, hasLendHistory: boolean}></code>
|
|
@@ -63,22 +63,6 @@ declare function getLastFactorizedAmountFromPool(userAddress: string, chainId: n
|
|
|
63
63
|
* @returns {Promise<RealWorldReceivableInfoBase>} The paginated real world receivables' info.
|
|
64
64
|
*/
|
|
65
65
|
declare function getRWReceivableInfo(userAddress: string, chainId: number, poolName: POOL_NAME, poolType: POOL_TYPE, pagination?: Pagination): Promise<RealWorldReceivableInfoBase[]>;
|
|
66
|
-
type PoolStats = {
|
|
67
|
-
id: string;
|
|
68
|
-
totalPoolAssets: number;
|
|
69
|
-
amountCreditOriginated: number;
|
|
70
|
-
amountCreditRepaid: number;
|
|
71
|
-
amountCreditDefaulted: number;
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Returns the pool's stats.
|
|
75
|
-
*
|
|
76
|
-
* @memberof SubgraphService
|
|
77
|
-
* @param {number} chainId - The ID of the chain.
|
|
78
|
-
* @param {string} pool - The address of the pool.
|
|
79
|
-
* @returns {Promise<{PoolStats}>} The pool's stats info.
|
|
80
|
-
*/
|
|
81
|
-
declare function getPoolStats(chainId: number, pool: string): Promise<PoolStats | undefined>;
|
|
82
66
|
/**
|
|
83
67
|
* Returns if user has borrow or lend history.
|
|
84
68
|
*
|
|
@@ -92,6 +76,45 @@ declare function checkBorrowAndLendHistory(chainId: number, pool: string, userAd
|
|
|
92
76
|
hasBorrowHistory: boolean;
|
|
93
77
|
hasLendHistory: boolean;
|
|
94
78
|
} | undefined>;
|
|
79
|
+
export type V2PoolData = {
|
|
80
|
+
pools: {
|
|
81
|
+
address: string;
|
|
82
|
+
version: number;
|
|
83
|
+
availableBalanceForPool: string;
|
|
84
|
+
apr: number;
|
|
85
|
+
yieldInBps: number;
|
|
86
|
+
currentEpochEndTime: string;
|
|
87
|
+
rewardRateInBpsForPoolOwner: number;
|
|
88
|
+
rewardRateInBpsForEA: number;
|
|
89
|
+
liquidityCap: string;
|
|
90
|
+
maxSeniorJuniorRatio: number;
|
|
91
|
+
fixedSeniorYieldInBps: number;
|
|
92
|
+
tranchesRiskAdjustmentInBps: number;
|
|
93
|
+
withdrawalLockoutInDays: number;
|
|
94
|
+
}[];
|
|
95
|
+
tranches: {
|
|
96
|
+
pool: {
|
|
97
|
+
id: string;
|
|
98
|
+
};
|
|
99
|
+
type: number;
|
|
100
|
+
totalAssets: string;
|
|
101
|
+
unprocessedTrancheProfit: string;
|
|
102
|
+
minLiquidity: string;
|
|
103
|
+
maxLiquidity: string;
|
|
104
|
+
riskYieldMultiplierInBps: number;
|
|
105
|
+
flcIndex: number;
|
|
106
|
+
}[];
|
|
107
|
+
protocolStats: {
|
|
108
|
+
protocolFeeInBps: number;
|
|
109
|
+
};
|
|
110
|
+
poolStats: {
|
|
111
|
+
id: string;
|
|
112
|
+
amountCreditOriginated: number;
|
|
113
|
+
amountCreditRepaid: number;
|
|
114
|
+
amountCreditDefaulted: number;
|
|
115
|
+
}[];
|
|
116
|
+
};
|
|
117
|
+
declare function fetchAllPoolsData(chainId: number): Promise<V2PoolData | undefined>;
|
|
95
118
|
/**
|
|
96
119
|
* An object that contains functions to interact with Huma's Subgraph storage.
|
|
97
120
|
* @namespace SubgraphService
|
|
@@ -101,7 +124,7 @@ export declare const SubgraphService: {
|
|
|
101
124
|
getCreditEventsForUser: typeof getCreditEventsForUser;
|
|
102
125
|
getLastFactorizedAmountFromPool: typeof getLastFactorizedAmountFromPool;
|
|
103
126
|
getRWReceivableInfo: typeof getRWReceivableInfo;
|
|
104
|
-
getPoolStats: typeof getPoolStats;
|
|
105
127
|
checkBorrowAndLendHistory: typeof checkBorrowAndLendHistory;
|
|
128
|
+
fetchAllPoolsData: typeof fetchAllPoolsData;
|
|
106
129
|
};
|
|
107
130
|
export {};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SubgraphService = void 0;
|
|
4
4
|
const shared_1 = require("@huma-finance/shared");
|
|
5
|
+
const graphql_request_1 = require("graphql-request");
|
|
5
6
|
/**
|
|
6
7
|
* Returns the subgraph URL for a given chain ID.
|
|
7
8
|
*
|
|
@@ -139,40 +140,6 @@ function getRWReceivableInfo(userAddress, chainId, poolName, poolType, paginatio
|
|
|
139
140
|
});
|
|
140
141
|
});
|
|
141
142
|
}
|
|
142
|
-
/**
|
|
143
|
-
* Returns the pool's stats.
|
|
144
|
-
*
|
|
145
|
-
* @memberof SubgraphService
|
|
146
|
-
* @param {number} chainId - The ID of the chain.
|
|
147
|
-
* @param {string} pool - The address of the pool.
|
|
148
|
-
* @returns {Promise<{PoolStats}>} The pool's stats info.
|
|
149
|
-
*/
|
|
150
|
-
function getPoolStats(chainId, pool) {
|
|
151
|
-
var _a;
|
|
152
|
-
const url = (_a = shared_1.PoolSubgraphMap[chainId]) === null || _a === void 0 ? void 0 : _a.subgraph;
|
|
153
|
-
if (!url) {
|
|
154
|
-
return Promise.resolve(undefined);
|
|
155
|
-
}
|
|
156
|
-
const PoolStatsQuery = `
|
|
157
|
-
query {
|
|
158
|
-
poolStat(id:"${pool === null || pool === void 0 ? void 0 : pool.toLowerCase()}") {
|
|
159
|
-
id
|
|
160
|
-
amountCreditOriginated
|
|
161
|
-
amountCreditRepaid
|
|
162
|
-
amountCreditDefaulted
|
|
163
|
-
totalPoolAssets
|
|
164
|
-
}
|
|
165
|
-
}`;
|
|
166
|
-
return (0, shared_1.requestPost)(url, JSON.stringify({ query: PoolStatsQuery }), {
|
|
167
|
-
withCredentials: false,
|
|
168
|
-
}).then((res) => {
|
|
169
|
-
if (res.errors) {
|
|
170
|
-
console.error(res.errors);
|
|
171
|
-
return undefined;
|
|
172
|
-
}
|
|
173
|
-
return res.data.poolStat;
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
143
|
/**
|
|
177
144
|
* Returns if user has borrow or lend history.
|
|
178
145
|
*
|
|
@@ -246,6 +213,63 @@ function checkBorrowAndLendHistory(chainId, pool, userAddress) {
|
|
|
246
213
|
return { hasBorrowHistory, hasLendHistory };
|
|
247
214
|
});
|
|
248
215
|
}
|
|
216
|
+
function fetchAllPoolsData(chainId) {
|
|
217
|
+
var _a;
|
|
218
|
+
const url = (_a = shared_1.PoolSubgraphMap[chainId]) === null || _a === void 0 ? void 0 : _a.subgraph;
|
|
219
|
+
if (!url) {
|
|
220
|
+
return Promise.resolve(undefined);
|
|
221
|
+
}
|
|
222
|
+
// Query for all pools
|
|
223
|
+
const QUERY = (0, graphql_request_1.gql) `
|
|
224
|
+
query {
|
|
225
|
+
pools {
|
|
226
|
+
address
|
|
227
|
+
version
|
|
228
|
+
availableBalanceForPool
|
|
229
|
+
apr
|
|
230
|
+
yieldInBps
|
|
231
|
+
currentEpochEndTime
|
|
232
|
+
rewardRateInBpsForPoolOwner
|
|
233
|
+
rewardRateInBpsForEA
|
|
234
|
+
liquidityCap
|
|
235
|
+
maxSeniorJuniorRatio
|
|
236
|
+
fixedSeniorYieldInBps
|
|
237
|
+
tranchesRiskAdjustmentInBps
|
|
238
|
+
withdrawalLockoutInDays
|
|
239
|
+
}
|
|
240
|
+
tranches {
|
|
241
|
+
type
|
|
242
|
+
pool {
|
|
243
|
+
id
|
|
244
|
+
}
|
|
245
|
+
totalAssets
|
|
246
|
+
unprocessedTrancheProfit
|
|
247
|
+
minLiquidity
|
|
248
|
+
maxLiquidity
|
|
249
|
+
riskYieldMultiplierInBps
|
|
250
|
+
flcIndex
|
|
251
|
+
}
|
|
252
|
+
poolStats {
|
|
253
|
+
id
|
|
254
|
+
amountCreditOriginated
|
|
255
|
+
amountCreditRepaid
|
|
256
|
+
amountCreditDefaulted
|
|
257
|
+
}
|
|
258
|
+
protocolStats(id: "protocol-stats") {
|
|
259
|
+
protocolFeeInBps
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
`;
|
|
263
|
+
return (0, shared_1.requestPost)(url, JSON.stringify({ query: QUERY }), {
|
|
264
|
+
withCredentials: false,
|
|
265
|
+
}).then((res) => {
|
|
266
|
+
if (res.errors) {
|
|
267
|
+
console.error(res.errors);
|
|
268
|
+
return undefined;
|
|
269
|
+
}
|
|
270
|
+
return res.data;
|
|
271
|
+
});
|
|
272
|
+
}
|
|
249
273
|
/**
|
|
250
274
|
* An object that contains functions to interact with Huma's Subgraph storage.
|
|
251
275
|
* @namespace SubgraphService
|
|
@@ -255,7 +279,7 @@ exports.SubgraphService = {
|
|
|
255
279
|
getCreditEventsForUser,
|
|
256
280
|
getLastFactorizedAmountFromPool,
|
|
257
281
|
getRWReceivableInfo,
|
|
258
|
-
getPoolStats,
|
|
259
282
|
checkBorrowAndLendHistory,
|
|
283
|
+
fetchAllPoolsData,
|
|
260
284
|
};
|
|
261
285
|
//# sourceMappingURL=SubgraphService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubgraphService.js","sourceRoot":"","sources":["../../../src/services/SubgraphService.ts"],"names":[],"mappings":";;;AAAA,iDAW6B;
|
|
1
|
+
{"version":3,"file":"SubgraphService.js","sourceRoot":"","sources":["../../../src/services/SubgraphService.ts"],"names":[],"mappings":";;;AAAA,iDAW6B;AAC7B,qDAAqC;AAyBrC;;;;;;GAMG;AACH,SAAS,wBAAwB,CAAC,OAAe;;IAC/C,OAAO,MAAA,MAAA,wBAAe,CAAC,OAAO,CAAC,0CAAE,QAAQ,mCAAI,EAAE,CAAA;AACjD,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAS,sBAAsB,CAC7B,WAAmB,EACnB,OAAe,EACf,QAAmB,EACnB,QAAmB,EACnB,KAAe;;IAEf,MAAM,GAAG,GAAG,wBAAwB,CAAC,OAAO,CAAC,CAAA;IAC7C,IAAI,CAAC,GAAG,EAAE;QACR,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;KAC3B;IAED,MAAM,WAAW,GAAG,MAAA,MAAA,MAAA,wBAAe,CAAC,OAAO,CAAC,0CAAG,QAAQ,CAAC,0CAAG,QAAQ,CAAC,0CAAE,IAAI,CAAA;IAE1E,MAAM,KAAK,GAAG;;;;oBAII,WAAW;mBACZ,WAAW;uBACP,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;;;;;;;;;;;;GAYnC,CAAA;IAED,8DAA8D;IAC9D,OAAO,IAAA,oBAAW,EAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAQ,EAAE,EAAE;QACnE,IAAI,GAAG,CAAC,MAAM,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,GA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E;QACR,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;KAClC;IAED,sBAAsB;IACtB,MAAM,KAAK,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuChB,CAAA;IAED,OAAO,IAAA,oBAAW,EAGf,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;QACxC,eAAe,EAAE,KAAK;KACvB,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;QACd,IAAI,GAAG,CAAC,MAAM,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;YACzB,OAAO,SAAS,CAAA;SACjB;QACD,OAAO,GAAG,CAAC,IAAI,CAAA;IACjB,CAAC,CAAC,CAAA;AACJ,CAAC;AAED;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC7B,wBAAwB;IACxB,sBAAsB;IACtB,+BAA+B;IAC/B,mBAAmB;IACnB,yBAAyB;IACzB,iBAAiB;CAClB,CAAA"}
|
|
@@ -63,22 +63,6 @@ declare function getLastFactorizedAmountFromPool(userAddress: string, chainId: n
|
|
|
63
63
|
* @returns {Promise<RealWorldReceivableInfoBase>} The paginated real world receivables' info.
|
|
64
64
|
*/
|
|
65
65
|
declare function getRWReceivableInfo(userAddress: string, chainId: number, poolName: POOL_NAME, poolType: POOL_TYPE, pagination?: Pagination): Promise<RealWorldReceivableInfoBase[]>;
|
|
66
|
-
type PoolStats = {
|
|
67
|
-
id: string;
|
|
68
|
-
totalPoolAssets: number;
|
|
69
|
-
amountCreditOriginated: number;
|
|
70
|
-
amountCreditRepaid: number;
|
|
71
|
-
amountCreditDefaulted: number;
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Returns the pool's stats.
|
|
75
|
-
*
|
|
76
|
-
* @memberof SubgraphService
|
|
77
|
-
* @param {number} chainId - The ID of the chain.
|
|
78
|
-
* @param {string} pool - The address of the pool.
|
|
79
|
-
* @returns {Promise<{PoolStats}>} The pool's stats info.
|
|
80
|
-
*/
|
|
81
|
-
declare function getPoolStats(chainId: number, pool: string): Promise<PoolStats | undefined>;
|
|
82
66
|
/**
|
|
83
67
|
* Returns if user has borrow or lend history.
|
|
84
68
|
*
|
|
@@ -92,6 +76,45 @@ declare function checkBorrowAndLendHistory(chainId: number, pool: string, userAd
|
|
|
92
76
|
hasBorrowHistory: boolean;
|
|
93
77
|
hasLendHistory: boolean;
|
|
94
78
|
} | undefined>;
|
|
79
|
+
export type V2PoolData = {
|
|
80
|
+
pools: {
|
|
81
|
+
address: string;
|
|
82
|
+
version: number;
|
|
83
|
+
availableBalanceForPool: string;
|
|
84
|
+
apr: number;
|
|
85
|
+
yieldInBps: number;
|
|
86
|
+
currentEpochEndTime: string;
|
|
87
|
+
rewardRateInBpsForPoolOwner: number;
|
|
88
|
+
rewardRateInBpsForEA: number;
|
|
89
|
+
liquidityCap: string;
|
|
90
|
+
maxSeniorJuniorRatio: number;
|
|
91
|
+
fixedSeniorYieldInBps: number;
|
|
92
|
+
tranchesRiskAdjustmentInBps: number;
|
|
93
|
+
withdrawalLockoutInDays: number;
|
|
94
|
+
}[];
|
|
95
|
+
tranches: {
|
|
96
|
+
pool: {
|
|
97
|
+
id: string;
|
|
98
|
+
};
|
|
99
|
+
type: number;
|
|
100
|
+
totalAssets: string;
|
|
101
|
+
unprocessedTrancheProfit: string;
|
|
102
|
+
minLiquidity: string;
|
|
103
|
+
maxLiquidity: string;
|
|
104
|
+
riskYieldMultiplierInBps: number;
|
|
105
|
+
flcIndex: number;
|
|
106
|
+
}[];
|
|
107
|
+
protocolStats: {
|
|
108
|
+
protocolFeeInBps: number;
|
|
109
|
+
};
|
|
110
|
+
poolStats: {
|
|
111
|
+
id: string;
|
|
112
|
+
amountCreditOriginated: number;
|
|
113
|
+
amountCreditRepaid: number;
|
|
114
|
+
amountCreditDefaulted: number;
|
|
115
|
+
}[];
|
|
116
|
+
};
|
|
117
|
+
declare function fetchAllPoolsData(chainId: number): Promise<V2PoolData | undefined>;
|
|
95
118
|
/**
|
|
96
119
|
* An object that contains functions to interact with Huma's Subgraph storage.
|
|
97
120
|
* @namespace SubgraphService
|
|
@@ -101,7 +124,7 @@ export declare const SubgraphService: {
|
|
|
101
124
|
getCreditEventsForUser: typeof getCreditEventsForUser;
|
|
102
125
|
getLastFactorizedAmountFromPool: typeof getLastFactorizedAmountFromPool;
|
|
103
126
|
getRWReceivableInfo: typeof getRWReceivableInfo;
|
|
104
|
-
getPoolStats: typeof getPoolStats;
|
|
105
127
|
checkBorrowAndLendHistory: typeof checkBorrowAndLendHistory;
|
|
128
|
+
fetchAllPoolsData: typeof fetchAllPoolsData;
|
|
106
129
|
};
|
|
107
130
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CreditEvent, PoolContractMap, PoolSubgraphMap, CHAIN_POOLS_INFO_V2, isV2Pool, requestPost, } from '@huma-finance/shared';
|
|
2
|
+
import { gql } from 'graphql-request';
|
|
2
3
|
/**
|
|
3
4
|
* Returns the subgraph URL for a given chain ID.
|
|
4
5
|
*
|
|
@@ -136,40 +137,6 @@ function getRWReceivableInfo(userAddress, chainId, poolName, poolType, paginatio
|
|
|
136
137
|
});
|
|
137
138
|
});
|
|
138
139
|
}
|
|
139
|
-
/**
|
|
140
|
-
* Returns the pool's stats.
|
|
141
|
-
*
|
|
142
|
-
* @memberof SubgraphService
|
|
143
|
-
* @param {number} chainId - The ID of the chain.
|
|
144
|
-
* @param {string} pool - The address of the pool.
|
|
145
|
-
* @returns {Promise<{PoolStats}>} The pool's stats info.
|
|
146
|
-
*/
|
|
147
|
-
function getPoolStats(chainId, pool) {
|
|
148
|
-
var _a;
|
|
149
|
-
const url = (_a = PoolSubgraphMap[chainId]) === null || _a === void 0 ? void 0 : _a.subgraph;
|
|
150
|
-
if (!url) {
|
|
151
|
-
return Promise.resolve(undefined);
|
|
152
|
-
}
|
|
153
|
-
const PoolStatsQuery = `
|
|
154
|
-
query {
|
|
155
|
-
poolStat(id:"${pool === null || pool === void 0 ? void 0 : pool.toLowerCase()}") {
|
|
156
|
-
id
|
|
157
|
-
amountCreditOriginated
|
|
158
|
-
amountCreditRepaid
|
|
159
|
-
amountCreditDefaulted
|
|
160
|
-
totalPoolAssets
|
|
161
|
-
}
|
|
162
|
-
}`;
|
|
163
|
-
return requestPost(url, JSON.stringify({ query: PoolStatsQuery }), {
|
|
164
|
-
withCredentials: false,
|
|
165
|
-
}).then((res) => {
|
|
166
|
-
if (res.errors) {
|
|
167
|
-
console.error(res.errors);
|
|
168
|
-
return undefined;
|
|
169
|
-
}
|
|
170
|
-
return res.data.poolStat;
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
140
|
/**
|
|
174
141
|
* Returns if user has borrow or lend history.
|
|
175
142
|
*
|
|
@@ -243,6 +210,63 @@ function checkBorrowAndLendHistory(chainId, pool, userAddress) {
|
|
|
243
210
|
return { hasBorrowHistory, hasLendHistory };
|
|
244
211
|
});
|
|
245
212
|
}
|
|
213
|
+
function fetchAllPoolsData(chainId) {
|
|
214
|
+
var _a;
|
|
215
|
+
const url = (_a = PoolSubgraphMap[chainId]) === null || _a === void 0 ? void 0 : _a.subgraph;
|
|
216
|
+
if (!url) {
|
|
217
|
+
return Promise.resolve(undefined);
|
|
218
|
+
}
|
|
219
|
+
// Query for all pools
|
|
220
|
+
const QUERY = gql `
|
|
221
|
+
query {
|
|
222
|
+
pools {
|
|
223
|
+
address
|
|
224
|
+
version
|
|
225
|
+
availableBalanceForPool
|
|
226
|
+
apr
|
|
227
|
+
yieldInBps
|
|
228
|
+
currentEpochEndTime
|
|
229
|
+
rewardRateInBpsForPoolOwner
|
|
230
|
+
rewardRateInBpsForEA
|
|
231
|
+
liquidityCap
|
|
232
|
+
maxSeniorJuniorRatio
|
|
233
|
+
fixedSeniorYieldInBps
|
|
234
|
+
tranchesRiskAdjustmentInBps
|
|
235
|
+
withdrawalLockoutInDays
|
|
236
|
+
}
|
|
237
|
+
tranches {
|
|
238
|
+
type
|
|
239
|
+
pool {
|
|
240
|
+
id
|
|
241
|
+
}
|
|
242
|
+
totalAssets
|
|
243
|
+
unprocessedTrancheProfit
|
|
244
|
+
minLiquidity
|
|
245
|
+
maxLiquidity
|
|
246
|
+
riskYieldMultiplierInBps
|
|
247
|
+
flcIndex
|
|
248
|
+
}
|
|
249
|
+
poolStats {
|
|
250
|
+
id
|
|
251
|
+
amountCreditOriginated
|
|
252
|
+
amountCreditRepaid
|
|
253
|
+
amountCreditDefaulted
|
|
254
|
+
}
|
|
255
|
+
protocolStats(id: "protocol-stats") {
|
|
256
|
+
protocolFeeInBps
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
`;
|
|
260
|
+
return requestPost(url, JSON.stringify({ query: QUERY }), {
|
|
261
|
+
withCredentials: false,
|
|
262
|
+
}).then((res) => {
|
|
263
|
+
if (res.errors) {
|
|
264
|
+
console.error(res.errors);
|
|
265
|
+
return undefined;
|
|
266
|
+
}
|
|
267
|
+
return res.data;
|
|
268
|
+
});
|
|
269
|
+
}
|
|
246
270
|
/**
|
|
247
271
|
* An object that contains functions to interact with Huma's Subgraph storage.
|
|
248
272
|
* @namespace SubgraphService
|
|
@@ -252,7 +276,7 @@ export const SubgraphService = {
|
|
|
252
276
|
getCreditEventsForUser,
|
|
253
277
|
getLastFactorizedAmountFromPool,
|
|
254
278
|
getRWReceivableInfo,
|
|
255
|
-
getPoolStats,
|
|
256
279
|
checkBorrowAndLendHistory,
|
|
280
|
+
fetchAllPoolsData,
|
|
257
281
|
};
|
|
258
282
|
//# sourceMappingURL=SubgraphService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubgraphService.js","sourceRoot":"","sources":["../../src/services/SubgraphService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAGX,eAAe,EACf,eAAe,EAEf,mBAAmB,EAEnB,QAAQ,EACR,WA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