@compass-labs/api-sdk 2.2.70 → 2.2.71
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/commonjs/models/components/accountsummary.d.ts +18 -1
- package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/accountsummary.js +2 -0
- package/dist/commonjs/models/components/accountsummary.js.map +1 -1
- package/dist/commonjs/models/components/collateralposition.d.ts +16 -1
- package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/collateralposition.js +3 -0
- package/dist/commonjs/models/components/collateralposition.js.map +1 -1
- package/dist/commonjs/models/components/creditborrowparams.d.ts +17 -0
- package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditborrowparams.js +4 -0
- package/dist/commonjs/models/components/creditborrowparams.js.map +1 -1
- package/dist/commonjs/models/components/creditborrowrequest.d.ts +22 -0
- package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditborrowrequest.js +6 -0
- package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
- package/dist/commonjs/models/components/creditenablecollateralparams.d.ts +17 -0
- package/dist/commonjs/models/components/creditenablecollateralparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditenablecollateralparams.js +4 -0
- package/dist/commonjs/models/components/creditenablecollateralparams.js.map +1 -1
- package/dist/commonjs/models/components/creditpositionsresponse.d.ts +11 -1
- package/dist/commonjs/models/components/creditpositionsresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditpositionsresponse.js +2 -0
- package/dist/commonjs/models/components/creditpositionsresponse.js.map +1 -1
- package/dist/commonjs/models/components/creditprotocol.d.ts +30 -0
- package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -0
- package/dist/commonjs/models/components/creditprotocol.js +58 -0
- package/dist/commonjs/models/components/creditprotocol.js.map +1 -0
- package/dist/commonjs/models/components/creditrepayparams.d.ts +18 -1
- package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditrepayparams.js +4 -0
- package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
- package/dist/commonjs/models/components/creditrepayrequest.d.ts +22 -0
- package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditrepayrequest.js +6 -0
- package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
- package/dist/commonjs/models/components/creditsupplyparams.d.ts +18 -1
- package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditsupplyparams.js +4 -0
- package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
- package/dist/commonjs/models/components/creditwithdrawparams.d.ts +18 -1
- package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditwithdrawparams.js +4 -0
- package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
- package/dist/commonjs/models/components/debtposition.d.ts +16 -1
- package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/debtposition.js +3 -0
- package/dist/commonjs/models/components/debtposition.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/esm/models/components/accountsummary.d.ts +18 -1
- package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
- package/dist/esm/models/components/accountsummary.js +2 -0
- package/dist/esm/models/components/accountsummary.js.map +1 -1
- package/dist/esm/models/components/collateralposition.d.ts +16 -1
- package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
- package/dist/esm/models/components/collateralposition.js +3 -0
- package/dist/esm/models/components/collateralposition.js.map +1 -1
- package/dist/esm/models/components/creditborrowparams.d.ts +17 -0
- package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditborrowparams.js +4 -0
- package/dist/esm/models/components/creditborrowparams.js.map +1 -1
- package/dist/esm/models/components/creditborrowrequest.d.ts +22 -0
- package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditborrowrequest.js +6 -0
- package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
- package/dist/esm/models/components/creditenablecollateralparams.d.ts +17 -0
- package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditenablecollateralparams.js +4 -0
- package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
- package/dist/esm/models/components/creditpositionsresponse.d.ts +11 -1
- package/dist/esm/models/components/creditpositionsresponse.d.ts.map +1 -1
- package/dist/esm/models/components/creditpositionsresponse.js +2 -0
- package/dist/esm/models/components/creditpositionsresponse.js.map +1 -1
- package/dist/esm/models/components/creditprotocol.d.ts +30 -0
- package/dist/esm/models/components/creditprotocol.d.ts.map +1 -0
- package/dist/esm/models/components/creditprotocol.js +22 -0
- package/dist/esm/models/components/creditprotocol.js.map +1 -0
- package/dist/esm/models/components/creditrepayparams.d.ts +18 -1
- package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditrepayparams.js +4 -0
- package/dist/esm/models/components/creditrepayparams.js.map +1 -1
- package/dist/esm/models/components/creditrepayrequest.d.ts +22 -0
- package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditrepayrequest.js +6 -0
- package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
- package/dist/esm/models/components/creditsupplyparams.d.ts +18 -1
- package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditsupplyparams.js +4 -0
- package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
- package/dist/esm/models/components/creditwithdrawparams.d.ts +18 -1
- package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditwithdrawparams.js +4 -0
- package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
- package/dist/esm/models/components/debtposition.d.ts +16 -1
- package/dist/esm/models/components/debtposition.d.ts.map +1 -1
- package/dist/esm/models/components/debtposition.js +3 -0
- package/dist/esm/models/components/debtposition.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/docs/models/components/accountsummary.md +15 -10
- package/docs/models/components/collateralposition.md +14 -12
- package/docs/models/components/creditborrowparams.md +9 -7
- package/docs/models/components/creditborrowrequest.md +19 -16
- package/docs/models/components/creditenablecollateralparams.md +6 -4
- package/docs/models/components/creditpositionsresponse.md +16 -7
- package/docs/models/components/creditprotocol.md +21 -0
- package/docs/models/components/creditrepayparams.md +8 -6
- package/docs/models/components/creditrepayrequest.md +18 -15
- package/docs/models/components/creditsupplyparams.md +7 -5
- package/docs/models/components/creditwithdrawparams.md +7 -5
- package/docs/models/components/debtposition.md +13 -11
- package/openapi_prepped_for_speakeasy.json +208 -6
- package/package.json +1 -1
- package/src/models/components/accountsummary.ts +22 -1
- package/src/models/components/collateralposition.ts +21 -1
- package/src/models/components/creditborrowparams.ts +23 -0
- package/src/models/components/creditborrowrequest.ts +30 -0
- package/src/models/components/creditenablecollateralparams.ts +23 -0
- package/src/models/components/creditpositionsresponse.ts +13 -1
- package/src/models/components/creditprotocol.ts +39 -0
- package/src/models/components/creditrepayparams.ts +24 -1
- package/src/models/components/creditrepayrequest.ts +30 -0
- package/src/models/components/creditsupplyparams.ts +24 -1
- package/src/models/components/creditwithdrawparams.ts +24 -1
- package/src/models/components/debtposition.ts +21 -1
- package/src/models/components/index.ts +1 -0
|
@@ -9734,6 +9734,11 @@
|
|
|
9734
9734
|
},
|
|
9735
9735
|
"AccountSummary": {
|
|
9736
9736
|
"properties": {
|
|
9737
|
+
"protocol": {
|
|
9738
|
+
"$ref": "#/components/schemas/CreditProtocol",
|
|
9739
|
+
"description": "Lending protocol this summary describes.",
|
|
9740
|
+
"example": "AAVE"
|
|
9741
|
+
},
|
|
9737
9742
|
"health_factor": {
|
|
9738
9743
|
"type": "string",
|
|
9739
9744
|
"title": "Health Factor",
|
|
@@ -9788,7 +9793,7 @@
|
|
|
9788
9793
|
"ltv"
|
|
9789
9794
|
],
|
|
9790
9795
|
"title": "AccountSummary",
|
|
9791
|
-
"description": "
|
|
9796
|
+
"description": "Account-level summary for one lending protocol.\n\nPopulated from Aave ``getUserAccountData()`` or, for Euler, from the\ncontroller vault's risk engine (``accountLiquidity``). The E-Mode fields are\nAave-only and stay at their defaults for Euler."
|
|
9792
9797
|
},
|
|
9793
9798
|
"AerodromeEnrichedPosition": {
|
|
9794
9799
|
"properties": {
|
|
@@ -11497,6 +11502,23 @@
|
|
|
11497
11502
|
"title": "Symbol",
|
|
11498
11503
|
"description": "Symbol of the collateral token (e.g. USDC)."
|
|
11499
11504
|
},
|
|
11505
|
+
"protocol": {
|
|
11506
|
+
"$ref": "#/components/schemas/CreditProtocol",
|
|
11507
|
+
"description": "Lending protocol this position belongs to.",
|
|
11508
|
+
"example": "AAVE"
|
|
11509
|
+
},
|
|
11510
|
+
"vault": {
|
|
11511
|
+
"anyOf": [
|
|
11512
|
+
{
|
|
11513
|
+
"type": "string"
|
|
11514
|
+
},
|
|
11515
|
+
{
|
|
11516
|
+
"type": "null"
|
|
11517
|
+
}
|
|
11518
|
+
],
|
|
11519
|
+
"title": "Vault",
|
|
11520
|
+
"description": "Euler only: the EVK collateral vault holding this position."
|
|
11521
|
+
},
|
|
11500
11522
|
"amount_supplied": {
|
|
11501
11523
|
"anyOf": [
|
|
11502
11524
|
{
|
|
@@ -11507,7 +11529,7 @@
|
|
|
11507
11529
|
}
|
|
11508
11530
|
],
|
|
11509
11531
|
"title": "Amount Supplied",
|
|
11510
|
-
"description": "Current on-chain
|
|
11532
|
+
"description": "Current on-chain collateral balance (the vault's underlying asset for Euler)."
|
|
11511
11533
|
},
|
|
11512
11534
|
"usd_value": {
|
|
11513
11535
|
"anyOf": [
|
|
@@ -11925,6 +11947,23 @@
|
|
|
11925
11947
|
}
|
|
11926
11948
|
],
|
|
11927
11949
|
"description": "Optional fee on the borrowed amount."
|
|
11950
|
+
},
|
|
11951
|
+
"protocol": {
|
|
11952
|
+
"$ref": "#/components/schemas/CreditProtocol",
|
|
11953
|
+
"description": "Lending protocol to use. Defaults to Aave.",
|
|
11954
|
+
"example": "AAVE"
|
|
11955
|
+
},
|
|
11956
|
+
"borrow_vault": {
|
|
11957
|
+
"anyOf": [
|
|
11958
|
+
{
|
|
11959
|
+
"type": "string"
|
|
11960
|
+
},
|
|
11961
|
+
{
|
|
11962
|
+
"type": "null"
|
|
11963
|
+
}
|
|
11964
|
+
],
|
|
11965
|
+
"title": "Borrow Vault",
|
|
11966
|
+
"description": "Euler only: the EVK vault to borrow from. Required when protocol=EULER."
|
|
11928
11967
|
}
|
|
11929
11968
|
},
|
|
11930
11969
|
"type": "object",
|
|
@@ -11948,6 +11987,35 @@
|
|
|
11948
11987
|
"description": "Blockchain network.",
|
|
11949
11988
|
"example": "base"
|
|
11950
11989
|
},
|
|
11990
|
+
"protocol": {
|
|
11991
|
+
"$ref": "#/components/schemas/CreditProtocol",
|
|
11992
|
+
"description": "Lending protocol to use. Defaults to Aave.",
|
|
11993
|
+
"example": "AAVE"
|
|
11994
|
+
},
|
|
11995
|
+
"collateral_vault": {
|
|
11996
|
+
"anyOf": [
|
|
11997
|
+
{
|
|
11998
|
+
"type": "string"
|
|
11999
|
+
},
|
|
12000
|
+
{
|
|
12001
|
+
"type": "null"
|
|
12002
|
+
}
|
|
12003
|
+
],
|
|
12004
|
+
"title": "Collateral Vault",
|
|
12005
|
+
"description": "Euler only: the EVK collateral vault to supply into. Required when protocol=EULER and supplying collateral."
|
|
12006
|
+
},
|
|
12007
|
+
"borrow_vault": {
|
|
12008
|
+
"anyOf": [
|
|
12009
|
+
{
|
|
12010
|
+
"type": "string"
|
|
12011
|
+
},
|
|
12012
|
+
{
|
|
12013
|
+
"type": "null"
|
|
12014
|
+
}
|
|
12015
|
+
],
|
|
12016
|
+
"title": "Borrow Vault",
|
|
12017
|
+
"description": "Euler only: the EVK vault to borrow from. Required when protocol=EULER."
|
|
12018
|
+
},
|
|
11951
12019
|
"token_in": {
|
|
11952
12020
|
"anyOf": [
|
|
11953
12021
|
{
|
|
@@ -12254,6 +12322,23 @@
|
|
|
12254
12322
|
"type": "string",
|
|
12255
12323
|
"title": "Token",
|
|
12256
12324
|
"description": "The underlying reserve token to enable as collateral (e.g. USDC, not aUSDC)."
|
|
12325
|
+
},
|
|
12326
|
+
"protocol": {
|
|
12327
|
+
"$ref": "#/components/schemas/CreditProtocol",
|
|
12328
|
+
"description": "Lending protocol to use. Defaults to Aave.",
|
|
12329
|
+
"example": "AAVE"
|
|
12330
|
+
},
|
|
12331
|
+
"collateral_vault": {
|
|
12332
|
+
"anyOf": [
|
|
12333
|
+
{
|
|
12334
|
+
"type": "string"
|
|
12335
|
+
},
|
|
12336
|
+
{
|
|
12337
|
+
"type": "null"
|
|
12338
|
+
}
|
|
12339
|
+
],
|
|
12340
|
+
"title": "Collateral Vault",
|
|
12341
|
+
"description": "Euler only: the EVK collateral vault to enable. Required when protocol=EULER."
|
|
12257
12342
|
}
|
|
12258
12343
|
},
|
|
12259
12344
|
"type": "object",
|
|
@@ -12383,6 +12468,17 @@
|
|
|
12383
12468
|
"$ref": "#/components/schemas/AccountSummary",
|
|
12384
12469
|
"description": "Aave account-level summary (health factor, LTV, etc.)."
|
|
12385
12470
|
},
|
|
12471
|
+
"euler_account_summary": {
|
|
12472
|
+
"anyOf": [
|
|
12473
|
+
{
|
|
12474
|
+
"$ref": "#/components/schemas/AccountSummary"
|
|
12475
|
+
},
|
|
12476
|
+
{
|
|
12477
|
+
"type": "null"
|
|
12478
|
+
}
|
|
12479
|
+
],
|
|
12480
|
+
"description": "Euler account-level summary (health factor, LTV, etc.), present only when the account holds Euler positions. Null for Aave-only accounts."
|
|
12481
|
+
},
|
|
12386
12482
|
"borrowable_tokens": {
|
|
12387
12483
|
"items": {
|
|
12388
12484
|
"$ref": "#/components/schemas/BorrowableToken"
|
|
@@ -12412,6 +12508,15 @@
|
|
|
12412
12508
|
"title": "CreditPositionsResponse",
|
|
12413
12509
|
"description": "Credit account positions response with per-reserve positions and account summary."
|
|
12414
12510
|
},
|
|
12511
|
+
"CreditProtocol": {
|
|
12512
|
+
"type": "string",
|
|
12513
|
+
"enum": [
|
|
12514
|
+
"AAVE",
|
|
12515
|
+
"EULER"
|
|
12516
|
+
],
|
|
12517
|
+
"title": "CreditProtocol",
|
|
12518
|
+
"description": "Which lending protocol a credit action targets.\n\n``AAVE`` is the default so existing callers (which never send a ``protocol``\nfield) keep hitting the unchanged Aave code path. ``EULER`` opts in to the\nEuler V2 path, where the market is identified by EVK vault address(es)."
|
|
12519
|
+
},
|
|
12415
12520
|
"CreditRepayParams": {
|
|
12416
12521
|
"properties": {
|
|
12417
12522
|
"action_type": {
|
|
@@ -12423,7 +12528,7 @@
|
|
|
12423
12528
|
"token": {
|
|
12424
12529
|
"type": "string",
|
|
12425
12530
|
"title": "Token",
|
|
12426
|
-
"description": "Token to repay
|
|
12531
|
+
"description": "Token to repay."
|
|
12427
12532
|
},
|
|
12428
12533
|
"amount": {
|
|
12429
12534
|
"anyOf": [
|
|
@@ -12443,6 +12548,23 @@
|
|
|
12443
12548
|
"$ref": "#/components/schemas/InterestRateMode",
|
|
12444
12549
|
"description": "Interest rate mode: STABLE or VARIABLE.",
|
|
12445
12550
|
"example": "variable"
|
|
12551
|
+
},
|
|
12552
|
+
"protocol": {
|
|
12553
|
+
"$ref": "#/components/schemas/CreditProtocol",
|
|
12554
|
+
"description": "Lending protocol to use. Defaults to Aave.",
|
|
12555
|
+
"example": "AAVE"
|
|
12556
|
+
},
|
|
12557
|
+
"borrow_vault": {
|
|
12558
|
+
"anyOf": [
|
|
12559
|
+
{
|
|
12560
|
+
"type": "string"
|
|
12561
|
+
},
|
|
12562
|
+
{
|
|
12563
|
+
"type": "null"
|
|
12564
|
+
}
|
|
12565
|
+
],
|
|
12566
|
+
"title": "Borrow Vault",
|
|
12567
|
+
"description": "Euler only: the EVK vault the debt is owed to. Required when protocol=EULER."
|
|
12446
12568
|
}
|
|
12447
12569
|
},
|
|
12448
12570
|
"type": "object",
|
|
@@ -12466,6 +12588,35 @@
|
|
|
12466
12588
|
"description": "Blockchain network.",
|
|
12467
12589
|
"example": "base"
|
|
12468
12590
|
},
|
|
12591
|
+
"protocol": {
|
|
12592
|
+
"$ref": "#/components/schemas/CreditProtocol",
|
|
12593
|
+
"description": "Lending protocol to use. Defaults to Aave.",
|
|
12594
|
+
"example": "AAVE"
|
|
12595
|
+
},
|
|
12596
|
+
"borrow_vault": {
|
|
12597
|
+
"anyOf": [
|
|
12598
|
+
{
|
|
12599
|
+
"type": "string"
|
|
12600
|
+
},
|
|
12601
|
+
{
|
|
12602
|
+
"type": "null"
|
|
12603
|
+
}
|
|
12604
|
+
],
|
|
12605
|
+
"title": "Borrow Vault",
|
|
12606
|
+
"description": "Euler only: the EVK vault the debt is owed to (repay target). Required when protocol=EULER."
|
|
12607
|
+
},
|
|
12608
|
+
"collateral_vault": {
|
|
12609
|
+
"anyOf": [
|
|
12610
|
+
{
|
|
12611
|
+
"type": "string"
|
|
12612
|
+
},
|
|
12613
|
+
{
|
|
12614
|
+
"type": "null"
|
|
12615
|
+
}
|
|
12616
|
+
],
|
|
12617
|
+
"title": "Collateral Vault",
|
|
12618
|
+
"description": "Euler only: the EVK collateral vault to withdraw from. Required when protocol=EULER and withdrawing collateral."
|
|
12619
|
+
},
|
|
12469
12620
|
"repay_token": {
|
|
12470
12621
|
"type": "string",
|
|
12471
12622
|
"title": "Token",
|
|
@@ -12672,7 +12823,7 @@
|
|
|
12672
12823
|
"token": {
|
|
12673
12824
|
"type": "string",
|
|
12674
12825
|
"title": "Token",
|
|
12675
|
-
"description": "Collateral token to supply
|
|
12826
|
+
"description": "Collateral token to supply."
|
|
12676
12827
|
},
|
|
12677
12828
|
"amount": {
|
|
12678
12829
|
"anyOf": [
|
|
@@ -12687,6 +12838,23 @@
|
|
|
12687
12838
|
],
|
|
12688
12839
|
"title": "Amount",
|
|
12689
12840
|
"description": "Amount in token units to supply."
|
|
12841
|
+
},
|
|
12842
|
+
"protocol": {
|
|
12843
|
+
"$ref": "#/components/schemas/CreditProtocol",
|
|
12844
|
+
"description": "Lending protocol to use. Defaults to Aave.",
|
|
12845
|
+
"example": "AAVE"
|
|
12846
|
+
},
|
|
12847
|
+
"collateral_vault": {
|
|
12848
|
+
"anyOf": [
|
|
12849
|
+
{
|
|
12850
|
+
"type": "string"
|
|
12851
|
+
},
|
|
12852
|
+
{
|
|
12853
|
+
"type": "null"
|
|
12854
|
+
}
|
|
12855
|
+
],
|
|
12856
|
+
"title": "Collateral Vault",
|
|
12857
|
+
"description": "Euler only: the EVK collateral vault to supply into. Required when protocol=EULER."
|
|
12690
12858
|
}
|
|
12691
12859
|
},
|
|
12692
12860
|
"type": "object",
|
|
@@ -12915,7 +13083,7 @@
|
|
|
12915
13083
|
"token": {
|
|
12916
13084
|
"type": "string",
|
|
12917
13085
|
"title": "Token",
|
|
12918
|
-
"description": "Collateral token to withdraw
|
|
13086
|
+
"description": "Collateral token to withdraw."
|
|
12919
13087
|
},
|
|
12920
13088
|
"amount": {
|
|
12921
13089
|
"anyOf": [
|
|
@@ -12930,6 +13098,23 @@
|
|
|
12930
13098
|
],
|
|
12931
13099
|
"title": "Amount",
|
|
12932
13100
|
"description": "Amount in token units to withdraw."
|
|
13101
|
+
},
|
|
13102
|
+
"protocol": {
|
|
13103
|
+
"$ref": "#/components/schemas/CreditProtocol",
|
|
13104
|
+
"description": "Lending protocol to use. Defaults to Aave.",
|
|
13105
|
+
"example": "AAVE"
|
|
13106
|
+
},
|
|
13107
|
+
"collateral_vault": {
|
|
13108
|
+
"anyOf": [
|
|
13109
|
+
{
|
|
13110
|
+
"type": "string"
|
|
13111
|
+
},
|
|
13112
|
+
{
|
|
13113
|
+
"type": "null"
|
|
13114
|
+
}
|
|
13115
|
+
],
|
|
13116
|
+
"title": "Collateral Vault",
|
|
13117
|
+
"description": "Euler only: the EVK collateral vault to withdraw from. Required when protocol=EULER."
|
|
12933
13118
|
}
|
|
12934
13119
|
},
|
|
12935
13120
|
"type": "object",
|
|
@@ -12952,6 +13137,23 @@
|
|
|
12952
13137
|
"title": "Symbol",
|
|
12953
13138
|
"description": "Symbol of the borrow token (e.g. WETH)."
|
|
12954
13139
|
},
|
|
13140
|
+
"protocol": {
|
|
13141
|
+
"$ref": "#/components/schemas/CreditProtocol",
|
|
13142
|
+
"description": "Lending protocol this position belongs to.",
|
|
13143
|
+
"example": "AAVE"
|
|
13144
|
+
},
|
|
13145
|
+
"vault": {
|
|
13146
|
+
"anyOf": [
|
|
13147
|
+
{
|
|
13148
|
+
"type": "string"
|
|
13149
|
+
},
|
|
13150
|
+
{
|
|
13151
|
+
"type": "null"
|
|
13152
|
+
}
|
|
13153
|
+
],
|
|
13154
|
+
"title": "Vault",
|
|
13155
|
+
"description": "Euler only: the EVK borrow vault this debt is owed to."
|
|
13156
|
+
},
|
|
12955
13157
|
"amount_borrowed": {
|
|
12956
13158
|
"anyOf": [
|
|
12957
13159
|
{
|
|
@@ -12962,7 +13164,7 @@
|
|
|
12962
13164
|
}
|
|
12963
13165
|
],
|
|
12964
13166
|
"title": "Amount Borrowed",
|
|
12965
|
-
"description": "Current on-chain
|
|
13167
|
+
"description": "Current on-chain debt balance (the vault's underlying asset for Euler)."
|
|
12966
13168
|
},
|
|
12967
13169
|
"usd_value": {
|
|
12968
13170
|
"anyOf": [
|
package/package.json
CHANGED
|
@@ -7,11 +7,31 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
CreditProtocol,
|
|
12
|
+
CreditProtocol$inboundSchema,
|
|
13
|
+
} from "./creditprotocol.js";
|
|
10
14
|
|
|
11
15
|
/**
|
|
12
|
-
*
|
|
16
|
+
* Account-level summary for one lending protocol.
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
*
|
|
20
|
+
* Populated from Aave ``getUserAccountData()`` or, for Euler, from the
|
|
21
|
+
* controller vault's risk engine (``accountLiquidity``). The E-Mode fields are
|
|
22
|
+
* Aave-only and stay at their defaults for Euler.
|
|
13
23
|
*/
|
|
14
24
|
export type AccountSummary = {
|
|
25
|
+
/**
|
|
26
|
+
* Which lending protocol a credit action targets.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
*
|
|
30
|
+
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
31
|
+
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
32
|
+
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
33
|
+
*/
|
|
34
|
+
protocol?: CreditProtocol | undefined;
|
|
15
35
|
/**
|
|
16
36
|
* Health factor. Above 1 is safe; below 1 risks liquidation.
|
|
17
37
|
*/
|
|
@@ -48,6 +68,7 @@ export const AccountSummary$inboundSchema: z.ZodType<
|
|
|
48
68
|
z.ZodTypeDef,
|
|
49
69
|
unknown
|
|
50
70
|
> = z.object({
|
|
71
|
+
protocol: CreditProtocol$inboundSchema.optional(),
|
|
51
72
|
health_factor: z.string(),
|
|
52
73
|
total_collateral_usd: z.string(),
|
|
53
74
|
total_debt_usd: z.string(),
|
|
@@ -8,6 +8,10 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import { CreditEvent, CreditEvent$inboundSchema } from "./creditevent.js";
|
|
11
|
+
import {
|
|
12
|
+
CreditProtocol,
|
|
13
|
+
CreditProtocol$inboundSchema,
|
|
14
|
+
} from "./creditprotocol.js";
|
|
11
15
|
|
|
12
16
|
/**
|
|
13
17
|
* A per-reserve collateral position.
|
|
@@ -22,7 +26,21 @@ export type CollateralPosition = {
|
|
|
22
26
|
*/
|
|
23
27
|
symbol: string;
|
|
24
28
|
/**
|
|
25
|
-
*
|
|
29
|
+
* Which lending protocol a credit action targets.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
*
|
|
33
|
+
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
34
|
+
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
35
|
+
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
36
|
+
*/
|
|
37
|
+
protocol?: CreditProtocol | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Euler only: the EVK collateral vault holding this position.
|
|
40
|
+
*/
|
|
41
|
+
vault?: string | null | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Current on-chain collateral balance (the vault's underlying asset for Euler).
|
|
26
44
|
*/
|
|
27
45
|
amountSupplied: string | null;
|
|
28
46
|
/**
|
|
@@ -63,6 +81,8 @@ export const CollateralPosition$inboundSchema: z.ZodType<
|
|
|
63
81
|
> = z.object({
|
|
64
82
|
token: z.string(),
|
|
65
83
|
symbol: z.string(),
|
|
84
|
+
protocol: CreditProtocol$inboundSchema.optional(),
|
|
85
|
+
vault: z.nullable(z.string()).optional(),
|
|
66
86
|
amount_supplied: z.nullable(z.string()),
|
|
67
87
|
usd_value: z.nullable(z.string()).optional(),
|
|
68
88
|
supply_apy: z.nullable(z.string()).optional(),
|
|
@@ -9,6 +9,10 @@ import {
|
|
|
9
9
|
CreditFee$Outbound,
|
|
10
10
|
CreditFee$outboundSchema,
|
|
11
11
|
} from "./creditfee.js";
|
|
12
|
+
import {
|
|
13
|
+
CreditProtocol,
|
|
14
|
+
CreditProtocol$outboundSchema,
|
|
15
|
+
} from "./creditprotocol.js";
|
|
12
16
|
import {
|
|
13
17
|
InterestRateMode,
|
|
14
18
|
InterestRateMode$outboundSchema,
|
|
@@ -44,6 +48,20 @@ export type CreditBorrowParams = {
|
|
|
44
48
|
* Optional fee on the borrowed amount.
|
|
45
49
|
*/
|
|
46
50
|
fee?: CreditFee | null | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Which lending protocol a credit action targets.
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
*
|
|
56
|
+
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
57
|
+
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
58
|
+
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
59
|
+
*/
|
|
60
|
+
protocol?: CreditProtocol | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Euler only: the EVK vault to borrow from. Required when protocol=EULER.
|
|
63
|
+
*/
|
|
64
|
+
borrowVault?: string | null | undefined;
|
|
47
65
|
};
|
|
48
66
|
|
|
49
67
|
/** @internal */
|
|
@@ -71,6 +89,8 @@ export type CreditBorrowParams$Outbound = {
|
|
|
71
89
|
amount: number | string;
|
|
72
90
|
interest_rate_mode?: string | undefined;
|
|
73
91
|
fee?: CreditFee$Outbound | null | undefined;
|
|
92
|
+
protocol?: string | undefined;
|
|
93
|
+
borrow_vault?: string | null | undefined;
|
|
74
94
|
};
|
|
75
95
|
|
|
76
96
|
/** @internal */
|
|
@@ -84,10 +104,13 @@ export const CreditBorrowParams$outboundSchema: z.ZodType<
|
|
|
84
104
|
amount: z.union([z.number(), z.string()]),
|
|
85
105
|
interestRateMode: InterestRateMode$outboundSchema.optional(),
|
|
86
106
|
fee: z.nullable(CreditFee$outboundSchema).optional(),
|
|
107
|
+
protocol: CreditProtocol$outboundSchema.optional(),
|
|
108
|
+
borrowVault: z.nullable(z.string()).optional(),
|
|
87
109
|
}).transform((v) => {
|
|
88
110
|
return remap$(v, {
|
|
89
111
|
actionType: "action_type",
|
|
90
112
|
interestRateMode: "interest_rate_mode",
|
|
113
|
+
borrowVault: "borrow_vault",
|
|
91
114
|
});
|
|
92
115
|
});
|
|
93
116
|
|
|
@@ -10,6 +10,10 @@ import {
|
|
|
10
10
|
CreditFee$Outbound,
|
|
11
11
|
CreditFee$outboundSchema,
|
|
12
12
|
} from "./creditfee.js";
|
|
13
|
+
import {
|
|
14
|
+
CreditProtocol,
|
|
15
|
+
CreditProtocol$outboundSchema,
|
|
16
|
+
} from "./creditprotocol.js";
|
|
13
17
|
import {
|
|
14
18
|
InterestRateMode,
|
|
15
19
|
InterestRateMode$outboundSchema,
|
|
@@ -39,6 +43,24 @@ export type CreditBorrowRequest = {
|
|
|
39
43
|
* The chain to use.
|
|
40
44
|
*/
|
|
41
45
|
chain: Chain;
|
|
46
|
+
/**
|
|
47
|
+
* Which lending protocol a credit action targets.
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
*
|
|
51
|
+
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
52
|
+
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
53
|
+
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
54
|
+
*/
|
|
55
|
+
protocol?: CreditProtocol | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Euler only: the EVK collateral vault to supply into. Required when protocol=EULER and supplying collateral.
|
|
58
|
+
*/
|
|
59
|
+
collateralVault?: string | null | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Euler only: the EVK vault to borrow from. Required when protocol=EULER.
|
|
62
|
+
*/
|
|
63
|
+
borrowVault?: string | null | undefined;
|
|
42
64
|
/**
|
|
43
65
|
* Token currently held in the Credit Account to use as input. If the same as collateral_token, no swap is performed. Omit together with amount_in and collateral_token to borrow against existing collateral.
|
|
44
66
|
*/
|
|
@@ -151,6 +173,9 @@ export function creditBorrowRequestSlippageToJSON(
|
|
|
151
173
|
export type CreditBorrowRequest$Outbound = {
|
|
152
174
|
owner: string;
|
|
153
175
|
chain: string;
|
|
176
|
+
protocol?: string | undefined;
|
|
177
|
+
collateral_vault?: string | null | undefined;
|
|
178
|
+
borrow_vault?: string | null | undefined;
|
|
154
179
|
token_in?: string | null | undefined;
|
|
155
180
|
amount_in?: number | string | null | undefined;
|
|
156
181
|
collateral_token?: string | null | undefined;
|
|
@@ -173,6 +198,9 @@ export const CreditBorrowRequest$outboundSchema: z.ZodType<
|
|
|
173
198
|
> = z.object({
|
|
174
199
|
owner: z.string(),
|
|
175
200
|
chain: Chain$outboundSchema,
|
|
201
|
+
protocol: CreditProtocol$outboundSchema.optional(),
|
|
202
|
+
collateralVault: z.nullable(z.string()).optional(),
|
|
203
|
+
borrowVault: z.nullable(z.string()).optional(),
|
|
176
204
|
tokenIn: z.nullable(z.string()).optional(),
|
|
177
205
|
amountIn: z.nullable(z.union([z.number(), z.string()])).optional(),
|
|
178
206
|
collateralToken: z.nullable(z.string()).optional(),
|
|
@@ -187,6 +215,8 @@ export const CreditBorrowRequest$outboundSchema: z.ZodType<
|
|
|
187
215
|
permit2Deadline: z.nullable(z.number().int()).optional(),
|
|
188
216
|
}).transform((v) => {
|
|
189
217
|
return remap$(v, {
|
|
218
|
+
collateralVault: "collateral_vault",
|
|
219
|
+
borrowVault: "borrow_vault",
|
|
190
220
|
tokenIn: "token_in",
|
|
191
221
|
amountIn: "amount_in",
|
|
192
222
|
collateralToken: "collateral_token",
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import {
|
|
8
|
+
CreditProtocol,
|
|
9
|
+
CreditProtocol$outboundSchema,
|
|
10
|
+
} from "./creditprotocol.js";
|
|
7
11
|
|
|
8
12
|
/**
|
|
9
13
|
* Enable a reserve asset as collateral in Aave via Credit Account.
|
|
@@ -19,12 +23,28 @@ export type CreditEnableCollateralParams = {
|
|
|
19
23
|
* The underlying reserve token to enable as collateral (e.g. USDC, not aUSDC).
|
|
20
24
|
*/
|
|
21
25
|
token: string;
|
|
26
|
+
/**
|
|
27
|
+
* Which lending protocol a credit action targets.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
*
|
|
31
|
+
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
32
|
+
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
33
|
+
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
34
|
+
*/
|
|
35
|
+
protocol?: CreditProtocol | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Euler only: the EVK collateral vault to enable. Required when protocol=EULER.
|
|
38
|
+
*/
|
|
39
|
+
collateralVault?: string | null | undefined;
|
|
22
40
|
};
|
|
23
41
|
|
|
24
42
|
/** @internal */
|
|
25
43
|
export type CreditEnableCollateralParams$Outbound = {
|
|
26
44
|
action_type: "CREDIT_ENABLE_COLLATERAL";
|
|
27
45
|
token: string;
|
|
46
|
+
protocol?: string | undefined;
|
|
47
|
+
collateral_vault?: string | null | undefined;
|
|
28
48
|
};
|
|
29
49
|
|
|
30
50
|
/** @internal */
|
|
@@ -35,9 +55,12 @@ export const CreditEnableCollateralParams$outboundSchema: z.ZodType<
|
|
|
35
55
|
> = z.object({
|
|
36
56
|
actionType: z.literal("CREDIT_ENABLE_COLLATERAL"),
|
|
37
57
|
token: z.string(),
|
|
58
|
+
protocol: CreditProtocol$outboundSchema.optional(),
|
|
59
|
+
collateralVault: z.nullable(z.string()).optional(),
|
|
38
60
|
}).transform((v) => {
|
|
39
61
|
return remap$(v, {
|
|
40
62
|
actionType: "action_type",
|
|
63
|
+
collateralVault: "collateral_vault",
|
|
41
64
|
});
|
|
42
65
|
});
|
|
43
66
|
|
|
@@ -34,9 +34,19 @@ export type CreditPositionsResponse = {
|
|
|
34
34
|
*/
|
|
35
35
|
debtPositions?: Array<DebtPosition> | undefined;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Account-level summary for one lending protocol.
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
*
|
|
41
|
+
* Populated from Aave ``getUserAccountData()`` or, for Euler, from the
|
|
42
|
+
* controller vault's risk engine (``accountLiquidity``). The E-Mode fields are
|
|
43
|
+
* Aave-only and stay at their defaults for Euler.
|
|
38
44
|
*/
|
|
39
45
|
accountSummary: AccountSummary;
|
|
46
|
+
/**
|
|
47
|
+
* Euler account-level summary (health factor, LTV, etc.), present only when the account holds Euler positions. Null for Aave-only accounts.
|
|
48
|
+
*/
|
|
49
|
+
eulerAccountSummary?: AccountSummary | null | undefined;
|
|
40
50
|
/**
|
|
41
51
|
* All tokens available for borrowing with max amounts based on current collateral.
|
|
42
52
|
*/
|
|
@@ -56,6 +66,7 @@ export const CreditPositionsResponse$inboundSchema: z.ZodType<
|
|
|
56
66
|
collateral_positions: z.array(CollateralPosition$inboundSchema).optional(),
|
|
57
67
|
debt_positions: z.array(DebtPosition$inboundSchema).optional(),
|
|
58
68
|
account_summary: AccountSummary$inboundSchema,
|
|
69
|
+
euler_account_summary: z.nullable(AccountSummary$inboundSchema).optional(),
|
|
59
70
|
borrowable_tokens: z.array(BorrowableToken$inboundSchema).optional(),
|
|
60
71
|
total_usd_value: z.nullable(z.string()).optional(),
|
|
61
72
|
}).transform((v) => {
|
|
@@ -63,6 +74,7 @@ export const CreditPositionsResponse$inboundSchema: z.ZodType<
|
|
|
63
74
|
"collateral_positions": "collateralPositions",
|
|
64
75
|
"debt_positions": "debtPositions",
|
|
65
76
|
"account_summary": "accountSummary",
|
|
77
|
+
"euler_account_summary": "eulerAccountSummary",
|
|
66
78
|
"borrowable_tokens": "borrowableTokens",
|
|
67
79
|
"total_usd_value": "totalUsdValue",
|
|
68
80
|
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Which lending protocol a credit action targets.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
*
|
|
13
|
+
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
14
|
+
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
15
|
+
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
16
|
+
*/
|
|
17
|
+
export const CreditProtocol = {
|
|
18
|
+
Aave: "AAVE",
|
|
19
|
+
Euler: "EULER",
|
|
20
|
+
} as const;
|
|
21
|
+
/**
|
|
22
|
+
* Which lending protocol a credit action targets.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
*
|
|
26
|
+
* ``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
27
|
+
* field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
28
|
+
* Euler V2 path, where the market is identified by EVK vault address(es).
|
|
29
|
+
*/
|
|
30
|
+
export type CreditProtocol = ClosedEnum<typeof CreditProtocol>;
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const CreditProtocol$inboundSchema: z.ZodNativeEnum<
|
|
34
|
+
typeof CreditProtocol
|
|
35
|
+
> = z.nativeEnum(CreditProtocol);
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const CreditProtocol$outboundSchema: z.ZodNativeEnum<
|
|
38
|
+
typeof CreditProtocol
|
|
39
|
+
> = CreditProtocol$inboundSchema;
|