@aave/client 4.0.0-next.29 → 4.0.0-next.30
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/actions/index.cjs +1 -1
- package/dist/actions/index.cjs.map +1 -1
- package/dist/actions/index.d.cts +39 -36
- package/dist/actions/index.d.ts +39 -36
- package/dist/actions/index.js +1 -1
- package/dist/chunk-35WSRP27.js +2 -0
- package/dist/chunk-35WSRP27.js.map +1 -0
- package/dist/{chunk-6YAKMTVD.js → chunk-BU2KVGJB.js} +2 -2
- package/dist/{chunk-6YAKMTVD.js.map → chunk-BU2KVGJB.js.map} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/privy.js +1 -1
- package/dist/testing.d.ts +2 -1
- package/dist/testing.js +18 -18
- package/dist/testing.js.map +1 -1
- package/dist/thirdweb.cjs +1 -1
- package/dist/thirdweb.cjs.map +1 -1
- package/dist/thirdweb.js +1 -1
- package/dist/viem.cjs +1 -1
- package/dist/viem.cjs.map +1 -1
- package/dist/viem.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-IDO2PFSI.js +0 -2
- package/dist/chunk-IDO2PFSI.js.map +0 -1
package/dist/actions/index.d.cts
CHANGED
|
@@ -37,7 +37,7 @@ declare function hub(client: AaveClient, request: HubRequest, options?: Currency
|
|
|
37
37
|
* @param options - The query options.
|
|
38
38
|
* @returns Array of hub data.
|
|
39
39
|
*/
|
|
40
|
-
declare function hubs(client: AaveClient, request: HubsRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<Hub[], UnexpectedError>;
|
|
40
|
+
declare function hubs(client: AaveClient, request: HubsRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<Hub[], UnexpectedError>;
|
|
41
41
|
/**
|
|
42
42
|
* Fetches hub assets for a specific hub by ID or by address and chain ID.
|
|
43
43
|
*
|
|
@@ -52,7 +52,7 @@ declare function hubs(client: AaveClient, request: HubsRequest, { currency, time
|
|
|
52
52
|
* @param options - The query options.
|
|
53
53
|
* @returns The hub assets array.
|
|
54
54
|
*/
|
|
55
|
-
declare function hubAssets(client: AaveClient, request: HubAssetsRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<HubAsset[], UnexpectedError>;
|
|
55
|
+
declare function hubAssets(client: AaveClient, request: HubAssetsRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<HubAsset[], UnexpectedError>;
|
|
56
56
|
/**
|
|
57
57
|
* Fetches historical summary data for a specific hub.
|
|
58
58
|
*
|
|
@@ -66,9 +66,10 @@ declare function hubAssets(client: AaveClient, request: HubAssetsRequest, { curr
|
|
|
66
66
|
*
|
|
67
67
|
* @param client - Aave client.
|
|
68
68
|
* @param request - The hub summary history request parameters.
|
|
69
|
+
* @param options - The query options.
|
|
69
70
|
* @returns Array of hub summary samples over time.
|
|
70
71
|
*/
|
|
71
|
-
declare function hubSummaryHistory(client: AaveClient, request: HubSummaryHistoryRequest): ResultAsync<HubSummarySample[], UnexpectedError>;
|
|
72
|
+
declare function hubSummaryHistory(client: AaveClient, request: HubSummaryHistoryRequest, { requestPolicy, }?: RequestPolicyOptions): ResultAsync<HubSummarySample[], UnexpectedError>;
|
|
72
73
|
|
|
73
74
|
/**
|
|
74
75
|
* Fetches a specific chain by chain ID.
|
|
@@ -81,13 +82,10 @@ declare function hubSummaryHistory(client: AaveClient, request: HubSummaryHistor
|
|
|
81
82
|
*
|
|
82
83
|
* @param client - Aave client.
|
|
83
84
|
* @param request - The chain request parameters.
|
|
85
|
+
* @param options - The query options.
|
|
84
86
|
* @returns The chain data, or null if not found.
|
|
85
87
|
*/
|
|
86
|
-
declare function chain(client: AaveClient, request: ChainRequest): ResultAsync<Chain | null, UnexpectedError>;
|
|
87
|
-
/**
|
|
88
|
-
* @internal
|
|
89
|
-
*/
|
|
90
|
-
declare function chain(client: AaveClient, request: ChainRequest, options: BatchOptions): ResultAsync<Chain | null, UnexpectedError>;
|
|
88
|
+
declare function chain(client: AaveClient, request: ChainRequest, { batch, requestPolicy, }?: BatchOptions & RequestPolicyOptions): ResultAsync<Chain | null, UnexpectedError>;
|
|
91
89
|
/**
|
|
92
90
|
* Fetches the list of supported chains.
|
|
93
91
|
*
|
|
@@ -128,9 +126,10 @@ declare function hasProcessedKnownTransaction(client: AaveClient, request: HasPr
|
|
|
128
126
|
*
|
|
129
127
|
* @param client - Aave client.
|
|
130
128
|
* @param request - The exchange rate request parameters.
|
|
129
|
+
* @param options - The query options.
|
|
131
130
|
* @returns The exchange rate information as a fiat amount.
|
|
132
131
|
*/
|
|
133
|
-
declare function exchangeRate(client: AaveClient, request: ExchangeRateRequest): ResultAsync<ExchangeAmount, UnexpectedError>;
|
|
132
|
+
declare function exchangeRate(client: AaveClient, request: ExchangeRateRequest, { requestPolicy, }?: RequestPolicyOptions): ResultAsync<ExchangeAmount, UnexpectedError>;
|
|
134
133
|
|
|
135
134
|
/**
|
|
136
135
|
* Fetches information about a specific asset (ERC20 token) in the protocol by ID or by token.
|
|
@@ -180,10 +179,10 @@ declare function assetPriceHistory(client: AaveClient, request: AssetPriceHistor
|
|
|
180
179
|
*
|
|
181
180
|
* @param client - Aave client.
|
|
182
181
|
* @param request - The asset supply history request parameters.
|
|
183
|
-
* @param options - The query options.
|
|
182
|
+
* @param options - The query options including currency and time window.
|
|
184
183
|
* @returns Array of asset supply samples over time.
|
|
185
184
|
*/
|
|
186
|
-
declare function assetSupplyHistory(client: AaveClient, request: AssetSupplyHistoryRequest,
|
|
185
|
+
declare function assetSupplyHistory(client: AaveClient, request: AssetSupplyHistoryRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<AssetSupplySample[], UnexpectedError>;
|
|
187
186
|
/**
|
|
188
187
|
* Fetches historical borrow data for a specific asset.
|
|
189
188
|
*
|
|
@@ -198,10 +197,10 @@ declare function assetSupplyHistory(client: AaveClient, request: AssetSupplyHist
|
|
|
198
197
|
*
|
|
199
198
|
* @param client - Aave client.
|
|
200
199
|
* @param request - The asset borrow history request parameters.
|
|
201
|
-
* @param options - The query options.
|
|
200
|
+
* @param options - The query options including currency and time window.
|
|
202
201
|
* @returns Array of asset borrow samples over time.
|
|
203
202
|
*/
|
|
204
|
-
declare function assetBorrowHistory(client: AaveClient, request: AssetBorrowHistoryRequest,
|
|
203
|
+
declare function assetBorrowHistory(client: AaveClient, request: AssetBorrowHistoryRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<AssetBorrowSample[], UnexpectedError>;
|
|
205
204
|
/**
|
|
206
205
|
* Fetches historical protocol-wide data (deposits, borrows, earnings).
|
|
207
206
|
*
|
|
@@ -234,7 +233,7 @@ declare function protocolHistory(client: AaveClient, request: ProtocolHistoryReq
|
|
|
234
233
|
* @param options - The query options.
|
|
235
234
|
* @returns The reserve data, or null if not found.
|
|
236
235
|
*/
|
|
237
|
-
declare function reserve(client: AaveClient, request: ReserveRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<Reserve | null, UnexpectedError>;
|
|
236
|
+
declare function reserve(client: AaveClient, request: ReserveRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<Reserve | null, UnexpectedError>;
|
|
238
237
|
/**
|
|
239
238
|
* Fetches reserves based on specified criteria.
|
|
240
239
|
*
|
|
@@ -256,7 +255,7 @@ declare function reserve(client: AaveClient, request: ReserveRequest, { currency
|
|
|
256
255
|
* @param options - The query options.
|
|
257
256
|
* @returns Array of reserves matching the criteria.
|
|
258
257
|
*/
|
|
259
|
-
declare function reserves(client: AaveClient, request: ReservesRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<Reserve[], UnexpectedError>;
|
|
258
|
+
declare function reserves(client: AaveClient, request: ReservesRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<Reserve[], UnexpectedError>;
|
|
260
259
|
/**
|
|
261
260
|
* Fetches borrow APY history for a specific reserve over time.
|
|
262
261
|
*
|
|
@@ -269,9 +268,10 @@ declare function reserves(client: AaveClient, request: ReservesRequest, { curren
|
|
|
269
268
|
*
|
|
270
269
|
* @param client - Aave client.
|
|
271
270
|
* @param request - The borrow APY history request parameters.
|
|
271
|
+
* @param options - The query options.
|
|
272
272
|
* @returns The borrow APY history samples.
|
|
273
273
|
*/
|
|
274
|
-
declare function borrowApyHistory(client: AaveClient, request: BorrowApyHistoryRequest): ResultAsync<ApySample[], UnexpectedError>;
|
|
274
|
+
declare function borrowApyHistory(client: AaveClient, request: BorrowApyHistoryRequest, { requestPolicy, }?: RequestPolicyOptions): ResultAsync<ApySample[], UnexpectedError>;
|
|
275
275
|
/**
|
|
276
276
|
* Fetches supply APY history for a specific reserve over time.
|
|
277
277
|
*
|
|
@@ -284,9 +284,10 @@ declare function borrowApyHistory(client: AaveClient, request: BorrowApyHistoryR
|
|
|
284
284
|
*
|
|
285
285
|
* @param client - Aave client.
|
|
286
286
|
* @param request - The supply APY history request parameters.
|
|
287
|
+
* @param options - The query options.
|
|
287
288
|
* @returns The supply APY history samples.
|
|
288
289
|
*/
|
|
289
|
-
declare function supplyApyHistory(client: AaveClient, request: SupplyApyHistoryRequest): ResultAsync<ApySample[], UnexpectedError>;
|
|
290
|
+
declare function supplyApyHistory(client: AaveClient, request: SupplyApyHistoryRequest, { requestPolicy, }?: RequestPolicyOptions): ResultAsync<ApySample[], UnexpectedError>;
|
|
290
291
|
|
|
291
292
|
/**
|
|
292
293
|
* Fetches a specific spoke.
|
|
@@ -367,7 +368,7 @@ declare function spokeUserPositionManagers(client: AaveClient, request: SpokeUse
|
|
|
367
368
|
* @param options - The query options.
|
|
368
369
|
* @returns The swap quote including pricing and cost information and plan to start executing the swap.
|
|
369
370
|
*/
|
|
370
|
-
declare function tokenSwapQuote(client: AaveClient, request: TokenSwapQuoteRequest,
|
|
371
|
+
declare function tokenSwapQuote(client: AaveClient, request: TokenSwapQuoteRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<TokenSwapQuoteResult, UnexpectedError>;
|
|
371
372
|
/**
|
|
372
373
|
* Fetches the list of tokens available for swapping on a specific chain.
|
|
373
374
|
*
|
|
@@ -379,9 +380,10 @@ declare function tokenSwapQuote(client: AaveClient, request: TokenSwapQuoteReque
|
|
|
379
380
|
*
|
|
380
381
|
* @param client - Aave client.
|
|
381
382
|
* @param request - The swappable tokens request parameters.
|
|
383
|
+
* @param options - The query options.
|
|
382
384
|
* @returns The list of tokens available for swapping.
|
|
383
385
|
*/
|
|
384
|
-
declare function swappableTokens(client: AaveClient, request: SwappableTokensRequest): ResultAsync<Token[], UnexpectedError>;
|
|
386
|
+
declare function swappableTokens(client: AaveClient, request: SwappableTokensRequest, { requestPolicy, }?: RequestPolicyOptions): ResultAsync<Token[], UnexpectedError>;
|
|
385
387
|
/**
|
|
386
388
|
* Prepares a swap for the specified trade parameters.
|
|
387
389
|
*
|
|
@@ -420,7 +422,7 @@ declare function prepareTokenSwap(client: AaveClient, request: PrepareTokenSwapR
|
|
|
420
422
|
* @param options - The query options.
|
|
421
423
|
* @returns The supply swap result with quote, approvals, and preview.
|
|
422
424
|
*/
|
|
423
|
-
declare function supplySwapQuote(client: AaveClient, request: SupplySwapQuoteRequest,
|
|
425
|
+
declare function supplySwapQuote(client: AaveClient, request: SupplySwapQuoteRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<PositionSwapByIntentApprovalsRequired, UnexpectedError>;
|
|
424
426
|
/**
|
|
425
427
|
* Fetches a borrow swap quote for swapping debt positions.
|
|
426
428
|
*
|
|
@@ -440,7 +442,7 @@ declare function supplySwapQuote(client: AaveClient, request: SupplySwapQuoteReq
|
|
|
440
442
|
* @param options - The query options.
|
|
441
443
|
* @returns The borrow swap result with quote, approvals, and preview.
|
|
442
444
|
*/
|
|
443
|
-
declare function borrowSwapQuote(client: AaveClient, request: BorrowSwapQuoteRequest,
|
|
445
|
+
declare function borrowSwapQuote(client: AaveClient, request: BorrowSwapQuoteRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<PositionSwapByIntentApprovalsRequired, UnexpectedError>;
|
|
444
446
|
/**
|
|
445
447
|
* Fetches a repay with supply quote for repaying debt using collateral.
|
|
446
448
|
*
|
|
@@ -460,7 +462,7 @@ declare function borrowSwapQuote(client: AaveClient, request: BorrowSwapQuoteReq
|
|
|
460
462
|
* @param options - The query options.
|
|
461
463
|
* @returns The repay with supply result with quote, approvals, and preview.
|
|
462
464
|
*/
|
|
463
|
-
declare function repayWithSupplyQuote(client: AaveClient, request: RepayWithSupplyQuoteRequest,
|
|
465
|
+
declare function repayWithSupplyQuote(client: AaveClient, request: RepayWithSupplyQuoteRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<PositionSwapByIntentApprovalsRequired, UnexpectedError>;
|
|
464
466
|
/**
|
|
465
467
|
* Fetches a withdraw swap quote for withdrawing deposits and swapping on the fly.
|
|
466
468
|
*
|
|
@@ -480,7 +482,7 @@ declare function repayWithSupplyQuote(client: AaveClient, request: RepayWithSupp
|
|
|
480
482
|
* @param options - The query options.
|
|
481
483
|
* @returns The withdraw swap result with quote, approvals, and preview.
|
|
482
484
|
*/
|
|
483
|
-
declare function withdrawSwapQuote(client: AaveClient, request: WithdrawSwapQuoteRequest,
|
|
485
|
+
declare function withdrawSwapQuote(client: AaveClient, request: WithdrawSwapQuoteRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<PositionSwapByIntentApprovalsRequired, UnexpectedError>;
|
|
484
486
|
/**
|
|
485
487
|
* Prepares a position swap by obtaining the typed data for signing.
|
|
486
488
|
*
|
|
@@ -511,7 +513,7 @@ declare function preparePositionSwap(client: AaveClient, request: PreparePositio
|
|
|
511
513
|
* @param options - The query options.
|
|
512
514
|
* @returns The current status of the swap.
|
|
513
515
|
*/
|
|
514
|
-
declare function swapStatus(client: AaveClient, request: SwapStatusRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<SwapStatus, UnexpectedError>;
|
|
516
|
+
declare function swapStatus(client: AaveClient, request: SwapStatusRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<SwapStatus, UnexpectedError>;
|
|
515
517
|
type SwapOutcome = SwapCancelled | SwapExpired | SwapFulfilled;
|
|
516
518
|
/**
|
|
517
519
|
* Waits for a swap to reach a final outcome (cancelled, expired, or fulfilled).
|
|
@@ -630,7 +632,7 @@ declare function cancelSwap(client: AaveClient, request: CancelSwapRequest): Res
|
|
|
630
632
|
* @param options - The query options.
|
|
631
633
|
* @returns The paginated list of user swaps with their status information.
|
|
632
634
|
*/
|
|
633
|
-
declare function userSwaps(client: AaveClient, request: UserSwapsRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<PaginatedUserSwapsResult, UnexpectedError>;
|
|
635
|
+
declare function userSwaps(client: AaveClient, request: UserSwapsRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<PaginatedUserSwapsResult, UnexpectedError>;
|
|
634
636
|
|
|
635
637
|
/**
|
|
636
638
|
* Creates a transaction to borrow from a market.
|
|
@@ -909,7 +911,7 @@ declare function setSpokeUserPositionManager(client: AaveClient, request: SetSpo
|
|
|
909
911
|
* @param options - The query options.
|
|
910
912
|
* @returns The preview result showing position changes.
|
|
911
913
|
*/
|
|
912
|
-
declare function preview(client: AaveClient, request: PreviewRequest,
|
|
914
|
+
declare function preview(client: AaveClient, request: PreviewRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<PreviewUserPosition, UnexpectedError>;
|
|
913
915
|
/**
|
|
914
916
|
* Updates the collateral status of user's supplies.
|
|
915
917
|
*
|
|
@@ -970,7 +972,7 @@ declare function activities(client: AaveClient, request: ActivitiesRequest, { cu
|
|
|
970
972
|
* @param options - The query options.
|
|
971
973
|
* @returns The user's supply positions.
|
|
972
974
|
*/
|
|
973
|
-
declare function userSupplies(client: AaveClient, request: UserSuppliesRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<UserSupplyItem[], UnexpectedError>;
|
|
975
|
+
declare function userSupplies(client: AaveClient, request: UserSuppliesRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<UserSupplyItem[], UnexpectedError>;
|
|
974
976
|
/**
|
|
975
977
|
* Fetches all user borrow positions across the specified spoke.
|
|
976
978
|
*
|
|
@@ -991,8 +993,8 @@ declare function userSupplies(client: AaveClient, request: UserSuppliesRequest,
|
|
|
991
993
|
* @param options - The query options.
|
|
992
994
|
* @returns The user's borrow positions.
|
|
993
995
|
*/
|
|
994
|
-
declare function userBorrows(client: AaveClient, request: UserBorrowsRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<UserBorrowItem[], UnexpectedError>;
|
|
995
|
-
type UserSummaryQueryOptions = Prettify<CurrencyQueryOptions & TimeWindowQueryOptions>;
|
|
996
|
+
declare function userBorrows(client: AaveClient, request: UserBorrowsRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<UserBorrowItem[], UnexpectedError>;
|
|
997
|
+
type UserSummaryQueryOptions = Prettify<CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions>;
|
|
996
998
|
/**
|
|
997
999
|
* Fetches a user's summary across all positions.
|
|
998
1000
|
*
|
|
@@ -1010,8 +1012,8 @@ type UserSummaryQueryOptions = Prettify<CurrencyQueryOptions & TimeWindowQueryOp
|
|
|
1010
1012
|
* @param options - The query options.
|
|
1011
1013
|
* @returns The user's financial summary.
|
|
1012
1014
|
*/
|
|
1013
|
-
declare function userSummary(client: AaveClient, request: UserSummaryRequest, { currency, timeWindow, }?: UserSummaryQueryOptions): ResultAsync<UserSummary, UnexpectedError>;
|
|
1014
|
-
type UserPositionQueryOptions = CurrencyQueryOptions & TimeWindowQueryOptions;
|
|
1015
|
+
declare function userSummary(client: AaveClient, request: UserSummaryRequest, { currency, timeWindow, requestPolicy, }?: UserSummaryQueryOptions): ResultAsync<UserSummary, UnexpectedError>;
|
|
1016
|
+
type UserPositionQueryOptions = CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions;
|
|
1015
1017
|
/**
|
|
1016
1018
|
* Fetches all user positions across specified chains.
|
|
1017
1019
|
*
|
|
@@ -1030,7 +1032,7 @@ type UserPositionQueryOptions = CurrencyQueryOptions & TimeWindowQueryOptions;
|
|
|
1030
1032
|
* @param options - The query options.
|
|
1031
1033
|
* @returns The user's positions across all specified chains.
|
|
1032
1034
|
*/
|
|
1033
|
-
declare function userPositions(client: AaveClient, request: UserPositionsRequest, { currency, timeWindow, }?: UserPositionQueryOptions): ResultAsync<UserPosition[], UnexpectedError>;
|
|
1035
|
+
declare function userPositions(client: AaveClient, request: UserPositionsRequest, { currency, timeWindow, requestPolicy, }?: UserPositionQueryOptions): ResultAsync<UserPosition[], UnexpectedError>;
|
|
1034
1036
|
/**
|
|
1035
1037
|
* Fetches a specific user position by ID.
|
|
1036
1038
|
*
|
|
@@ -1045,7 +1047,7 @@ declare function userPositions(client: AaveClient, request: UserPositionsRequest
|
|
|
1045
1047
|
* @param options - The query options.
|
|
1046
1048
|
* @returns The specific user position or null if not found.
|
|
1047
1049
|
*/
|
|
1048
|
-
declare function userPosition(client: AaveClient, request: UserPositionRequest, { currency, timeWindow, }?: UserPositionQueryOptions): ResultAsync<UserPosition | null, UnexpectedError>;
|
|
1050
|
+
declare function userPosition(client: AaveClient, request: UserPositionRequest, { currency, timeWindow, requestPolicy, }?: UserPositionQueryOptions): ResultAsync<UserPosition | null, UnexpectedError>;
|
|
1049
1051
|
/**
|
|
1050
1052
|
* Fetches all user balances across specified chains.
|
|
1051
1053
|
*
|
|
@@ -1063,7 +1065,7 @@ declare function userPosition(client: AaveClient, request: UserPositionRequest,
|
|
|
1063
1065
|
* @param options - The query options.
|
|
1064
1066
|
* @returns The user's balances across all specified chains.
|
|
1065
1067
|
**/
|
|
1066
|
-
declare function userBalances(client: AaveClient, request: UserBalancesRequest,
|
|
1068
|
+
declare function userBalances(client: AaveClient, request: UserBalancesRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<UserBalance[], UnexpectedError>;
|
|
1067
1069
|
/**
|
|
1068
1070
|
* Fetches user summary history over time.
|
|
1069
1071
|
*
|
|
@@ -1082,7 +1084,7 @@ declare function userBalances(client: AaveClient, request: UserBalancesRequest,
|
|
|
1082
1084
|
* @param options - The query options.
|
|
1083
1085
|
* @returns The user summary history items.
|
|
1084
1086
|
*/
|
|
1085
|
-
declare function userSummaryHistory(client: AaveClient, request: UserSummaryHistoryRequest,
|
|
1087
|
+
declare function userSummaryHistory(client: AaveClient, request: UserSummaryHistoryRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<UserSummaryHistoryItem[], UnexpectedError>;
|
|
1086
1088
|
/**
|
|
1087
1089
|
* Fetches the risk premium breakdown for a user position or spoke.
|
|
1088
1090
|
*
|
|
@@ -1097,8 +1099,9 @@ declare function userSummaryHistory(client: AaveClient, request: UserSummaryHist
|
|
|
1097
1099
|
*
|
|
1098
1100
|
* @param client - Aave client.
|
|
1099
1101
|
* @param request - The user risk premium breakdown request parameters.
|
|
1102
|
+
* @param options - The query options.
|
|
1100
1103
|
* @returns Array of risk premium breakdown items.
|
|
1101
1104
|
*/
|
|
1102
|
-
declare function userRiskPremiumBreakdown(client: AaveClient, request: UserRiskPremiumBreakdownRequest): ResultAsync<UserRiskPremiumBreakdownItem[], UnexpectedError>;
|
|
1105
|
+
declare function userRiskPremiumBreakdown(client: AaveClient, request: UserRiskPremiumBreakdownRequest, { requestPolicy, }?: RequestPolicyOptions): ResultAsync<UserRiskPremiumBreakdownItem[], UnexpectedError>;
|
|
1103
1106
|
|
|
1104
1107
|
export { type SwapOutcome, type UserPositionQueryOptions, type UserSummaryQueryOptions, activities, asset, assetBorrowHistory, assetPriceHistory, assetSupplyHistory, borrow, borrowApyHistory, borrowSwapQuote, cancelSwap, chain, chains, exchangeRate, hasProcessedKnownTransaction, hub, hubAssets, hubSummaryHistory, hubs, liquidatePosition, preparePositionSwap, prepareSwapCancel, prepareTokenSwap, preview, protocolHistory, renounceSpokeUserPositionManager, repay, repayWithSupplyQuote, reserve, reserves, setSpokeUserPositionManager, setUserSuppliesAsCollateral, spoke, spokePositionManagers, spokeUserPositionManagers, spokes, supply, supplyApyHistory, supplySwapQuote, swap, swapStatus, swappableTokens, tokenSwapQuote, updateUserPositionConditions, userBalances, userBorrows, userPosition, userPositions, userRiskPremiumBreakdown, userSummary, userSummaryHistory, userSupplies, userSwaps, waitForSwapOutcome, withdraw, withdrawSwapQuote };
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ declare function hub(client: AaveClient, request: HubRequest, options?: Currency
|
|
|
37
37
|
* @param options - The query options.
|
|
38
38
|
* @returns Array of hub data.
|
|
39
39
|
*/
|
|
40
|
-
declare function hubs(client: AaveClient, request: HubsRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<Hub[], UnexpectedError>;
|
|
40
|
+
declare function hubs(client: AaveClient, request: HubsRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<Hub[], UnexpectedError>;
|
|
41
41
|
/**
|
|
42
42
|
* Fetches hub assets for a specific hub by ID or by address and chain ID.
|
|
43
43
|
*
|
|
@@ -52,7 +52,7 @@ declare function hubs(client: AaveClient, request: HubsRequest, { currency, time
|
|
|
52
52
|
* @param options - The query options.
|
|
53
53
|
* @returns The hub assets array.
|
|
54
54
|
*/
|
|
55
|
-
declare function hubAssets(client: AaveClient, request: HubAssetsRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<HubAsset[], UnexpectedError>;
|
|
55
|
+
declare function hubAssets(client: AaveClient, request: HubAssetsRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<HubAsset[], UnexpectedError>;
|
|
56
56
|
/**
|
|
57
57
|
* Fetches historical summary data for a specific hub.
|
|
58
58
|
*
|
|
@@ -66,9 +66,10 @@ declare function hubAssets(client: AaveClient, request: HubAssetsRequest, { curr
|
|
|
66
66
|
*
|
|
67
67
|
* @param client - Aave client.
|
|
68
68
|
* @param request - The hub summary history request parameters.
|
|
69
|
+
* @param options - The query options.
|
|
69
70
|
* @returns Array of hub summary samples over time.
|
|
70
71
|
*/
|
|
71
|
-
declare function hubSummaryHistory(client: AaveClient, request: HubSummaryHistoryRequest): ResultAsync<HubSummarySample[], UnexpectedError>;
|
|
72
|
+
declare function hubSummaryHistory(client: AaveClient, request: HubSummaryHistoryRequest, { requestPolicy, }?: RequestPolicyOptions): ResultAsync<HubSummarySample[], UnexpectedError>;
|
|
72
73
|
|
|
73
74
|
/**
|
|
74
75
|
* Fetches a specific chain by chain ID.
|
|
@@ -81,13 +82,10 @@ declare function hubSummaryHistory(client: AaveClient, request: HubSummaryHistor
|
|
|
81
82
|
*
|
|
82
83
|
* @param client - Aave client.
|
|
83
84
|
* @param request - The chain request parameters.
|
|
85
|
+
* @param options - The query options.
|
|
84
86
|
* @returns The chain data, or null if not found.
|
|
85
87
|
*/
|
|
86
|
-
declare function chain(client: AaveClient, request: ChainRequest): ResultAsync<Chain | null, UnexpectedError>;
|
|
87
|
-
/**
|
|
88
|
-
* @internal
|
|
89
|
-
*/
|
|
90
|
-
declare function chain(client: AaveClient, request: ChainRequest, options: BatchOptions): ResultAsync<Chain | null, UnexpectedError>;
|
|
88
|
+
declare function chain(client: AaveClient, request: ChainRequest, { batch, requestPolicy, }?: BatchOptions & RequestPolicyOptions): ResultAsync<Chain | null, UnexpectedError>;
|
|
91
89
|
/**
|
|
92
90
|
* Fetches the list of supported chains.
|
|
93
91
|
*
|
|
@@ -128,9 +126,10 @@ declare function hasProcessedKnownTransaction(client: AaveClient, request: HasPr
|
|
|
128
126
|
*
|
|
129
127
|
* @param client - Aave client.
|
|
130
128
|
* @param request - The exchange rate request parameters.
|
|
129
|
+
* @param options - The query options.
|
|
131
130
|
* @returns The exchange rate information as a fiat amount.
|
|
132
131
|
*/
|
|
133
|
-
declare function exchangeRate(client: AaveClient, request: ExchangeRateRequest): ResultAsync<ExchangeAmount, UnexpectedError>;
|
|
132
|
+
declare function exchangeRate(client: AaveClient, request: ExchangeRateRequest, { requestPolicy, }?: RequestPolicyOptions): ResultAsync<ExchangeAmount, UnexpectedError>;
|
|
134
133
|
|
|
135
134
|
/**
|
|
136
135
|
* Fetches information about a specific asset (ERC20 token) in the protocol by ID or by token.
|
|
@@ -180,10 +179,10 @@ declare function assetPriceHistory(client: AaveClient, request: AssetPriceHistor
|
|
|
180
179
|
*
|
|
181
180
|
* @param client - Aave client.
|
|
182
181
|
* @param request - The asset supply history request parameters.
|
|
183
|
-
* @param options - The query options.
|
|
182
|
+
* @param options - The query options including currency and time window.
|
|
184
183
|
* @returns Array of asset supply samples over time.
|
|
185
184
|
*/
|
|
186
|
-
declare function assetSupplyHistory(client: AaveClient, request: AssetSupplyHistoryRequest,
|
|
185
|
+
declare function assetSupplyHistory(client: AaveClient, request: AssetSupplyHistoryRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<AssetSupplySample[], UnexpectedError>;
|
|
187
186
|
/**
|
|
188
187
|
* Fetches historical borrow data for a specific asset.
|
|
189
188
|
*
|
|
@@ -198,10 +197,10 @@ declare function assetSupplyHistory(client: AaveClient, request: AssetSupplyHist
|
|
|
198
197
|
*
|
|
199
198
|
* @param client - Aave client.
|
|
200
199
|
* @param request - The asset borrow history request parameters.
|
|
201
|
-
* @param options - The query options.
|
|
200
|
+
* @param options - The query options including currency and time window.
|
|
202
201
|
* @returns Array of asset borrow samples over time.
|
|
203
202
|
*/
|
|
204
|
-
declare function assetBorrowHistory(client: AaveClient, request: AssetBorrowHistoryRequest,
|
|
203
|
+
declare function assetBorrowHistory(client: AaveClient, request: AssetBorrowHistoryRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<AssetBorrowSample[], UnexpectedError>;
|
|
205
204
|
/**
|
|
206
205
|
* Fetches historical protocol-wide data (deposits, borrows, earnings).
|
|
207
206
|
*
|
|
@@ -234,7 +233,7 @@ declare function protocolHistory(client: AaveClient, request: ProtocolHistoryReq
|
|
|
234
233
|
* @param options - The query options.
|
|
235
234
|
* @returns The reserve data, or null if not found.
|
|
236
235
|
*/
|
|
237
|
-
declare function reserve(client: AaveClient, request: ReserveRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<Reserve | null, UnexpectedError>;
|
|
236
|
+
declare function reserve(client: AaveClient, request: ReserveRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<Reserve | null, UnexpectedError>;
|
|
238
237
|
/**
|
|
239
238
|
* Fetches reserves based on specified criteria.
|
|
240
239
|
*
|
|
@@ -256,7 +255,7 @@ declare function reserve(client: AaveClient, request: ReserveRequest, { currency
|
|
|
256
255
|
* @param options - The query options.
|
|
257
256
|
* @returns Array of reserves matching the criteria.
|
|
258
257
|
*/
|
|
259
|
-
declare function reserves(client: AaveClient, request: ReservesRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<Reserve[], UnexpectedError>;
|
|
258
|
+
declare function reserves(client: AaveClient, request: ReservesRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<Reserve[], UnexpectedError>;
|
|
260
259
|
/**
|
|
261
260
|
* Fetches borrow APY history for a specific reserve over time.
|
|
262
261
|
*
|
|
@@ -269,9 +268,10 @@ declare function reserves(client: AaveClient, request: ReservesRequest, { curren
|
|
|
269
268
|
*
|
|
270
269
|
* @param client - Aave client.
|
|
271
270
|
* @param request - The borrow APY history request parameters.
|
|
271
|
+
* @param options - The query options.
|
|
272
272
|
* @returns The borrow APY history samples.
|
|
273
273
|
*/
|
|
274
|
-
declare function borrowApyHistory(client: AaveClient, request: BorrowApyHistoryRequest): ResultAsync<ApySample[], UnexpectedError>;
|
|
274
|
+
declare function borrowApyHistory(client: AaveClient, request: BorrowApyHistoryRequest, { requestPolicy, }?: RequestPolicyOptions): ResultAsync<ApySample[], UnexpectedError>;
|
|
275
275
|
/**
|
|
276
276
|
* Fetches supply APY history for a specific reserve over time.
|
|
277
277
|
*
|
|
@@ -284,9 +284,10 @@ declare function borrowApyHistory(client: AaveClient, request: BorrowApyHistoryR
|
|
|
284
284
|
*
|
|
285
285
|
* @param client - Aave client.
|
|
286
286
|
* @param request - The supply APY history request parameters.
|
|
287
|
+
* @param options - The query options.
|
|
287
288
|
* @returns The supply APY history samples.
|
|
288
289
|
*/
|
|
289
|
-
declare function supplyApyHistory(client: AaveClient, request: SupplyApyHistoryRequest): ResultAsync<ApySample[], UnexpectedError>;
|
|
290
|
+
declare function supplyApyHistory(client: AaveClient, request: SupplyApyHistoryRequest, { requestPolicy, }?: RequestPolicyOptions): ResultAsync<ApySample[], UnexpectedError>;
|
|
290
291
|
|
|
291
292
|
/**
|
|
292
293
|
* Fetches a specific spoke.
|
|
@@ -367,7 +368,7 @@ declare function spokeUserPositionManagers(client: AaveClient, request: SpokeUse
|
|
|
367
368
|
* @param options - The query options.
|
|
368
369
|
* @returns The swap quote including pricing and cost information and plan to start executing the swap.
|
|
369
370
|
*/
|
|
370
|
-
declare function tokenSwapQuote(client: AaveClient, request: TokenSwapQuoteRequest,
|
|
371
|
+
declare function tokenSwapQuote(client: AaveClient, request: TokenSwapQuoteRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<TokenSwapQuoteResult, UnexpectedError>;
|
|
371
372
|
/**
|
|
372
373
|
* Fetches the list of tokens available for swapping on a specific chain.
|
|
373
374
|
*
|
|
@@ -379,9 +380,10 @@ declare function tokenSwapQuote(client: AaveClient, request: TokenSwapQuoteReque
|
|
|
379
380
|
*
|
|
380
381
|
* @param client - Aave client.
|
|
381
382
|
* @param request - The swappable tokens request parameters.
|
|
383
|
+
* @param options - The query options.
|
|
382
384
|
* @returns The list of tokens available for swapping.
|
|
383
385
|
*/
|
|
384
|
-
declare function swappableTokens(client: AaveClient, request: SwappableTokensRequest): ResultAsync<Token[], UnexpectedError>;
|
|
386
|
+
declare function swappableTokens(client: AaveClient, request: SwappableTokensRequest, { requestPolicy, }?: RequestPolicyOptions): ResultAsync<Token[], UnexpectedError>;
|
|
385
387
|
/**
|
|
386
388
|
* Prepares a swap for the specified trade parameters.
|
|
387
389
|
*
|
|
@@ -420,7 +422,7 @@ declare function prepareTokenSwap(client: AaveClient, request: PrepareTokenSwapR
|
|
|
420
422
|
* @param options - The query options.
|
|
421
423
|
* @returns The supply swap result with quote, approvals, and preview.
|
|
422
424
|
*/
|
|
423
|
-
declare function supplySwapQuote(client: AaveClient, request: SupplySwapQuoteRequest,
|
|
425
|
+
declare function supplySwapQuote(client: AaveClient, request: SupplySwapQuoteRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<PositionSwapByIntentApprovalsRequired, UnexpectedError>;
|
|
424
426
|
/**
|
|
425
427
|
* Fetches a borrow swap quote for swapping debt positions.
|
|
426
428
|
*
|
|
@@ -440,7 +442,7 @@ declare function supplySwapQuote(client: AaveClient, request: SupplySwapQuoteReq
|
|
|
440
442
|
* @param options - The query options.
|
|
441
443
|
* @returns The borrow swap result with quote, approvals, and preview.
|
|
442
444
|
*/
|
|
443
|
-
declare function borrowSwapQuote(client: AaveClient, request: BorrowSwapQuoteRequest,
|
|
445
|
+
declare function borrowSwapQuote(client: AaveClient, request: BorrowSwapQuoteRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<PositionSwapByIntentApprovalsRequired, UnexpectedError>;
|
|
444
446
|
/**
|
|
445
447
|
* Fetches a repay with supply quote for repaying debt using collateral.
|
|
446
448
|
*
|
|
@@ -460,7 +462,7 @@ declare function borrowSwapQuote(client: AaveClient, request: BorrowSwapQuoteReq
|
|
|
460
462
|
* @param options - The query options.
|
|
461
463
|
* @returns The repay with supply result with quote, approvals, and preview.
|
|
462
464
|
*/
|
|
463
|
-
declare function repayWithSupplyQuote(client: AaveClient, request: RepayWithSupplyQuoteRequest,
|
|
465
|
+
declare function repayWithSupplyQuote(client: AaveClient, request: RepayWithSupplyQuoteRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<PositionSwapByIntentApprovalsRequired, UnexpectedError>;
|
|
464
466
|
/**
|
|
465
467
|
* Fetches a withdraw swap quote for withdrawing deposits and swapping on the fly.
|
|
466
468
|
*
|
|
@@ -480,7 +482,7 @@ declare function repayWithSupplyQuote(client: AaveClient, request: RepayWithSupp
|
|
|
480
482
|
* @param options - The query options.
|
|
481
483
|
* @returns The withdraw swap result with quote, approvals, and preview.
|
|
482
484
|
*/
|
|
483
|
-
declare function withdrawSwapQuote(client: AaveClient, request: WithdrawSwapQuoteRequest,
|
|
485
|
+
declare function withdrawSwapQuote(client: AaveClient, request: WithdrawSwapQuoteRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<PositionSwapByIntentApprovalsRequired, UnexpectedError>;
|
|
484
486
|
/**
|
|
485
487
|
* Prepares a position swap by obtaining the typed data for signing.
|
|
486
488
|
*
|
|
@@ -511,7 +513,7 @@ declare function preparePositionSwap(client: AaveClient, request: PreparePositio
|
|
|
511
513
|
* @param options - The query options.
|
|
512
514
|
* @returns The current status of the swap.
|
|
513
515
|
*/
|
|
514
|
-
declare function swapStatus(client: AaveClient, request: SwapStatusRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<SwapStatus, UnexpectedError>;
|
|
516
|
+
declare function swapStatus(client: AaveClient, request: SwapStatusRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<SwapStatus, UnexpectedError>;
|
|
515
517
|
type SwapOutcome = SwapCancelled | SwapExpired | SwapFulfilled;
|
|
516
518
|
/**
|
|
517
519
|
* Waits for a swap to reach a final outcome (cancelled, expired, or fulfilled).
|
|
@@ -630,7 +632,7 @@ declare function cancelSwap(client: AaveClient, request: CancelSwapRequest): Res
|
|
|
630
632
|
* @param options - The query options.
|
|
631
633
|
* @returns The paginated list of user swaps with their status information.
|
|
632
634
|
*/
|
|
633
|
-
declare function userSwaps(client: AaveClient, request: UserSwapsRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<PaginatedUserSwapsResult, UnexpectedError>;
|
|
635
|
+
declare function userSwaps(client: AaveClient, request: UserSwapsRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<PaginatedUserSwapsResult, UnexpectedError>;
|
|
634
636
|
|
|
635
637
|
/**
|
|
636
638
|
* Creates a transaction to borrow from a market.
|
|
@@ -909,7 +911,7 @@ declare function setSpokeUserPositionManager(client: AaveClient, request: SetSpo
|
|
|
909
911
|
* @param options - The query options.
|
|
910
912
|
* @returns The preview result showing position changes.
|
|
911
913
|
*/
|
|
912
|
-
declare function preview(client: AaveClient, request: PreviewRequest,
|
|
914
|
+
declare function preview(client: AaveClient, request: PreviewRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<PreviewUserPosition, UnexpectedError>;
|
|
913
915
|
/**
|
|
914
916
|
* Updates the collateral status of user's supplies.
|
|
915
917
|
*
|
|
@@ -970,7 +972,7 @@ declare function activities(client: AaveClient, request: ActivitiesRequest, { cu
|
|
|
970
972
|
* @param options - The query options.
|
|
971
973
|
* @returns The user's supply positions.
|
|
972
974
|
*/
|
|
973
|
-
declare function userSupplies(client: AaveClient, request: UserSuppliesRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<UserSupplyItem[], UnexpectedError>;
|
|
975
|
+
declare function userSupplies(client: AaveClient, request: UserSuppliesRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<UserSupplyItem[], UnexpectedError>;
|
|
974
976
|
/**
|
|
975
977
|
* Fetches all user borrow positions across the specified spoke.
|
|
976
978
|
*
|
|
@@ -991,8 +993,8 @@ declare function userSupplies(client: AaveClient, request: UserSuppliesRequest,
|
|
|
991
993
|
* @param options - The query options.
|
|
992
994
|
* @returns The user's borrow positions.
|
|
993
995
|
*/
|
|
994
|
-
declare function userBorrows(client: AaveClient, request: UserBorrowsRequest, { currency, timeWindow, }?: CurrencyQueryOptions & TimeWindowQueryOptions): ResultAsync<UserBorrowItem[], UnexpectedError>;
|
|
995
|
-
type UserSummaryQueryOptions = Prettify<CurrencyQueryOptions & TimeWindowQueryOptions>;
|
|
996
|
+
declare function userBorrows(client: AaveClient, request: UserBorrowsRequest, { currency, timeWindow, requestPolicy, }?: CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions): ResultAsync<UserBorrowItem[], UnexpectedError>;
|
|
997
|
+
type UserSummaryQueryOptions = Prettify<CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions>;
|
|
996
998
|
/**
|
|
997
999
|
* Fetches a user's summary across all positions.
|
|
998
1000
|
*
|
|
@@ -1010,8 +1012,8 @@ type UserSummaryQueryOptions = Prettify<CurrencyQueryOptions & TimeWindowQueryOp
|
|
|
1010
1012
|
* @param options - The query options.
|
|
1011
1013
|
* @returns The user's financial summary.
|
|
1012
1014
|
*/
|
|
1013
|
-
declare function userSummary(client: AaveClient, request: UserSummaryRequest, { currency, timeWindow, }?: UserSummaryQueryOptions): ResultAsync<UserSummary, UnexpectedError>;
|
|
1014
|
-
type UserPositionQueryOptions = CurrencyQueryOptions & TimeWindowQueryOptions;
|
|
1015
|
+
declare function userSummary(client: AaveClient, request: UserSummaryRequest, { currency, timeWindow, requestPolicy, }?: UserSummaryQueryOptions): ResultAsync<UserSummary, UnexpectedError>;
|
|
1016
|
+
type UserPositionQueryOptions = CurrencyQueryOptions & TimeWindowQueryOptions & RequestPolicyOptions;
|
|
1015
1017
|
/**
|
|
1016
1018
|
* Fetches all user positions across specified chains.
|
|
1017
1019
|
*
|
|
@@ -1030,7 +1032,7 @@ type UserPositionQueryOptions = CurrencyQueryOptions & TimeWindowQueryOptions;
|
|
|
1030
1032
|
* @param options - The query options.
|
|
1031
1033
|
* @returns The user's positions across all specified chains.
|
|
1032
1034
|
*/
|
|
1033
|
-
declare function userPositions(client: AaveClient, request: UserPositionsRequest, { currency, timeWindow, }?: UserPositionQueryOptions): ResultAsync<UserPosition[], UnexpectedError>;
|
|
1035
|
+
declare function userPositions(client: AaveClient, request: UserPositionsRequest, { currency, timeWindow, requestPolicy, }?: UserPositionQueryOptions): ResultAsync<UserPosition[], UnexpectedError>;
|
|
1034
1036
|
/**
|
|
1035
1037
|
* Fetches a specific user position by ID.
|
|
1036
1038
|
*
|
|
@@ -1045,7 +1047,7 @@ declare function userPositions(client: AaveClient, request: UserPositionsRequest
|
|
|
1045
1047
|
* @param options - The query options.
|
|
1046
1048
|
* @returns The specific user position or null if not found.
|
|
1047
1049
|
*/
|
|
1048
|
-
declare function userPosition(client: AaveClient, request: UserPositionRequest, { currency, timeWindow, }?: UserPositionQueryOptions): ResultAsync<UserPosition | null, UnexpectedError>;
|
|
1050
|
+
declare function userPosition(client: AaveClient, request: UserPositionRequest, { currency, timeWindow, requestPolicy, }?: UserPositionQueryOptions): ResultAsync<UserPosition | null, UnexpectedError>;
|
|
1049
1051
|
/**
|
|
1050
1052
|
* Fetches all user balances across specified chains.
|
|
1051
1053
|
*
|
|
@@ -1063,7 +1065,7 @@ declare function userPosition(client: AaveClient, request: UserPositionRequest,
|
|
|
1063
1065
|
* @param options - The query options.
|
|
1064
1066
|
* @returns The user's balances across all specified chains.
|
|
1065
1067
|
**/
|
|
1066
|
-
declare function userBalances(client: AaveClient, request: UserBalancesRequest,
|
|
1068
|
+
declare function userBalances(client: AaveClient, request: UserBalancesRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<UserBalance[], UnexpectedError>;
|
|
1067
1069
|
/**
|
|
1068
1070
|
* Fetches user summary history over time.
|
|
1069
1071
|
*
|
|
@@ -1082,7 +1084,7 @@ declare function userBalances(client: AaveClient, request: UserBalancesRequest,
|
|
|
1082
1084
|
* @param options - The query options.
|
|
1083
1085
|
* @returns The user summary history items.
|
|
1084
1086
|
*/
|
|
1085
|
-
declare function userSummaryHistory(client: AaveClient, request: UserSummaryHistoryRequest,
|
|
1087
|
+
declare function userSummaryHistory(client: AaveClient, request: UserSummaryHistoryRequest, { currency, requestPolicy, }?: CurrencyQueryOptions & RequestPolicyOptions): ResultAsync<UserSummaryHistoryItem[], UnexpectedError>;
|
|
1086
1088
|
/**
|
|
1087
1089
|
* Fetches the risk premium breakdown for a user position or spoke.
|
|
1088
1090
|
*
|
|
@@ -1097,8 +1099,9 @@ declare function userSummaryHistory(client: AaveClient, request: UserSummaryHist
|
|
|
1097
1099
|
*
|
|
1098
1100
|
* @param client - Aave client.
|
|
1099
1101
|
* @param request - The user risk premium breakdown request parameters.
|
|
1102
|
+
* @param options - The query options.
|
|
1100
1103
|
* @returns Array of risk premium breakdown items.
|
|
1101
1104
|
*/
|
|
1102
|
-
declare function userRiskPremiumBreakdown(client: AaveClient, request: UserRiskPremiumBreakdownRequest): ResultAsync<UserRiskPremiumBreakdownItem[], UnexpectedError>;
|
|
1105
|
+
declare function userRiskPremiumBreakdown(client: AaveClient, request: UserRiskPremiumBreakdownRequest, { requestPolicy, }?: RequestPolicyOptions): ResultAsync<UserRiskPremiumBreakdownItem[], UnexpectedError>;
|
|
1103
1106
|
|
|
1104
1107
|
export { type SwapOutcome, type UserPositionQueryOptions, type UserSummaryQueryOptions, activities, asset, assetBorrowHistory, assetPriceHistory, assetSupplyHistory, borrow, borrowApyHistory, borrowSwapQuote, cancelSwap, chain, chains, exchangeRate, hasProcessedKnownTransaction, hub, hubAssets, hubSummaryHistory, hubs, liquidatePosition, preparePositionSwap, prepareSwapCancel, prepareTokenSwap, preview, protocolHistory, renounceSpokeUserPositionManager, repay, repayWithSupplyQuote, reserve, reserves, setSpokeUserPositionManager, setUserSuppliesAsCollateral, spoke, spokePositionManagers, spokeUserPositionManagers, spokes, supply, supplyApyHistory, supplySwapQuote, swap, swapStatus, swappableTokens, tokenSwapQuote, updateUserPositionConditions, userBalances, userBorrows, userPosition, userPositions, userRiskPremiumBreakdown, userSummary, userSummaryHistory, userSupplies, userSwaps, waitForSwapOutcome, withdraw, withdrawSwapQuote };
|
package/dist/actions/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{U as activities,j as asset,m as assetBorrowHistory,k as assetPriceHistory,l as assetSupplyHistory,K as borrow,q as borrowApyHistory,A as borrowSwapQuote,I as cancelSwap,f as chain,g as chains,i as exchangeRate,h as hasProcessedKnownTransaction,b as hub,d as hubAssets,e as hubSummaryHistory,c as hubs,Q as liquidatePosition,D as preparePositionSwap,H as prepareSwapCancel,y as prepareTokenSwap,S as preview,n as protocolHistory,O as renounceSpokeUserPositionManager,M as repay,B as repayWithSupplyQuote,o as reserve,p as reserves,R as setSpokeUserPositionManager,T as setUserSuppliesAsCollateral,s as spoke,u as spokePositionManagers,v as spokeUserPositionManagers,t as spokes,L as supply,r as supplyApyHistory,z as supplySwapQuote,G as swap,E as swapStatus,x as swappableTokens,w as tokenSwapQuote,P as updateUserPositionConditions,_ as userBalances,W as userBorrows,Z as userPosition,Y as userPositions,aa as userRiskPremiumBreakdown,X as userSummary,$ as userSummaryHistory,V as userSupplies,J as userSwaps,F as waitForSwapOutcome,N as withdraw,C as withdrawSwapQuote}from'../chunk-
|
|
1
|
+
export{U as activities,j as asset,m as assetBorrowHistory,k as assetPriceHistory,l as assetSupplyHistory,K as borrow,q as borrowApyHistory,A as borrowSwapQuote,I as cancelSwap,f as chain,g as chains,i as exchangeRate,h as hasProcessedKnownTransaction,b as hub,d as hubAssets,e as hubSummaryHistory,c as hubs,Q as liquidatePosition,D as preparePositionSwap,H as prepareSwapCancel,y as prepareTokenSwap,S as preview,n as protocolHistory,O as renounceSpokeUserPositionManager,M as repay,B as repayWithSupplyQuote,o as reserve,p as reserves,R as setSpokeUserPositionManager,T as setUserSuppliesAsCollateral,s as spoke,u as spokePositionManagers,v as spokeUserPositionManagers,t as spokes,L as supply,r as supplyApyHistory,z as supplySwapQuote,G as swap,E as swapStatus,x as swappableTokens,w as tokenSwapQuote,P as updateUserPositionConditions,_ as userBalances,W as userBorrows,Z as userPosition,Y as userPositions,aa as userRiskPremiumBreakdown,X as userSummary,$ as userSummaryHistory,V as userSupplies,J as userSwaps,F as waitForSwapOutcome,N as withdraw,C as withdrawSwapQuote}from'../chunk-35WSRP27.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {TimeWindow,Currency,HubQuery,HubsQuery,HubAssetsQuery,HubSummaryHistoryQuery,ChainQuery,ChainsQuery,HasProcessedKnownTransactionQuery,ExchangeRateQuery,AssetQuery,AssetPriceHistoryQuery,AssetSupplyHistoryQuery,AssetBorrowHistoryQuery,ProtocolHistoryQuery,ReserveQuery,ReservesQuery,BorrowApyHistoryQuery,SupplyApyHistoryQuery,SpokeQuery,SpokesQuery,SpokePositionManagersQuery,SpokeUserPositionManagersQuery,TokenSwapQuoteQuery,SwappableTokensQuery,PrepareTokenSwapQuery,SupplySwapQuoteQuery,BorrowSwapQuoteQuery,RepayWithSupplyQuoteQuery,WithdrawSwapQuoteQuery,PreparePositionSwapQuery,SwapStatusQuery,SwapMutation,PrepareSwapCancelQuery,CancelSwapMutation,UserSwapsQuery,BorrowQuery,SupplyQuery,RepayQuery,WithdrawQuery,RenounceSpokeUserPositionManagerQuery,UpdateUserPositionConditionsQuery,LiquidatePositionQuery,SetSpokeUserPositionManagerQuery,PreviewQuery,SetUserSuppliesAsCollateralQuery,ActivitiesQuery,UserSuppliesQuery,UserBorrowsQuery,UserSummaryQuery,UserPositionsQuery,UserPositionQuery,UserBalancesQuery,UserSummaryHistoryQuery,UserRiskPremiumBreakdownQuery}from'@aave/graphql';import {UnexpectedError,ValidationError,TimeoutError,delay}from'@aave/core';import {extendWithOpaqueType,okAsync,ResultAsync}from'@aave/types';var e={currency:Currency.Usd,timeWindow:TimeWindow.LastDay,requestPolicy:"cache-and-network",batch:true};function Ue(t,r,o=e){return t.query(HubQuery,{request:r,currency:o.currency??e.currency,timeWindow:o.timeWindow??e.timeWindow},{requestPolicy:o.requestPolicy??e.requestPolicy})}function xe(t,r,{currency:o=e.currency,timeWindow:n=e.timeWindow,requestPolicy:s=e.requestPolicy}=e){return t.query(HubsQuery,{request:r,currency:o,timeWindow:n},{requestPolicy:s})}function fe(t,r,{currency:o=e.currency,timeWindow:n=e.timeWindow,requestPolicy:s=e.requestPolicy}=e){return t.query(HubAssetsQuery,{request:r,currency:o,timeWindow:n},{requestPolicy:s})}function Qe(t,r,{requestPolicy:o=e.requestPolicy}=e){return t.query(HubSummaryHistoryQuery,{request:r},{requestPolicy:o})}function Ee(t,r,{batch:o=e.batch,requestPolicy:n=e.requestPolicy}=e){return t.query(ChainQuery,{request:r},{batch:o,requestPolicy:n})}function Te(t,r){return t.query(ChainsQuery,{request:r})}function he(t,r){return t.query(HasProcessedKnownTransactionQuery,{request:r},{requestPolicy:"network-only",batch:false})}function ke(t,r,{requestPolicy:o=e.requestPolicy}=e){return t.query(ExchangeRateQuery,{request:r},{requestPolicy:o})}function _e(t,r,{currency:o=e.currency,timeWindow:n=e.timeWindow,requestPolicy:s=e.requestPolicy}=e){return t.query(AssetQuery,{request:r,currency:o,timeWindow:n},{requestPolicy:s})}function be(t,r,o=e){return t.query(AssetPriceHistoryQuery,{request:r},{requestPolicy:o.requestPolicy??e.requestPolicy})}function ge(t,r,{currency:o=e.currency,timeWindow:n=e.timeWindow,requestPolicy:s=e.requestPolicy}=e){return t.query(AssetSupplyHistoryQuery,{request:r,currency:o,timeWindow:n},{requestPolicy:s})}function Ie(t,r,{currency:o=e.currency,timeWindow:n=e.timeWindow,requestPolicy:s=e.requestPolicy}=e){return t.query(AssetBorrowHistoryQuery,{request:r,currency:o,timeWindow:n},{requestPolicy:s})}function Me(t,r,o=e){return t.query(ProtocolHistoryQuery,{request:r},{requestPolicy:o.requestPolicy??e.requestPolicy})}function Ne(t,r,{currency:o=e.currency,timeWindow:n=e.timeWindow,requestPolicy:s=e.requestPolicy}=e){return t.query(ReserveQuery,{request:r,currency:o,timeWindow:n},{requestPolicy:s})}function Ye(t,r,{currency:o=e.currency,timeWindow:n=e.timeWindow,requestPolicy:s=e.requestPolicy}=e){return t.query(ReservesQuery,{request:r,currency:o,timeWindow:n},{requestPolicy:s})}function $e(t,r,{requestPolicy:o=e.requestPolicy}=e){return t.query(BorrowApyHistoryQuery,{request:r},{requestPolicy:o})}function Ke(t,r,{requestPolicy:o=e.requestPolicy}=e){return t.query(SupplyApyHistoryQuery,{request:r},{requestPolicy:o})}function je(t,r){return t.query(SpokeQuery,{request:r})}function ze(t,r){return t.query(SpokesQuery,{request:r})}function Je(t,r){return t.query(SpokePositionManagersQuery,{request:r})}function Xe(t,r){return t.query(SpokeUserPositionManagersQuery,{request:r})}function nt(t,r,{currency:o=e.currency,requestPolicy:n=e.requestPolicy}=e){return t.query(TokenSwapQuoteQuery,{request:r,currency:o},{batch:false,requestPolicy:n})}function st(t,r,{requestPolicy:o=e.requestPolicy}=e){return t.query(SwappableTokensQuery,{request:r},{requestPolicy:o})}function ut(t,r){return t.query(PrepareTokenSwapQuery,{request:r},{batch:false}).map(extendWithOpaqueType).andThen(o=>{switch(o.__typename){case "PrepareSwapOrder":return okAsync(o);case "InsufficientBalanceError":return ValidationError.fromGqlNode(o).asResultAsync();default:return UnexpectedError.upgradeRequired(`Unsupported result: ${o.__typename}`).asResultAsync()}})}function it(t,r,{currency:o=e.currency,requestPolicy:n=e.requestPolicy}=e){return t.query(SupplySwapQuoteQuery,{request:r,currency:o},{batch:false,requestPolicy:n}).map(extendWithOpaqueType).andThen(s=>{switch(s.__typename){case "PositionSwapByIntentApprovalsRequired":return okAsync(s);default:return UnexpectedError.upgradeRequired(`Unsupported result: ${s.__typename}`).asResultAsync()}})}function pt(t,r,{currency:o=e.currency,requestPolicy:n=e.requestPolicy}=e){return t.query(BorrowSwapQuoteQuery,{request:r,currency:o},{batch:false,requestPolicy:n}).map(extendWithOpaqueType).andThen(s=>{switch(s.__typename){case "PositionSwapByIntentApprovalsRequired":return okAsync(s);default:return UnexpectedError.upgradeRequired(`Unsupported result: ${s.__typename}`).asResultAsync()}})}function yt(t,r,{currency:o=e.currency,requestPolicy:n=e.requestPolicy}=e){return t.query(RepayWithSupplyQuoteQuery,{request:r,currency:o},{batch:false,requestPolicy:n}).map(extendWithOpaqueType).andThen(s=>{switch(s.__typename){case "PositionSwapByIntentApprovalsRequired":return okAsync(s);default:return UnexpectedError.upgradeRequired(`Unsupported result: ${s.__typename}`).asResultAsync()}})}function at(t,r,{currency:o=e.currency,requestPolicy:n=e.requestPolicy}=e){return t.query(WithdrawSwapQuoteQuery,{request:r,currency:o},{batch:false,requestPolicy:n}).map(extendWithOpaqueType).andThen(s=>{switch(s.__typename){case "PositionSwapByIntentApprovalsRequired":return okAsync(s);default:return UnexpectedError.upgradeRequired(`Unsupported result: ${s.__typename}`).asResultAsync()}})}function ct(t,r){return t.query(PreparePositionSwapQuery,{request:r},{batch:false}).map(extendWithOpaqueType).andThen(o=>{switch(o.__typename){case "PrepareSwapOrder":return okAsync(o);case "InsufficientBalanceError":return ValidationError.fromGqlNode(o).asResultAsync();default:return UnexpectedError.upgradeRequired(`Unsupported result: ${o.__typename}`).asResultAsync()}})}function J(t,r,{currency:o=e.currency,timeWindow:n=e.timeWindow,requestPolicy:s=e.requestPolicy}=e){return t.query(SwapStatusQuery,{request:r,currency:o,timeWindow:n},{requestPolicy:s})}function lt(t){return r=>{let o=async n=>{let s=Date.now();for(;Date.now()-s<t.context.environment.indexingTimeout;){let c=await J(t,n).match(y=>y,y=>{throw y});switch(c.__typename){case "SwapCancelled":case "SwapExpired":case "SwapFulfilled":return c;default:await delay(t.context.environment.pollingInterval);continue}}throw TimeoutError.from(`Timeout waiting for swap ${n.id} to reach final outcome.`)};return ResultAsync.fromPromise(o({id:r.id}),n=>n instanceof TimeoutError||n instanceof UnexpectedError?n:UnexpectedError.from(n))}}function Rt(t,r){return t.mutation(SwapMutation,{request:r}).map(extendWithOpaqueType).andThen(o=>{switch(o.__typename){case "SwapTransactionRequest":return okAsync(o);case "SwapReceipt":return okAsync(o);case "InsufficientBalanceError":return ValidationError.fromGqlNode(o).asResultAsync();default:return UnexpectedError.upgradeRequired(`Unsupported swap plan: ${o.__typename}`).asResultAsync()}})}function qt(t,r){return t.query(PrepareSwapCancelQuery,{request:r},{batch:false})}function mt(t,r){return t.mutation(CancelSwapMutation,{request:r})}function dt(t,r,{currency:o=e.currency,timeWindow:n=e.timeWindow,requestPolicy:s=e.requestPolicy}=e){return t.query(UserSwapsQuery,{request:r,currency:o,timeWindow:n},{requestPolicy:s})}function St(t,r){return t.query(BorrowQuery,{request:r})}function Ut(t,r){return t.query(SupplyQuery,{request:r})}function xt(t,r){return t.query(RepayQuery,{request:r})}function ft(t,r){return t.query(WithdrawQuery,{request:r})}function Qt(t,r){return t.query(RenounceSpokeUserPositionManagerQuery,{request:r})}function Ct(t,r){return t.query(UpdateUserPositionConditionsQuery,{request:r})}function Ot(t,r){return t.query(LiquidatePositionQuery,{request:r})}function vt(t,r){return t.query(SetSpokeUserPositionManagerQuery,{request:r})}function Et(t,r,{currency:o=e.currency,requestPolicy:n=e.requestPolicy}=e){return t.query(PreviewQuery,{request:r,currency:o},{requestPolicy:n})}function Tt(t,r){return t.query(SetUserSuppliesAsCollateralQuery,{request:r})}function ht(t,r,{currency:o=e.currency,timeWindow:n=e.timeWindow,requestPolicy:s=e.requestPolicy}=e){return t.query(ActivitiesQuery,{request:r,currency:o,timeWindow:n},{requestPolicy:s})}function Bt(t,r,{currency:o=e.currency,timeWindow:n=e.timeWindow,requestPolicy:s=e.requestPolicy}=e){return t.query(UserSuppliesQuery,{request:r,currency:o,timeWindow:n},{requestPolicy:s})}function _t(t,r,{currency:o=e.currency,timeWindow:n=e.timeWindow,requestPolicy:s=e.requestPolicy}=e){return t.query(UserBorrowsQuery,{request:r,currency:o,timeWindow:n},{requestPolicy:s})}function bt(t,r,{currency:o=e.currency,timeWindow:n=e.timeWindow,requestPolicy:s=e.requestPolicy}=e){return t.query(UserSummaryQuery,{request:r,currency:o,timeWindow:n},{requestPolicy:s})}function gt(t,r,{currency:o=e.currency,timeWindow:n=e.timeWindow,requestPolicy:s=e.requestPolicy}=e){return t.query(UserPositionsQuery,{request:r,currency:o,timeWindow:n},{requestPolicy:s})}function It(t,r,{currency:o=e.currency,timeWindow:n=e.timeWindow,requestPolicy:s=e.requestPolicy}=e){return t.query(UserPositionQuery,{request:r,currency:o,timeWindow:n},{requestPolicy:s})}function Mt(t,r,{currency:o=e.currency,requestPolicy:n=e.requestPolicy}=e){return t.query(UserBalancesQuery,{request:r,currency:o},{requestPolicy:n})}function Ft(t,r,{currency:o=e.currency,requestPolicy:n=e.requestPolicy}=e){return t.query(UserSummaryHistoryQuery,{request:r,currency:o},{requestPolicy:n})}function Lt(t,r,{requestPolicy:o=e.requestPolicy}=e){return t.query(UserRiskPremiumBreakdownQuery,{request:r},{requestPolicy:o})}export{Ft as $,pt as A,yt as B,at as C,ct as D,J as E,lt as F,Rt as G,qt as H,mt as I,dt as J,St as K,Ut as L,xt as M,ft as N,Qt as O,Ct as P,Ot as Q,vt as R,Et as S,Tt as T,ht as U,Bt as V,_t as W,bt as X,gt as Y,It as Z,Mt as _,e as a,Lt as aa,Ue as b,xe as c,fe as d,Qe as e,Ee as f,Te as g,he as h,ke as i,_e as j,be as k,ge as l,Ie as m,Me as n,Ne as o,Ye as p,$e as q,Ke as r,je as s,ze as t,Je as u,Xe as v,nt as w,st as x,ut as y,it as z};//# sourceMappingURL=chunk-35WSRP27.js.map
|
|
2
|
+
//# sourceMappingURL=chunk-35WSRP27.js.map
|