@aave/graphql 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2065 +0,0 @@
1
- 'use strict';var graphql=require('graphql');var e=`type APYSample {
2
- """The avg rate"""
3
- avgRate: PercentValue!
4
-
5
- """The date"""
6
- date: DateTime!
7
- }
8
-
9
- type AaveBorrowIncentive {
10
- borrowAprDiscount: PercentValue!
11
- rewardTokenAddress: EvmAddress!
12
- rewardTokenSymbol: String!
13
- }
14
-
15
- type AaveSupplyIncentive {
16
- extraSupplyApr: PercentValue!
17
- rewardTokenAddress: EvmAddress!
18
- rewardTokenSymbol: String!
19
- }
20
-
21
- scalar AlwaysTrue
22
-
23
- input AmountInput @oneOf {
24
- """The native amount"""
25
- native: BigDecimal
26
-
27
- """The erc20 amount input"""
28
- erc20: Erc20AmountInput
29
- }
30
-
31
- """
32
- Indicates that an approval transaction must be performed before proceeding to the next step.
33
- """
34
- type ApprovalRequired {
35
- """The transaction requires an approval first"""
36
- approval: TransactionRequest!
37
-
38
- """The reason for the approval"""
39
- reason: String!
40
-
41
- """The required amount missing to be able to do the original transaction"""
42
- requiredAmount: DecimalValue!
43
-
44
- """The current allowance approved"""
45
- currentAllowance: DecimalValue!
46
-
47
- """The transaction to send after the approval is complete"""
48
- originalTransaction: TransactionRequest!
49
- }
50
-
51
- input ApproveBorrowCreditDelegatorRequest {
52
- """The market pool address"""
53
- market: EvmAddress!
54
-
55
- """The underlying token address."""
56
- underlyingToken: EvmAddress!
57
-
58
- """
59
- Token value in its main unit to approve (e.g., 1.5 DAI), not in the smallest fraction (e.g. wei).
60
- """
61
- amount: BigDecimal!
62
-
63
- """The user allowing the delegation from"""
64
- user: EvmAddress!
65
-
66
- """The delegatee to approve the ability to borrow on the \`user\` behalf"""
67
- delegatee: EvmAddress!
68
-
69
- """The chain id"""
70
- chainId: ChainId!
71
- }
72
-
73
- scalar BigDecimal
74
-
75
- scalar BigInt
76
-
77
- scalar BlockchainData
78
-
79
- input BorrowAPYHistoryRequest {
80
- """The market pool address"""
81
- market: EvmAddress!
82
-
83
- """The underlying token for the reserve"""
84
- underlyingToken: EvmAddress!
85
-
86
- """The time windows for the history"""
87
- window: TimeWindow!
88
-
89
- """The chain id"""
90
- chainId: ChainId!
91
- }
92
-
93
- input BorrowAmountInput @oneOf {
94
- """The native amount"""
95
- native: BigDecimal
96
-
97
- """The erc20 amount input"""
98
- erc20: BorrowErc20AmountInput
99
- }
100
-
101
- input BorrowErc20AmountInput {
102
- """The token address."""
103
- currency: EvmAddress!
104
-
105
- """
106
- Token value in its main unit (e.g., 1.5 DAI), not in the smallest fraction (e.g.,
107
- wei).
108
- """
109
- value: BigDecimal!
110
- }
111
-
112
- input BorrowRequest {
113
- """The market pool address"""
114
- market: EvmAddress!
115
-
116
- """The amount borrowing"""
117
- amount: BorrowAmountInput!
118
-
119
- """The user sending the transaction (normally the user's wallet address)"""
120
- sender: EvmAddress!
121
-
122
- """
123
- If not supplied, this will use \`sender\` in most cases this is what the user wants if they want
124
- to borrow themselves. You can also pass in the credit delegator if the caller has
125
- been given credit delegation allowance. You can approve those with \`approveBorrowCreditDelegation\`.
126
- """
127
- onBehalfOf: EvmAddress
128
-
129
- """The chain id"""
130
- chainId: ChainId!
131
- }
132
-
133
- type Chain {
134
- name: String!
135
- icon: String!
136
- chainId: ChainId!
137
- explorerUrl: String!
138
- isTestnet: Boolean!
139
- nativeWrappedToken: EvmAddress!
140
- }
141
-
142
- """A supported blockchain chain ID"""
143
- scalar ChainId
144
-
145
- enum ChainsFilter {
146
- TESTNET_ONLY
147
- MAINNET_ONLY
148
- ALL
149
- }
150
-
151
- input CollateralToggleRequest {
152
- """The pool address for the market"""
153
- market: EvmAddress!
154
-
155
- """The underlying token for the reserve"""
156
- underlyingToken: EvmAddress!
157
-
158
- """The user to toggle emode on"""
159
- user: EvmAddress!
160
-
161
- """The chain id"""
162
- chainId: ChainId!
163
- }
164
-
165
- input CreditDelegateeAmountRequest {
166
- """The market pool address"""
167
- market: EvmAddress!
168
-
169
- """The underlying token address."""
170
- underlyingToken: EvmAddress!
171
-
172
- """The user allowing the delegation from"""
173
- user: EvmAddress!
174
-
175
- """The delegatee to approve the ability to borrow on the \`user\` behalf"""
176
- delegatee: EvmAddress!
177
-
178
- """The chain id"""
179
- chainId: ChainId!
180
- }
181
-
182
- type Currency {
183
- """The token address"""
184
- address: EvmAddress!
185
-
186
- """The chain id"""
187
- chainId: ChainId!
188
-
189
- """The token name"""
190
- name: String!
191
-
192
- """The token image"""
193
- imageUrl: String!
194
-
195
- """The token symbol"""
196
- symbol: String!
197
-
198
- """The token decimals"""
199
- decimals: Int!
200
- }
201
-
202
- scalar Cursor
203
-
204
- scalar DateTime
205
-
206
- input DebtToCover @oneOf {
207
- """Exact debt amount to cover"""
208
- exact: BigDecimal
209
-
210
- """Maximum debt amount (equivalent to uint(-1))"""
211
- max: AlwaysTrue
212
- }
213
-
214
- type DecimalValue {
215
- """The raw none formatted value"""
216
- raw: BigInt!
217
-
218
- """The decimals the value formatted into"""
219
- decimals: Int!
220
-
221
- """The formatted value"""
222
- value: BigDecimal!
223
- }
224
-
225
- type DomainData {
226
- name: String!
227
- version: String!
228
- chainId: ChainId!
229
- verifyingContract: EvmAddress!
230
- }
231
-
232
- input ERC712Signature {
233
- """The signature for the erc721"""
234
- value: Signature!
235
-
236
- """The deadline for the erc721"""
237
- deadline: Int!
238
- }
239
-
240
- type EmodeMarketCategory {
241
- """The eMode id for the market"""
242
- id: Int!
243
-
244
- """The eMode label"""
245
- label: String!
246
-
247
- """The maximum loan-to-value ratio in efficiency mode"""
248
- maxLTV: PercentValue!
249
-
250
- """The liquidation threshold in efficiency mode"""
251
- liquidationThreshold: PercentValue!
252
-
253
- """The liquidation penalty applied in efficiency mode"""
254
- liquidationPenalty: PercentValue!
255
-
256
- """The list of reserves which will tailor for this eMode"""
257
- reserves: [EmodeMarketReserveInfo!]!
258
- }
259
-
260
- type EmodeMarketReserveInfo {
261
- """The underlying token used on the reserve"""
262
- underlyingToken: Currency!
263
-
264
- """If the underlying token can be collateral with this eMode on"""
265
- canBeCollateral: Boolean!
266
-
267
- """If the underlying token can be borrowed with this eMode on"""
268
- canBeBorrowed: Boolean!
269
- }
270
-
271
- """The emode reserve information"""
272
- type EmodeReserveInfo {
273
- """The eMode category id for the market"""
274
- categoryId: Int!
275
-
276
- """The eMode label"""
277
- label: String!
278
-
279
- """The maximum loan-to-value ratio in efficiency mode"""
280
- maxLTV: PercentValue!
281
-
282
- """The liquidation threshold in efficiency mode"""
283
- liquidationThreshold: PercentValue!
284
-
285
- """The liquidation penalty applied in efficiency mode"""
286
- liquidationPenalty: PercentValue!
287
-
288
- """If the underlying token can be collateral with this eMode on"""
289
- canBeCollateral: Boolean!
290
-
291
- """If the underlying token can be borrowed with this eMode on"""
292
- canBeBorrowed: Boolean!
293
- }
294
-
295
- input Erc20AmountInput {
296
- """The token address."""
297
- currency: EvmAddress!
298
-
299
- """
300
- Token value in its main unit (e.g., 1.5 DAI), not in the smallest fraction (e.g.,
301
- wei).
302
- """
303
- value: BigDecimal!
304
-
305
- """
306
- The signed ERC20 permit message to operate on the relevant token without need for an ERC20 Approval transaction.
307
- """
308
- permitSig: ERC712Signature
309
- }
310
-
311
- scalar EvmAddress
312
-
313
- """
314
- An execution plan represents what needs to happen to fulfill a requested operation.
315
- It could be an immediate transaction, an approval followed by a transaction, or indicate insufficient balance.
316
- """
317
- union ExecutionPlan = TransactionRequest | ApprovalRequired | InsufficientBalanceError
318
-
319
- input ForkTopUpErc20 {
320
- """The token address"""
321
- currency: EvmAddress!
322
-
323
- """
324
- Token value in its main unit (e.g., 1.5 DAI), not in the smallest fraction
325
- """
326
- value: BigDecimal!
327
- }
328
-
329
- input ForkTopUpRequest {
330
- """The address you want the funds to be topped up against"""
331
- user: EvmAddress!
332
-
333
- """The erc20 information"""
334
- erc20: ForkTopUpErc20
335
-
336
- """
337
- Token value in its main unit (e.g., 1.5 DAI), not in the smallest fraction
338
- """
339
- native: BigDecimal
340
- }
341
-
342
- type ForkTopUpResponse {
343
- message: String!
344
-
345
- """The tx hash of the newly created transaction"""
346
- txHash: String
347
- }
348
-
349
- input HasProcessedKnownTransactionRequest {
350
- """
351
- The operation type this is given to you on the TransactionRequest::operation
352
- """
353
- operation: OperationType!
354
-
355
- """The tx hash"""
356
- txHash: TxHash!
357
- }
358
-
359
- input HealthFactorPreviewRequest {
360
- """The action to simulate"""
361
- action: PreviewAction!
362
- }
363
-
364
- type HealthFactorPreviewResponse {
365
- """
366
- The user health factor before - if null, they don't have one because they are not borrowing
367
- """
368
- before: BigDecimal
369
-
370
- """
371
- The user health factor after - if null, they don't have one because they are not borrowing
372
- """
373
- after: BigDecimal
374
- }
375
-
376
- """
377
- Indicates the user does not have enough balance to perform the operation.
378
- """
379
- type InsufficientBalanceError {
380
- """The amount required to do the original transaction"""
381
- required: DecimalValue!
382
-
383
- """The amount available in the wallet"""
384
- available: DecimalValue!
385
- }
386
-
387
- input LiquidateRequest {
388
- """The market pool address"""
389
- market: EvmAddress!
390
-
391
- """
392
- The address of the token used as collateral, to receive as result of the liquidation
393
- """
394
- collateralToken: EvmAddress!
395
-
396
- """
397
- The address of the underlying borrowed token to be repaid with the liquidation
398
- """
399
- underlyingToken: EvmAddress!
400
-
401
- """The address of the borrower getting liquidated"""
402
- user: EvmAddress!
403
-
404
- """
405
- The debt amount of the underlying borrowed token the liquidator will repay
406
- """
407
- debtToCover: DebtToCover! = {max: true}
408
-
409
- """
410
- true if the liquidator wants to receive the aTokens equivalent of the purchased collateral, false if they want to receive the collateral asset directly
411
- """
412
- receiveAToken: Boolean! = false
413
-
414
- """The chain id"""
415
- chainId: ChainId!
416
- }
417
-
418
- """Information about collateral liquidated in a liquidation call."""
419
- type LiquidationCollateral {
420
- """Reserve of the collateral."""
421
- reserve: ReserveInfo!
422
-
423
- """Amount of collateral liquidated"""
424
- amount: TokenAmount
425
- }
426
-
427
- """Information about debt repaid in a liquidation call."""
428
- type LiquidationRepaidDebt {
429
- """Reserve of the repaid debt."""
430
- reserve: ReserveInfo!
431
-
432
- """Amount of debt repaid."""
433
- amount: TokenAmount!
434
- }
435
-
436
- type Market {
437
- """The human-friendly name for the market"""
438
- name: String!
439
-
440
- """The chain"""
441
- chain: Chain!
442
-
443
- """The liquidity pool address for the market"""
444
- address: EvmAddress!
445
-
446
- """A list eModes the market can support"""
447
- eModeCategories: [EmodeMarketCategory!]!
448
- userState: MarketUserState
449
-
450
- """The market icon"""
451
- icon: String!
452
-
453
- """The market reserves"""
454
- reserves(request: MarketReservesRequest! = {reserveType: BOTH, orderBy: {tokenName: ASC}}): [Reserve!]!
455
-
456
- """The total market size"""
457
- totalMarketSize: BigDecimal!
458
-
459
- """The total available liquidity in USD"""
460
- totalAvailableLiquidity: BigDecimal!
461
- }
462
-
463
- type MarketInfo {
464
- """The human-friendly name for the market"""
465
- name: String!
466
-
467
- """The chain"""
468
- chain: Chain!
469
-
470
- """The liquidity pool address for the market"""
471
- address: EvmAddress!
472
-
473
- """The market icon"""
474
- icon: String!
475
- }
476
-
477
- input MarketInput {
478
- """The address of the market pool"""
479
- address: EvmAddress!
480
-
481
- """The chain id the market is deployed on"""
482
- chainId: ChainId!
483
- }
484
-
485
- input MarketRequest {
486
- """The pool address for the market"""
487
- address: EvmAddress!
488
-
489
- """The chain id the market pool address is deployed on"""
490
- chainId: ChainId!
491
-
492
- """
493
- The user viewing it (can be connected wallet) - this caters for stuff like eMode and other user features
494
- """
495
- user: EvmAddress
496
- }
497
-
498
- input MarketReservesRequest {
499
- """The reserve type"""
500
- reserveType: MarketReservesRequestType! = BOTH
501
-
502
- """The way the reserve gets ordered on the return result"""
503
- orderBy: MarketReservesRequestOrderBy! = {tokenName: ASC}
504
- }
505
-
506
- input MarketReservesRequestOrderBy @oneOf {
507
- """Order by the borrow APY"""
508
- borrowApy: OrderDirection
509
-
510
- """Order by the supply APY"""
511
- supplyApy: OrderDirection
512
-
513
- """Order by the token name"""
514
- tokenName: OrderDirection
515
- }
516
-
517
- enum MarketReservesRequestType {
518
- SUPPLY
519
- BORROW
520
- BOTH
521
- }
522
-
523
- type MarketUserReserveBorrowPosition {
524
- """The market address where this position exists"""
525
- market: MarketInfo!
526
-
527
- """The currency being borrowed"""
528
- currency: Currency!
529
-
530
- """The user's debt balance in this reserve"""
531
- debt: TokenAmount!
532
-
533
- """The annual percentage yield for this borrow position"""
534
- apy: PercentValue!
535
- }
536
-
537
- type MarketUserReserveSupplyPosition {
538
- """The market address where this position exists"""
539
- market: MarketInfo!
540
-
541
- """The currency being supplied"""
542
- currency: Currency!
543
-
544
- """The user's supply balance in this reserve"""
545
- balance: TokenAmount!
546
-
547
- """The annual percentage yield for this supply position"""
548
- apy: PercentValue!
549
-
550
- """Whether this position is being used as collateral"""
551
- isCollateral: Boolean!
552
-
553
- """If the asset can be used for collateral"""
554
- canBeCollateral: Boolean!
555
- }
556
-
557
- type MarketUserState {
558
- """The user's total net worth in the market"""
559
- netWorth: BigDecimal!
560
-
561
- """The user's net annual percentage yield across all positions"""
562
- netAPY: PercentValue!
563
-
564
- """
565
- The user's health factor (risk metric for liquidation) - if null, the user does not have a borrow
566
- """
567
- healthFactor: BigDecimal
568
-
569
- """Whether efficiency mode is enabled for the user"""
570
- eModeEnabled: Boolean!
571
-
572
- """
573
- The total collateral of the user in the base currency used by the price feed
574
- """
575
- totalCollateralBase: BigDecimal!
576
-
577
- """The total debt of the user in the base currency used by the price feed"""
578
- totalDebtBase: BigDecimal!
579
-
580
- """
581
- The borrowing power left of the user in the base currency used by the price feed
582
- """
583
- availableBorrowsBase: BigDecimal!
584
-
585
- """The liquidation threshold of the user"""
586
- currentLiquidationThreshold: PercentValue!
587
-
588
- """The loan to value of the user"""
589
- ltv: PercentValue!
590
-
591
- """One of the user collateral is in isolation mode"""
592
- isInIsolationMode: Boolean!
593
- }
594
-
595
- input MarketsRequest {
596
- """The markets you want to see based on the chain ids"""
597
- chainIds: [ChainId!]!
598
-
599
- """
600
- The user viewing it (can be connected wallet) - this caters for stuff like eMode and other
601
- user features
602
- """
603
- user: EvmAddress
604
- }
605
-
606
- type MeritBorrowAndSupplyIncentiveCondition {
607
- """The APR incentive for meeting the conditions"""
608
- extraApr: PercentValue!
609
-
610
- """The token that must be supplied as collateral"""
611
- supplyToken: Currency!
612
-
613
- """The token that must be borrowed"""
614
- borrowToken: Currency!
615
-
616
- """Where you can go and claim the incentives"""
617
- claimLink: URL!
618
- }
619
-
620
- type MeritBorrowIncentive {
621
- """Extra APR for borrowing this asset from AAVE Merit program"""
622
- borrowAprDiscount: PercentValue!
623
-
624
- """Where you can go and claim the incentives"""
625
- claimLink: URL!
626
- }
627
-
628
- type MeritSupplyIncentive {
629
- """Extra APR for supplying this asset from AAVE Merit program"""
630
- extraSupplyApr: PercentValue!
631
-
632
- """Where you can go and claim the incentives"""
633
- claimLink: URL!
634
- }
635
-
636
- type MessageData {
637
- owner: EvmAddress!
638
- spender: EvmAddress!
639
- value: BigInt!
640
- nonce: BigInt!
641
- deadline: Int!
642
- }
643
-
644
- type NativeCurrency {
645
- """The token image"""
646
- imageUrl: String!
647
-
648
- """The token name"""
649
- name: String!
650
-
651
- """The token symbol"""
652
- symbol: String!
653
-
654
- """The token decimals"""
655
- decimals: Int!
656
-
657
- """The chain id"""
658
- chainId: ChainId!
659
-
660
- """The wrapped version of this token"""
661
- wrappedToken: EvmAddress!
662
- }
663
-
664
- enum OperationType {
665
- BORROW
666
- REPAY
667
- RESERVE_USED_AS_COLLATERAL_ENABLED
668
- RESERVE_USED_AS_COLLATERAL_DISABLED
669
- SUPPLY
670
- USER_EMODE_SET
671
- WITHDRAW
672
- VAULT_DEPLOYED
673
- VAULT_DEPOSIT
674
- VAULT_FEE_UPDATED
675
- VAULT_FEE_WITHDRAWN
676
- VAULT_WITHDRAW
677
- LIQUIDATION
678
- }
679
-
680
- enum OrderDirection {
681
- ASC
682
- DESC
683
- }
684
-
685
- enum PageSize {
686
- TEN
687
- FIFTY
688
- }
689
-
690
- type PaginatedResultInfo {
691
- """The cursor to the previous page of results, if any."""
692
- prev: Cursor
693
-
694
- """The cursor to the next page of results, if any."""
695
- next: Cursor
696
- }
697
-
698
- """Paginated result of user transaction history."""
699
- type PaginatedUserTransactionHistoryResult {
700
- """List of user transaction items."""
701
- items: [UserTransactionItem!]!
702
-
703
- """Pagination information."""
704
- pageInfo: PaginatedResultInfo!
705
- }
706
-
707
- type PaginatedVaultUserTransactionHistoryResult {
708
- items: [VaultUserTransactionItem!]!
709
- pageInfo: PaginatedResultInfo!
710
- }
711
-
712
- type PaginatedVaultsResult {
713
- items: [Vault!]!
714
- pageInfo: PaginatedResultInfo!
715
- }
716
-
717
- type PercentValue {
718
- """The raw none normalized percentage (the value that lives onchain)"""
719
- raw: BigInt!
720
-
721
- """The decimals representing the precision of the onchain raw value"""
722
- decimals: Int!
723
-
724
- """The normalized percentage (1.0 = 100%)"""
725
- value: BigDecimal!
726
-
727
- """
728
- The human-readable formatted value you can render on a UI straight away.
729
- For example, this will turn \`0.01232343\` to \`1.23\`, it will always round to \`2\` decimal points.
730
- """
731
- formatted: BigDecimal!
732
- }
733
-
734
- input PermitRequest {
735
- """The spender (when doing this with aave this is the market address)"""
736
- spender: EvmAddress!
737
-
738
- """The token you want to do the permit with"""
739
- currency: EvmAddress!
740
-
741
- """
742
- The amount to permit - in human-readable form aka 0.001 eth is 0.001 eth here
743
- """
744
- amount: BigDecimal!
745
-
746
- """The chain id the pool is deployed on"""
747
- chainId: ChainId!
748
-
749
- """The owner of the funds"""
750
- owner: EvmAddress!
751
- }
752
-
753
- type PermitTypedDataResponse {
754
- types: TypeDefinition!
755
- primaryType: String!
756
- domain: DomainData!
757
- message: MessageData!
758
- }
759
-
760
- input PreviewAction @oneOf {
761
- supply: SupplyRequest
762
- borrow: BorrowRequest
763
- repay: RepayRequest
764
- withdraw: WithdrawRequest
765
- }
766
-
767
- type Query {
768
- """Get if the API is healthy"""
769
- health: Boolean!
770
-
771
- """Chains the protocol supports"""
772
- chains(filter: ChainsFilter! = ALL): [Chain!]!
773
-
774
- """
775
- Deposits assets (underlying tokens or its related aTokens) into the vault and mints a corresponding amount of vault shares to the receiver.
776
- """
777
- vaultDeposit(request: VaultDepositRequest!): ExecutionPlan!
778
-
779
- """
780
- Redeems shares (vault shares) for the underlying assets or a tokens, which are sent to the receiver. The shares are burned from the owner.
781
- """
782
- vaultRedeemShares(request: VaultRedeemSharesRequest!): TransactionRequest!
783
-
784
- """Get a vault"""
785
- vault(request: VaultRequest!): Vault
786
-
787
- """Get vaults"""
788
- vaults(request: VaultsRequest!): PaginatedVaultsResult!
789
-
790
- """User vaults they have shares in"""
791
- userVaults(request: UserVaultsRequest!): PaginatedVaultsResult!
792
-
793
- """Deploy a vault and earn fees from the yield"""
794
- vaultDeploy(request: VaultDeployRequest!): ExecutionPlan!
795
-
796
- """
797
- Update a vault's fee. You MUST be the owner of the vault to send this tx request.
798
- """
799
- vaultSetFee(request: VaultSetFeeRequest!): TransactionRequest!
800
-
801
- """
802
- Withdraws accumulated fees from the specified vault. You MUST be the owner of the vault to send this tx request.
803
- """
804
- vaultWithdrawFees(request: VaultWithdrawFeesRequest!): TransactionRequest!
805
-
806
- """User vault transaction history"""
807
- vaultUserTransactionHistory(request: VaultUserTransactionHistoryRequest!): PaginatedVaultUserTransactionHistoryResult!
808
-
809
- """
810
- Vault user activity for a given vault and user, within a specified time window.
811
- """
812
- vaultUserActivity(request: VaultUserActivityRequest!): VaultUserActivityResult!
813
-
814
- """
815
- Withdraws assets (underlying tokens or its related aTokens) from the vault and sends them to the receiver. The corresponding vault shares are burned from the owner.
816
- """
817
- vaultWithdraw(request: VaultWithdrawRequest!): TransactionRequest!
818
-
819
- """
820
- Mints an exact amount of shares (vault shares) to the receiver by depositing the calculated amount of underlying or aTokens assets.
821
- """
822
- vaultMintShares(request: VaultMintSharesRequest!): ExecutionPlan!
823
-
824
- """
825
- This will return you the amount of shares that would be minted to the receiver
826
- """
827
- vaultPreviewDeposit(request: VaultOperationPreviewRequest!): TokenAmount!
828
-
829
- """
830
- This will return you the amount of assets that would be deposited by the caller
831
- """
832
- vaultPreviewMint(request: VaultOperationPreviewRequest!): TokenAmount!
833
-
834
- """
835
- This will return you the number of shares burnt based on the amount of assets you want to withdraw
836
- """
837
- vaultPreviewWithdraw(request: VaultOperationPreviewRequest!): TokenAmount!
838
-
839
- """
840
- This will return you the amount of assets that would be withdrawn by the receiver.
841
- """
842
- vaultPreviewRedeem(request: VaultOperationPreviewRequest!): TokenAmount!
843
-
844
- """Lists all the markets"""
845
- markets(request: MarketsRequest!): [Market!]!
846
-
847
- """Get a market"""
848
- market(request: MarketRequest!): Market
849
-
850
- """Create the transaction to borrow from a market"""
851
- borrow(request: BorrowRequest!): ExecutionPlan!
852
-
853
- """Approve a credit borrow delegator to be able to borrow on your behalf"""
854
- approveBorrowCreditDelegation(request: ApproveBorrowCreditDelegatorRequest!): TransactionRequest!
855
-
856
- """
857
- Gets the amount delegated to the credit delegatee that can borrow on your behalf
858
- """
859
- creditDelegateeAllowance(request: CreditDelegateeAmountRequest!): TokenAmount!
860
-
861
- """Create the transaction to supply to a market"""
862
- supply(request: SupplyRequest!): ExecutionPlan!
863
-
864
- """Create the transaction to repay to a market"""
865
- repay(request: RepayRequest!): ExecutionPlan!
866
-
867
- """Create the transaction to withdraw from a market"""
868
- withdraw(request: WithdrawRequest!): ExecutionPlan!
869
-
870
- """Create the transaction to toggle eMode for a market"""
871
- userSetEmode(request: UserSetEmodeRequest!): TransactionRequest!
872
-
873
- """Enable/disable a specific supplied asset as collateral"""
874
- collateralToggle(request: CollateralToggleRequest!): TransactionRequest!
875
-
876
- """
877
- liquidate a non-healthy position collateral-wise, with Health Factor below 1
878
- """
879
- liquidate(request: LiquidateRequest!): TransactionRequest!
880
-
881
- """Returns the user account market data across all the reserves."""
882
- userMarketState(request: UserMarketStateRequest!): MarketUserState!
883
-
884
- """The usd exchange rates for different tokens on a given market"""
885
- usdExchangeRates(request: UsdExchangeRatesRequest!): [UsdExchangeRate!]!
886
-
887
- """Get all the user borrows positions"""
888
- userBorrows(request: UserBorrowsRequest!): [MarketUserReserveBorrowPosition!]!
889
-
890
- """Get all the user supplies positions"""
891
- userSupplies(request: UserSuppliesRequest!): [MarketUserReserveSupplyPosition!]!
892
-
893
- """Get the borrow APY history"""
894
- borrowAPYHistory(request: BorrowAPYHistoryRequest!): [APYSample!]!
895
-
896
- """Get the supply APY history"""
897
- supplyAPYHistory(request: SupplyAPYHistoryRequest!): [APYSample!]!
898
-
899
- """Generate EIP-712 typed data for EIP-2612 permit signature"""
900
- permitTypedData(request: PermitRequest!): PermitTypedDataResponse!
901
-
902
- """Get the reserve for on a market"""
903
- reserve(request: ReserveRequest!): Reserve
904
-
905
- """The user's market transaction history"""
906
- userTransactionHistory(request: UserTransactionHistoryRequest!): PaginatedUserTransactionHistoryResult!
907
-
908
- """
909
- This lets you know the API has processed the known transaction hash, as the API uses caching to make things as fast
910
- as possible, it has an invalidation task, so sometimes if the receipt is complete, we may still (rarely) serve
911
- old data for 100-200ms longer, it's best to query after you got the receipt to be told that it is ready to go.
912
- Note the invalidation is very quick, and most of the time it's present even before your receipt is returned this is to
913
- cater for the race condition.
914
- """
915
- hasProcessedKnownTransaction(request: HasProcessedKnownTransactionRequest!): Boolean!
916
- healthFactorPreview(request: HealthFactorPreviewRequest!): HealthFactorPreviewResponse!
917
-
918
- """Top up a balance for a user or yourself on the fork"""
919
- forkTopUp(request: ForkTopUpRequest!): ForkTopUpResponse!
920
- }
921
-
922
- input RepayAmountInput @oneOf {
923
- """The native amount"""
924
- native: BigDecimal
925
-
926
- """The erc20 amount input"""
927
- erc20: RepayErc20AmountInput
928
- }
929
-
930
- input RepayErc20Amount @oneOf {
931
- """
932
- Exact amount to repay
933
- Token value in its main unit (e.g., 1.5 GHO), not in the smallest fraction (e.g., wei).
934
- """
935
- exact: BigDecimal
936
-
937
- """Repay all the amount completely"""
938
- max: AlwaysTrue
939
- }
940
-
941
- input RepayErc20AmountInput {
942
- """The token address."""
943
- currency: EvmAddress!
944
-
945
- """The amount to repay"""
946
- value: RepayErc20Amount!
947
-
948
- """
949
- The signed ERC20 permit message to operate on the relevant token without the need for an ERC20 Approval transaction.
950
- """
951
- permitSig: ERC712Signature
952
- }
953
-
954
- input RepayRequest {
955
- """The market pool address"""
956
- market: EvmAddress!
957
-
958
- """
959
- The amount to repay - you can pass in the underlying or the aToken if you pass in the aToken address, it will repay with the aToken
960
- """
961
- amount: RepayAmountInput!
962
-
963
- """The user sending the transaction (normally the user's wallet address)"""
964
- sender: EvmAddress!
965
-
966
- """
967
- If not supplied, this will use \`sender\`. The address of the user who will get their debt reduced/removed. This should be the address of the user calling the function if they want to
968
- """
969
- onBehalfOf: EvmAddress
970
-
971
- """The chain id"""
972
- chainId: ChainId!
973
- }
974
-
975
- type Reserve {
976
- """The market information the reserve is under"""
977
- market: MarketInfo!
978
-
979
- """The reserve underlying currency"""
980
- underlyingToken: Currency!
981
-
982
- """The reserve a token"""
983
- aToken: Currency!
984
-
985
- """The reserve v token"""
986
- vToken: Currency!
987
-
988
- """
989
- If the reserve accepts native currency, for example, if you're on a reserve with asset WETH, it can
990
- also accept ETH
991
- """
992
- acceptsNative: NativeCurrency
993
-
994
- """The reserve size"""
995
- size: TokenAmount!
996
-
997
- """The usd exchange rate for the underlying token"""
998
- usdExchangeRate: BigDecimal!
999
-
1000
- """The usd oracle address it is pulling that price from"""
1001
- usdOracleAddress: EvmAddress!
1002
-
1003
- """The supply info for the reserve"""
1004
- supplyInfo: ReserveSupplyInfo!
1005
-
1006
- """
1007
- The borrow info for the reserve - if its null the underlying token cannot be borrowed
1008
- """
1009
- borrowInfo: ReserveBorrowInfo
1010
-
1011
- """The reserve has been frozen all actions are stopped"""
1012
- isFrozen: Boolean!
1013
-
1014
- """The reserve is paused you can still withdraw and some other actions"""
1015
- isPaused: Boolean!
1016
-
1017
- """
1018
- If the reserve supports isolation mode this is defined and the configs are defined
1019
- """
1020
- isolationModeConfig: ReserveIsolationModeConfig
1021
-
1022
- """If the reserve can use flash loans on it"""
1023
- flashLoanEnabled: Boolean!
1024
-
1025
- """Does the underlying reserve support permit"""
1026
- permitSupported: Boolean!
1027
-
1028
- """
1029
- This exposes the extra incentives you can earn from third parties (Merit) or from
1030
- incentives set by governance through the RewardsController.
1031
- Note Aave Labs does not guarantee third party program and accepts no liability to those
1032
- """
1033
- incentives: [ReserveIncentive!]!
1034
-
1035
- """The emode information for the reserve"""
1036
- eModeInfo: [EmodeReserveInfo!]!
1037
-
1038
- """Get the user state on the reserve"""
1039
- userState: ReserveUserState
1040
- }
1041
-
1042
- type ReserveBorrowInfo {
1043
- """The annual percentage yield for borrowing this asset"""
1044
- apy: PercentValue!
1045
-
1046
- """The total amount borrowed from this reserve"""
1047
- total: TokenAmount!
1048
-
1049
- """The reserve factor percentage"""
1050
- reserveFactor: PercentValue!
1051
-
1052
- """The available liquidity"""
1053
- availableLiquidity: TokenAmount!
1054
-
1055
- """The reserve utilization rate"""
1056
- utilizationRate: PercentValue!
1057
-
1058
- """
1059
- Variable rate slope 1 - the rate of interest increase when utilization rate is below optimal
1060
- This is the slope of the interest rate curve in the first segment (0% to optimal utilization)
1061
- """
1062
- variableRateSlope1: PercentValue!
1063
-
1064
- """
1065
- Variable rate slope 2 - the rate of interest increase when utilization rate is above optimal
1066
- This is the slope of the interest rate curve in the second segment (optimal to 100% utilization)
1067
- Typically much steeper than slope1 to discourage over-utilization
1068
- """
1069
- variableRateSlope2: PercentValue!
1070
-
1071
- """
1072
- The optimal usage rate - the utilization rate at which the variable rate curve transitions
1073
- from slope1 to slope2. This represents the target utilization rate for the reserve
1074
- """
1075
- optimalUsageRate: PercentValue!
1076
-
1077
- """
1078
- Borrowing can have different states based on the criteria of the user or the market
1079
- """
1080
- borrowingState: ReserveBorrowingState!
1081
-
1082
- """The borrow cap of the reserve"""
1083
- borrowCap: TokenAmount!
1084
-
1085
- """The borrow cap is now full"""
1086
- borrowCapReached: Boolean!
1087
- }
1088
-
1089
- enum ReserveBorrowingState {
1090
- """Borrowing is enabled"""
1091
- ENABLED
1092
-
1093
- """Borrowing is disabled"""
1094
- DISABLED
1095
-
1096
- """The user emode settings make this underlying not able to be borrowed"""
1097
- USER_EMODE_DISABLED_BORROW
1098
- }
1099
-
1100
- union ReserveIncentive = MeritSupplyIncentive | MeritBorrowIncentive | MeritBorrowAndSupplyIncentiveCondition | AaveSupplyIncentive | AaveBorrowIncentive
1101
-
1102
- type ReserveInfo {
1103
- """The market information the reserve is under"""
1104
- market: MarketInfo!
1105
-
1106
- """The reserve underlying currency"""
1107
- underlyingToken: Currency!
1108
-
1109
- """The reserve a token"""
1110
- aToken: Currency!
1111
-
1112
- """The reserve v token"""
1113
- vToken: Currency!
1114
-
1115
- """The usd exchange rate for the underlying token"""
1116
- usdExchangeRate: BigDecimal!
1117
-
1118
- """Does the underlying reserve support permit"""
1119
- permitSupported: Boolean!
1120
-
1121
- """
1122
- This exposes the extra incentives you can earn from third parties (Merit) or from
1123
- incentives set by governance through the RewardsController.
1124
- Note Aave Labs does not guarantee third party program and accepts no liability to those
1125
- """
1126
- incentives: [ReserveIncentive!]!
1127
- }
1128
-
1129
- type ReserveIsolationModeConfig {
1130
- """This means that it can be used to borrow"""
1131
- canBeCollateral: Boolean!
1132
- canBeBorrowed: Boolean!
1133
- debtCeiling: TokenAmount!
1134
-
1135
- """The decimals used for the debt ceiling"""
1136
- debtCeilingDecimals: Int!
1137
-
1138
- """Only the amount that is borrowed by the users in isolation"""
1139
- totalBorrows: TokenAmount!
1140
- }
1141
-
1142
- input ReserveRequest {
1143
- """The pool address for the market"""
1144
- market: EvmAddress!
1145
-
1146
- """The underlying token for the reserve"""
1147
- underlyingToken: EvmAddress!
1148
-
1149
- """The chain id the pool is deployed on"""
1150
- chainId: ChainId!
1151
-
1152
- """
1153
- The user viewing it (can be connected wallet) - this caters for stuff like eMode and other
1154
- user features
1155
- """
1156
- user: EvmAddress
1157
- }
1158
-
1159
- type ReserveSupplyInfo {
1160
- """The annual percentage yield for supplying this asset"""
1161
- apy: PercentValue!
1162
-
1163
- """The maximum loan-to-value ratio when used as collateral"""
1164
- maxLTV: PercentValue!
1165
-
1166
- """The liquidation threshold for this asset"""
1167
- liquidationThreshold: PercentValue!
1168
-
1169
- """The liquidation bonus applied when liquidated"""
1170
- liquidationBonus: PercentValue!
1171
-
1172
- """If the asset can be used for collateral"""
1173
- canBeCollateral: Boolean!
1174
-
1175
- """The supply cap"""
1176
- supplyCap: TokenAmount!
1177
-
1178
- """The supply cap is now full"""
1179
- supplyCapReached: Boolean!
1180
-
1181
- """The total amount supplied to this reserve"""
1182
- total: DecimalValue!
1183
- }
1184
-
1185
- type ReserveUserState {
1186
- """The user's balance of this asset"""
1187
- balance: TokenAmount!
1188
-
1189
- """The amount the user can supply to this reserve"""
1190
- suppliable: TokenAmount!
1191
-
1192
- """The amount the user can borrow from this reserve"""
1193
- borrowable: TokenAmount!
1194
-
1195
- """The user emode info if enabled"""
1196
- emode: EmodeReserveInfo
1197
-
1198
- """
1199
- If the user is in a state to be able to supply taking into consideration their emode
1200
- """
1201
- canBeCollateral: Boolean!
1202
-
1203
- """If the user is in a state to be able to borrow from the reserve"""
1204
- canBeBorrowed: Boolean!
1205
-
1206
- """Is the user in isolation mode"""
1207
- isInIsolationMode: Boolean!
1208
- }
1209
-
1210
- scalar Signature
1211
-
1212
- input SupplyAPYHistoryRequest {
1213
- """The market pool address"""
1214
- market: EvmAddress!
1215
-
1216
- """The underlying token for the reserve"""
1217
- underlyingToken: EvmAddress!
1218
-
1219
- """The time windows for the history"""
1220
- window: TimeWindow!
1221
-
1222
- """The chain id"""
1223
- chainId: ChainId!
1224
- }
1225
-
1226
- input SupplyRequest {
1227
- """The market pool address"""
1228
- market: EvmAddress!
1229
-
1230
- """The amount supplying"""
1231
- amount: AmountInput!
1232
-
1233
- """The user sending the transaction (normally the users wallet address)"""
1234
- sender: EvmAddress!
1235
-
1236
- """
1237
- If not supplied, this will use \`sender\`. The address that will receive the corresponding aTokens. This is the only address that will be able to withdraw the asset from the pool.
1238
- This will be the same as msg.sender if the user wants to receive aTokens into their own wallet, or use a different address if the beneficiary
1239
- of aTokens is a different wallet
1240
- """
1241
- onBehalfOf: EvmAddress
1242
-
1243
- """The chain id"""
1244
- chainId: ChainId!
1245
- }
1246
-
1247
- enum TimeWindow {
1248
- LAST_DAY
1249
- LAST_WEEK
1250
- LAST_MONTH
1251
- LAST_SIX_MONTHS
1252
- LAST_YEAR
1253
- }
1254
-
1255
- type TokenAmount {
1256
- usdPerToken: BigDecimal!
1257
-
1258
- """The amount"""
1259
- amount: DecimalValue!
1260
-
1261
- """The usd full amount"""
1262
- usd: BigDecimal!
1263
- }
1264
-
1265
- """
1266
- Represents a transaction that must be executed, such as a direct supply, borrow, etc.
1267
- """
1268
- type TransactionRequest {
1269
- """Who the transaction is going to (normally a contract)"""
1270
- to: EvmAddress!
1271
-
1272
- """Who is sending the transaction"""
1273
- from: EvmAddress!
1274
-
1275
- """The blockchain transaction encoded data"""
1276
- data: BlockchainData!
1277
-
1278
- """The native token value"""
1279
- value: BigInt!
1280
-
1281
- """The chain id"""
1282
- chainId: ChainId!
1283
-
1284
- """
1285
- The primary well-known operation the transaction is - you use this to track hasProcessedKnownTransaction
1286
- If null the API does not track/require the outcome - once receipt is done, everything is ready to go
1287
- """
1288
- operation: OperationType
1289
- }
1290
-
1291
- scalar TxHash
1292
-
1293
- type TypeDefinition {
1294
- EIP712Domain: [TypeField!]!
1295
- Permit: [TypeField!]!
1296
- }
1297
-
1298
- type TypeField {
1299
- name: String!
1300
- type: String!
1301
- }
1302
-
1303
- scalar URL
1304
-
1305
- type UsdExchangeRate {
1306
- currency: Currency!
1307
- rate: BigDecimal!
1308
- }
1309
-
1310
- input UsdExchangeRatesRequest {
1311
- """The pool address for the market"""
1312
- market: EvmAddress!
1313
-
1314
- """The underlying tokens for the reserve"""
1315
- underlyingTokens: [EvmAddress!]!
1316
-
1317
- """The chain id"""
1318
- chainId: ChainId!
1319
- }
1320
-
1321
- """A transaction where the user borrowed assets from a reserve."""
1322
- type UserBorrowTransaction {
1323
- """Amount borrowed."""
1324
- amount: TokenAmount!
1325
-
1326
- """Reserve from which assets were borrowed."""
1327
- reserve: ReserveInfo!
1328
-
1329
- """URL to view the transaction on a block explorer."""
1330
- blockExplorerUrl: String!
1331
-
1332
- """Transaction hash."""
1333
- txHash: TxHash!
1334
-
1335
- """Timestamp of the transaction."""
1336
- timestamp: DateTime!
1337
- }
1338
-
1339
- input UserBorrowsRequest {
1340
- """The market addresses and chains ids to query"""
1341
- markets: [MarketInput!]!
1342
-
1343
- """The user address to get borrow positions for"""
1344
- user: EvmAddress!
1345
-
1346
- """How to order the results"""
1347
- orderBy: UserBorrowsRequestOrderBy! = {name: ASC}
1348
- }
1349
-
1350
- input UserBorrowsRequestOrderBy @oneOf {
1351
- """Order by the user's debt amount"""
1352
- debt: OrderDirection
1353
-
1354
- """Order by the asset name"""
1355
- name: OrderDirection
1356
-
1357
- """Order by the annual percentage yield"""
1358
- apy: OrderDirection
1359
- }
1360
-
1361
- """A transaction where the user was involved in a liquidation call."""
1362
- type UserLiquidationCallTransaction {
1363
- """Collateral liquidated."""
1364
- collateral: LiquidationCollateral!
1365
-
1366
- """Debt repaid."""
1367
- debtRepaid: LiquidationRepaidDebt!
1368
-
1369
- """URL to view the transaction on a block explorer."""
1370
- blockExplorerUrl: String!
1371
-
1372
- """Transaction hash."""
1373
- txHash: TxHash!
1374
-
1375
- """Timestamp of the transaction."""
1376
- timestamp: DateTime!
1377
- }
1378
-
1379
- input UserMarketStateRequest {
1380
- """The pool address for the market"""
1381
- market: EvmAddress!
1382
-
1383
- """The user to toggle emode on"""
1384
- user: EvmAddress!
1385
-
1386
- """The chain id"""
1387
- chainId: ChainId!
1388
- }
1389
-
1390
- """A transaction where the user repaid borrowed assets."""
1391
- type UserRepayTransaction {
1392
- """Amount repaid."""
1393
- amount: TokenAmount!
1394
-
1395
- """Reserve to which assets were repaid."""
1396
- reserve: ReserveInfo!
1397
-
1398
- """URL to view the transaction on a block explorer."""
1399
- blockExplorerUrl: String!
1400
-
1401
- """Transaction hash."""
1402
- txHash: TxHash!
1403
-
1404
- """Timestamp of the transaction."""
1405
- timestamp: DateTime!
1406
- }
1407
-
1408
- input UserSetEmodeRequest {
1409
- """The pool address for the market"""
1410
- market: EvmAddress!
1411
-
1412
- """The user to toggle emode on"""
1413
- user: EvmAddress!
1414
-
1415
- """
1416
- The eMode category id for the market if you want to disable eMode, then pass in null
1417
- """
1418
- categoryId: Int
1419
-
1420
- """The chain id"""
1421
- chainId: ChainId!
1422
- }
1423
-
1424
- input UserSuppliesRequest {
1425
- """The market addresses and chains ids to query"""
1426
- markets: [MarketInput!]!
1427
-
1428
- """The user address to get supply positions for"""
1429
- user: EvmAddress!
1430
-
1431
- """Only get back the supplies which can be used as collateral"""
1432
- collateralsOnly: Boolean! = false
1433
-
1434
- """How to order the results"""
1435
- orderBy: UserSuppliesRequestOrderBy! = {name: ASC}
1436
- }
1437
-
1438
- input UserSuppliesRequestOrderBy @oneOf {
1439
- """Order by the user's supply balance"""
1440
- balance: OrderDirection
1441
-
1442
- """Order by the asset name"""
1443
- name: OrderDirection
1444
-
1445
- """Order by the annual percentage yield"""
1446
- apy: OrderDirection
1447
-
1448
- """Order by whether the position is used as collateral"""
1449
- isCollateralized: OrderDirection
1450
- }
1451
-
1452
- """A transaction where the user supplied assets to a reserve."""
1453
- type UserSupplyTransaction {
1454
- """Amount supplied."""
1455
- amount: TokenAmount!
1456
-
1457
- """Reserve to which assets were supplied."""
1458
- reserve: ReserveInfo!
1459
-
1460
- """URL to view the transaction on a block explorer."""
1461
- blockExplorerUrl: String!
1462
-
1463
- """Transaction hash."""
1464
- txHash: TxHash!
1465
-
1466
- """Timestamp of the transaction."""
1467
- timestamp: DateTime!
1468
- }
1469
-
1470
- input UserTransactionHistoryRequest {
1471
- """The market address"""
1472
- market: EvmAddress!
1473
-
1474
- """The filter to optionally filter the transactions by type"""
1475
- filter: [UserTransactionType!]! = [SUPPLY, WITHDRAW, BORROW, REPAY, USAGE_AS_COLLATERAL, LIQUIDATION_CALL]
1476
-
1477
- """The order by object to sort the transactions by"""
1478
- orderBy: UserTransactionHistoryRequestOrderBy! = {date: ASC}
1479
-
1480
- """The user that sent the transactions"""
1481
- user: EvmAddress!
1482
-
1483
- """The chain id where the transactions were sent"""
1484
- chainId: ChainId!
1485
-
1486
- """The page size"""
1487
- pageSize: PageSize! = FIFTY
1488
-
1489
- """Pagination cursor"""
1490
- cursor: Cursor
1491
- }
1492
-
1493
- input UserTransactionHistoryRequestOrderBy {
1494
- """Order by the date of the transaction"""
1495
- date: OrderDirection
1496
- }
1497
-
1498
- union UserTransactionItem = UserSupplyTransaction | UserWithdrawTransaction | UserBorrowTransaction | UserRepayTransaction | UserUsageAsCollateralTransaction | UserLiquidationCallTransaction
1499
-
1500
- """The type of user transaction in the protocol."""
1501
- enum UserTransactionType {
1502
- """User supplied assets to the protocol."""
1503
- SUPPLY
1504
-
1505
- """User borrowed assets from the protocol."""
1506
- BORROW
1507
-
1508
- """User enabled or disabled usage of an asset as collateral."""
1509
- USAGE_AS_COLLATERAL
1510
-
1511
- """User was involved in a liquidation call."""
1512
- LIQUIDATION_CALL
1513
-
1514
- """User repaid a borrowed amount."""
1515
- REPAY
1516
-
1517
- """User withdrew supplied assets."""
1518
- WITHDRAW
1519
- }
1520
-
1521
- """
1522
- A transaction where the user enabled or disabled usage of an asset as collateral.
1523
- """
1524
- type UserUsageAsCollateralTransaction {
1525
- """Whether collateral usage was enabled."""
1526
- enabled: Boolean!
1527
-
1528
- """Reserve for which collateral usage was changed."""
1529
- reserve: ReserveInfo!
1530
-
1531
- """URL to view the transaction on a block explorer."""
1532
- blockExplorerUrl: String!
1533
-
1534
- """Transaction hash."""
1535
- txHash: TxHash!
1536
-
1537
- """Timestamp of the transaction."""
1538
- timestamp: DateTime!
1539
- }
1540
-
1541
- type UserVaultShares {
1542
- """The user's shares on the vault"""
1543
- shares: TokenAmount!
1544
-
1545
- """The balance you can withdraw"""
1546
- balance: TokenAmount!
1547
- }
1548
-
1549
- input UserVaultsFilter {
1550
- """Filter by markets"""
1551
- vaults: [VaultInput!]
1552
-
1553
- """Filter by underlying token addresses"""
1554
- underlyingTokens: [EvmAddress!]
1555
- }
1556
-
1557
- input UserVaultsOrderBy @oneOf {
1558
- """Order by shares"""
1559
- shares: OrderDirection
1560
-
1561
- """Order by fee"""
1562
- fee: OrderDirection
1563
- }
1564
-
1565
- input UserVaultsRequest {
1566
- """The user address"""
1567
- user: EvmAddress!
1568
-
1569
- """Filter criteria"""
1570
- filters: UserVaultsFilter
1571
-
1572
- """Ordering criteria"""
1573
- orderBy: UserVaultsOrderBy! = {shares: ASC}
1574
-
1575
- """The page size"""
1576
- pageSize: PageSize! = FIFTY
1577
-
1578
- """Pagination cursor"""
1579
- cursor: Cursor
1580
- }
1581
-
1582
- """A transaction where the user withdrew assets from a reserve."""
1583
- type UserWithdrawTransaction {
1584
- """Amount withdrawn."""
1585
- amount: TokenAmount!
1586
-
1587
- """Reserve from which assets were withdrawn."""
1588
- reserve: ReserveInfo!
1589
-
1590
- """URL to view the transaction on a block explorer."""
1591
- blockExplorerUrl: String!
1592
-
1593
- """Transaction hash."""
1594
- txHash: TxHash!
1595
-
1596
- """Timestamp of the transaction."""
1597
- timestamp: DateTime!
1598
- }
1599
-
1600
- type Vault {
1601
- """The vault address"""
1602
- address: EvmAddress!
1603
-
1604
- """The owner of the vault"""
1605
- owner: EvmAddress!
1606
-
1607
- """The name of the share"""
1608
- shareName: String!
1609
-
1610
- """The symbol of the share"""
1611
- shareSymbol: String!
1612
-
1613
- """The reserve the vault is using"""
1614
- usedReserve: Reserve!
1615
-
1616
- """The current fee percentage set for the vault."""
1617
- fee: PercentValue!
1618
-
1619
- """How much this vault has made in revenue"""
1620
- totalFeeRevenue: TokenAmount!
1621
-
1622
- """
1623
- The last recorded balance of the vault's AToken. This value is updated when yield is accrued.
1624
- """
1625
- balance: TokenAmount!
1626
-
1627
- """The chain id the vault lives on"""
1628
- chainId: ChainId!
1629
-
1630
- """The user's shares info on the vault"""
1631
- userShares: UserVaultShares
1632
-
1633
- """The total fees the owner can claim currently for the vault"""
1634
- feesBalance: TokenAmount!
1635
-
1636
- """The total vault APR after their fee is taken off"""
1637
- vaultApr: PercentValue!
1638
- }
1639
-
1640
- input VaultDeployRequest {
1641
- """Underlying token address."""
1642
- underlyingToken: EvmAddress!
1643
-
1644
- """The market address."""
1645
- market: EvmAddress!
1646
-
1647
- """The chain id"""
1648
- chainId: ChainId!
1649
-
1650
- """
1651
- The address to set as which deploys the vault and will become an owner of the vault.
1652
- """
1653
- deployer: EvmAddress!
1654
-
1655
- """The owner of the vault - if not defined, it will be the deployer"""
1656
- owner: EvmAddress
1657
-
1658
- """The initial fee to set, expressed in %."""
1659
- initialFee: BigDecimal!
1660
-
1661
- """The name to set for the vault's shares."""
1662
- shareName: String!
1663
-
1664
- """The symbol to set for the vault's shares."""
1665
- shareSymbol: String!
1666
-
1667
- """
1668
- The initial amount of underlying assets to deposit. This must be a non-zero, non-trivial amount, depending on the underlying asset's decimals.
1669
- """
1670
- initialLockDeposit: BigDecimal!
1671
- }
1672
-
1673
- input VaultDepositAmountInput {
1674
- """The amount of assets to deposit."""
1675
- value: BigDecimal!
1676
-
1677
- """Whether you are depositing in as a token or normal underlying"""
1678
- asAToken: Boolean! = false
1679
-
1680
- """
1681
- The signed ERC20 permit message to operate on the relevant token without need for an ERC20 Approval transaction.
1682
- """
1683
- permitSig: ERC712Signature
1684
- }
1685
-
1686
- input VaultDepositRequest {
1687
- """The vault address"""
1688
- vault: EvmAddress!
1689
-
1690
- """The details of the amounts to deposit."""
1691
- amount: VaultDepositAmountInput!
1692
-
1693
- """The user who is depositing"""
1694
- depositor: EvmAddress!
1695
-
1696
- """
1697
- The address to which vault shares will be minted to - defaults to depositor.
1698
- """
1699
- sharesRecipient: EvmAddress
1700
-
1701
- """The chain id"""
1702
- chainId: ChainId!
1703
- }
1704
-
1705
- input VaultInput {
1706
- """The address of the fault"""
1707
- address: EvmAddress!
1708
-
1709
- """The chain id the vault is on"""
1710
- chainId: ChainId!
1711
- }
1712
-
1713
- input VaultMintShareInput {
1714
- """The amount of vault shares"""
1715
- amount: BigDecimal!
1716
-
1717
- """Whether the amount should be received as aToken."""
1718
- asAToken: Boolean! = false
1719
-
1720
- """
1721
- The signed ERC20 permit message to operate on the relevant token without need for an ERC20 Approval transaction.
1722
- """
1723
- permitSig: ERC712Signature
1724
- }
1725
-
1726
- input VaultMintSharesRequest {
1727
- """The vault address"""
1728
- vault: EvmAddress!
1729
-
1730
- """The amount of shares to mint"""
1731
- shares: VaultMintShareInput!
1732
-
1733
- """The user who is wanting to mint the shares"""
1734
- minter: EvmAddress!
1735
-
1736
- """
1737
- The address to which vault shares will be minted to - defaults to minter.
1738
- """
1739
- sharesRecipient: EvmAddress
1740
-
1741
- """The chain id"""
1742
- chainId: ChainId!
1743
- }
1744
-
1745
- input VaultOperationPreviewRequest {
1746
- """The vault"""
1747
- vault: EvmAddress!
1748
-
1749
- """The chain id the vault is deployed on"""
1750
- chainId: ChainId!
1751
-
1752
- """
1753
- The amount in human-readable form
1754
- preview deposit = underlying
1755
- preview mint = shares
1756
- preview withdraw = underlying
1757
- preview redeem = shares
1758
- """
1759
- amount: BigDecimal!
1760
- }
1761
-
1762
- input VaultRedeemShareInput {
1763
- """The amount of vault shares"""
1764
- amount: BigDecimal!
1765
-
1766
- """Whether the amount should be sent as aToken."""
1767
- asAToken: Boolean! = false
1768
-
1769
- """
1770
- The signed ERC20 permit message to operate on the relevant token without need for an ERC20 Approval transaction.
1771
- """
1772
- permitSig: ERC712Signature
1773
- }
1774
-
1775
- input VaultRedeemSharesRequest {
1776
- """The vault address"""
1777
- vault: EvmAddress!
1778
-
1779
- """The shares to redeem."""
1780
- shares: VaultRedeemShareInput!
1781
-
1782
- """
1783
- The address from which vault shares will be burned (normally your own wallet).
1784
- """
1785
- sharesOwner: EvmAddress!
1786
-
1787
- """
1788
- If you are doing the redeem from a trusted wallet which can move funds on behalf of the shares owner (advanced usage)
1789
- """
1790
- authorizedUser: EvmAddress
1791
-
1792
- """
1793
- The address to which the underlying assets will be sent; if not set it will go to the sharesOwner
1794
- """
1795
- recipient: EvmAddress
1796
-
1797
- """The chain id"""
1798
- chainId: ChainId!
1799
- }
1800
-
1801
- input VaultRequest {
1802
- """The retrieve criteria"""
1803
- by: VaultRequestBy!
1804
-
1805
- """The chain id the vault is deployed on"""
1806
- chainId: ChainId!
1807
-
1808
- """
1809
- The user viewing it (can be connected wallet) - this caters for stuff like userShares and other user features
1810
- """
1811
- user: EvmAddress
1812
- }
1813
-
1814
- input VaultRequestBy @oneOf {
1815
- """The vault address"""
1816
- address: EvmAddress
1817
-
1818
- """
1819
- You can use this if you deployed a vault and want to get the vault information using the tx hash after the receipt is given
1820
- """
1821
- txHash: TxHash
1822
- }
1823
-
1824
- input VaultSetFeeRequest {
1825
- """The vault deployed address"""
1826
- vault: EvmAddress!
1827
-
1828
- """The new fee to set, expressed in %."""
1829
- newFee: BigDecimal!
1830
-
1831
- """The chain id"""
1832
- chainId: ChainId!
1833
- }
1834
-
1835
- type VaultUserActivityItem {
1836
- balance: TokenAmount!
1837
- earned: TokenAmount!
1838
- withdrew: TokenAmount
1839
- deposited: TokenAmount
1840
- date: DateTime!
1841
- }
1842
-
1843
- input VaultUserActivityRequest {
1844
- """The vault"""
1845
- vault: EvmAddress!
1846
-
1847
- """The chain id the vault is deployed on"""
1848
- chainId: ChainId!
1849
-
1850
- """The user address"""
1851
- user: EvmAddress!
1852
-
1853
- """The timing window for which to calculate user activity"""
1854
- window: VaultUserActivityTimeWindow!
1855
- }
1856
-
1857
- type VaultUserActivityResult {
1858
- earned: TokenAmount!
1859
- breakdown: [VaultUserActivityItem!]!
1860
- }
1861
-
1862
- enum VaultUserActivityTimeWindow {
1863
- """Samples data in days over the last week"""
1864
- LAST_WEEK
1865
-
1866
- """Samples data in days over the last month"""
1867
- LAST_MONTH
1868
-
1869
- """Samples data in months over the last year"""
1870
- LAST_YEAR
1871
-
1872
- """Samples data in years for the maximum available period"""
1873
- MAX
1874
- }
1875
-
1876
- """A transaction where the user supplied assets to a reserve."""
1877
- type VaultUserDepositItem {
1878
- asset: TokenAmount!
1879
- shares: TokenAmount!
1880
- blockExplorerUrl: String!
1881
- txHash: TxHash!
1882
- timestamp: DateTime!
1883
- }
1884
-
1885
- enum VaultUserHistoryAction {
1886
- DEPOSIT
1887
- WITHDRAW
1888
- }
1889
-
1890
- input VaultUserTransactionHistoryOrderBy @oneOf {
1891
- """Order by shares"""
1892
- date: OrderDirection
1893
- }
1894
-
1895
- input VaultUserTransactionHistoryRequest {
1896
- """The vault address"""
1897
- vault: EvmAddress!
1898
-
1899
- """The chain id where the transactions were sent"""
1900
- chainId: ChainId!
1901
-
1902
- """The user that sent the transactions"""
1903
- user: EvmAddress!
1904
-
1905
- """The filter to optionally filter the transactions by action type"""
1906
- filter: [VaultUserHistoryAction!]! = [DEPOSIT, WITHDRAW]
1907
-
1908
- """Ordering criteria"""
1909
- orderBy: VaultUserTransactionHistoryOrderBy! = {date: ASC}
1910
-
1911
- """The page size"""
1912
- pageSize: PageSize! = FIFTY
1913
-
1914
- """Pagination cursor"""
1915
- cursor: Cursor
1916
- }
1917
-
1918
- union VaultUserTransactionItem = VaultUserDepositItem | VaultUserWithdrawItem
1919
-
1920
- """A transaction where the user withdrew assets from a reserve."""
1921
- type VaultUserWithdrawItem {
1922
- asset: TokenAmount!
1923
- shares: TokenAmount!
1924
- blockExplorerUrl: String!
1925
- txHash: TxHash!
1926
- timestamp: DateTime!
1927
- }
1928
-
1929
- input VaultWithdrawAmountInput {
1930
- """The amount of assets to withdraw."""
1931
- value: BigDecimal!
1932
-
1933
- """Whether the amount should be sent/received as aToken."""
1934
- asAToken: Boolean! = false
1935
-
1936
- """
1937
- The signed ERC20 permit message to operate on the relevant token without need for an ERC20 Approval transaction.
1938
- """
1939
- permitSig: ERC712Signature
1940
- }
1941
-
1942
- input VaultWithdrawFeesRequest {
1943
- """The vault deployed address"""
1944
- vault: EvmAddress!
1945
-
1946
- """
1947
- Who the withdrawal fees will go to - if not supplied, it goes to the owner
1948
- """
1949
- sendTo: EvmAddress
1950
-
1951
- """Human-formatted amount"""
1952
- amount: WithdrawAmount!
1953
-
1954
- """The chain id"""
1955
- chainId: ChainId!
1956
- }
1957
-
1958
- input VaultWithdrawRequest {
1959
- """The vault address"""
1960
- vault: EvmAddress!
1961
-
1962
- """The details of the amounts to withdraw."""
1963
- amount: VaultWithdrawAmountInput!
1964
-
1965
- """
1966
- The address from which vault shares will be burned (normally your own wallet).
1967
- """
1968
- sharesOwner: EvmAddress!
1969
-
1970
- """
1971
- If you are doing the withdrawal from a trusted wallet which can move funds on behalf of the shares owner (advanced usage)
1972
- """
1973
- authorizedUser: EvmAddress
1974
-
1975
- """
1976
- The address to which the underlying assets will be sent - defaults to sharesOwner.
1977
- """
1978
- recipient: EvmAddress
1979
-
1980
- """The chain id"""
1981
- chainId: ChainId!
1982
- }
1983
-
1984
- input VaultsRequest {
1985
- """Filter criteria for vaults"""
1986
- criteria: VaultsRequestFilterCriteria!
1987
-
1988
- """
1989
- The user viewing it (can be connected wallet) - this caters for stuff like userShares and other user features
1990
- """
1991
- user: EvmAddress
1992
-
1993
- """The page size"""
1994
- pageSize: PageSize! = FIFTY
1995
-
1996
- """Pagination cursor"""
1997
- cursor: Cursor
1998
- }
1999
-
2000
- input VaultsRequestFilterCriteria @oneOf {
2001
- """Filter by specific vault addresses"""
2002
- vaults: [VaultInput!]
2003
-
2004
- """Filter by owner addresses"""
2005
- ownedBy: [EvmAddress!]
2006
- }
2007
-
2008
- input WithdrawAmount @oneOf {
2009
- """Exact amount to withdraw, remember interest is generated on each block"""
2010
- exact: BigDecimal
2011
-
2012
- """Withdraw all the position completely"""
2013
- max: AlwaysTrue
2014
- }
2015
-
2016
- input WithdrawAmountInput @oneOf {
2017
- """The native amount"""
2018
- native: WithdrawNativeAmountInput
2019
-
2020
- """The erc20 amount input"""
2021
- erc20: WithdrawErc20AmountInput
2022
- }
2023
-
2024
- input WithdrawErc20AmountInput {
2025
- """The token address."""
2026
- currency: EvmAddress!
2027
-
2028
- """
2029
- Token value in its main unit (e.g., 1.5 DAI), not in the smallest fraction (e.g., wei).
2030
- """
2031
- value: WithdrawAmount!
2032
- }
2033
-
2034
- input WithdrawNativeAmountInput {
2035
- """The native value"""
2036
- value: WithdrawAmount!
2037
-
2038
- """
2039
- The signed ERC20 permit message to operate on the relevant token without need for an ERC20 Approval transaction.
2040
- """
2041
- permitSig: ERC712Signature
2042
- }
2043
-
2044
- input WithdrawRequest {
2045
- """The market pool address"""
2046
- market: EvmAddress!
2047
-
2048
- """The amount to withdraw"""
2049
- amount: WithdrawAmountInput!
2050
-
2051
- """
2052
- The user sending the transaction (normally the user's wallet address) this should have the \`aToken\` that will be burned by the \`Pool\`
2053
- """
2054
- sender: EvmAddress!
2055
-
2056
- """
2057
- If not supplied, this will use \`sender\`. The address that will receive the underlying asset. This will go to the supplier if the user wants to receive the tokens into
2058
- their own wallet or use a different address if the beneficiary is a different wallet
2059
- """
2060
- recipient: EvmAddress
2061
-
2062
- """The chain id"""
2063
- chainId: ChainId!
2064
- }`;var o=graphql.buildSchema(e);exports.schema=o;//# sourceMappingURL=test-utils.cjs.map
2065
- //# sourceMappingURL=test-utils.cjs.map