@compass-labs/api-sdk 2.2.76-rc.3 → 2.2.76
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/README.md +3 -7
- package/codeSamples_typescript.yaml +0 -12
- package/dist/commonjs/models/components/aavelooprequest.d.ts +16 -16
- package/dist/commonjs/models/components/aavelooprequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/aavelooprequest.js +17 -17
- package/dist/commonjs/models/components/aavelooprequest.js.map +1 -1
- package/dist/commonjs/models/components/accountsummary.d.ts +0 -4
- package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/accountsummary.js.map +1 -1
- package/dist/commonjs/models/components/collateralposition.d.ts +0 -12
- package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/collateralposition.js +0 -4
- package/dist/commonjs/models/components/collateralposition.js.map +1 -1
- package/dist/commonjs/models/components/creditborrowparams.d.ts +0 -9
- package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditborrowparams.js +0 -2
- package/dist/commonjs/models/components/creditborrowparams.js.map +1 -1
- package/dist/commonjs/models/components/creditborrowrequest.d.ts +0 -9
- package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditborrowrequest.js +0 -2
- package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
- package/dist/commonjs/models/components/creditenablecollateralparams.d.ts +0 -4
- package/dist/commonjs/models/components/creditenablecollateralparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditenablecollateralparams.js.map +1 -1
- package/dist/commonjs/models/components/creditprotocol.d.ts +0 -9
- package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditprotocol.js +0 -5
- package/dist/commonjs/models/components/creditprotocol.js.map +1 -1
- package/dist/commonjs/models/components/creditrepayparams.d.ts +0 -9
- package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditrepayparams.js +0 -2
- package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
- package/dist/commonjs/models/components/creditrepayrequest.d.ts +0 -9
- package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditrepayrequest.js +0 -2
- package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
- package/dist/commonjs/models/components/creditsupplyparams.d.ts +0 -9
- package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditsupplyparams.js +0 -2
- package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
- package/dist/commonjs/models/components/creditwithdrawparams.d.ts +0 -9
- package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditwithdrawparams.js +0 -2
- package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
- package/dist/commonjs/models/components/debtposition.d.ts +0 -12
- package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/debtposition.js +0 -4
- package/dist/commonjs/models/components/debtposition.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +0 -6
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +0 -6
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +0 -1
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +0 -1
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/credit.d.ts +0 -32
- package/dist/commonjs/sdk/credit.d.ts.map +1 -1
- package/dist/commonjs/sdk/credit.js +0 -38
- package/dist/commonjs/sdk/credit.js.map +1 -1
- package/dist/esm/models/components/aavelooprequest.d.ts +16 -16
- package/dist/esm/models/components/aavelooprequest.d.ts.map +1 -1
- package/dist/esm/models/components/aavelooprequest.js +12 -12
- package/dist/esm/models/components/aavelooprequest.js.map +1 -1
- package/dist/esm/models/components/accountsummary.d.ts +0 -4
- package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
- package/dist/esm/models/components/accountsummary.js.map +1 -1
- package/dist/esm/models/components/collateralposition.d.ts +0 -12
- package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
- package/dist/esm/models/components/collateralposition.js +0 -4
- package/dist/esm/models/components/collateralposition.js.map +1 -1
- package/dist/esm/models/components/creditborrowparams.d.ts +0 -9
- package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditborrowparams.js +0 -2
- package/dist/esm/models/components/creditborrowparams.js.map +1 -1
- package/dist/esm/models/components/creditborrowrequest.d.ts +0 -9
- package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditborrowrequest.js +0 -2
- package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
- package/dist/esm/models/components/creditenablecollateralparams.d.ts +0 -4
- package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
- package/dist/esm/models/components/creditprotocol.d.ts +0 -9
- package/dist/esm/models/components/creditprotocol.d.ts.map +1 -1
- package/dist/esm/models/components/creditprotocol.js +0 -5
- package/dist/esm/models/components/creditprotocol.js.map +1 -1
- package/dist/esm/models/components/creditrepayparams.d.ts +0 -9
- package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditrepayparams.js +0 -2
- package/dist/esm/models/components/creditrepayparams.js.map +1 -1
- package/dist/esm/models/components/creditrepayrequest.d.ts +0 -9
- package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditrepayrequest.js +0 -2
- package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
- package/dist/esm/models/components/creditsupplyparams.d.ts +0 -9
- package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditsupplyparams.js +0 -2
- package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
- package/dist/esm/models/components/creditwithdrawparams.d.ts +0 -9
- package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditwithdrawparams.js +0 -2
- package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
- package/dist/esm/models/components/debtposition.d.ts +0 -12
- package/dist/esm/models/components/debtposition.d.ts.map +1 -1
- package/dist/esm/models/components/debtposition.js +0 -4
- package/dist/esm/models/components/debtposition.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +0 -6
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +0 -6
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +0 -1
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +0 -1
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/credit.d.ts +0 -32
- package/dist/esm/sdk/credit.d.ts.map +1 -1
- package/dist/esm/sdk/credit.js +0 -38
- package/dist/esm/sdk/credit.js.map +1 -1
- package/docs/models/components/aavelooprequest.md +4 -4
- package/docs/models/components/accountsummary.md +10 -10
- package/docs/models/components/collateralposition.md +14 -16
- package/docs/models/components/creditborrowparams.md +9 -10
- package/docs/models/components/creditborrowrequest.md +19 -20
- package/docs/models/components/creditenablecollateralparams.md +6 -6
- package/docs/models/components/creditprotocol.md +1 -5
- package/docs/models/components/creditrepayparams.md +8 -9
- package/docs/models/components/creditrepayrequest.md +18 -19
- package/docs/models/components/creditsupplyparams.md +7 -8
- package/docs/models/components/creditwithdrawparams.md +7 -8
- package/docs/models/components/debtposition.md +13 -15
- package/docs/models/components/{aavelooprequestinitialcollateralamount.md → initialcollateralamount.md} +1 -1
- package/docs/models/components/{aavelooprequestloantovalue.md → loantovalue.md} +1 -1
- package/docs/models/components/{aavelooprequestmaxslippagepercent.md → maxslippagepercent.md} +1 -1
- package/docs/models/components/{aavelooprequestmultiplier.md → multiplier.md} +1 -1
- package/docs/sdks/credit/README.md +0 -186
- package/examples/node_modules/tsx/dist/cli.cjs +1 -1
- package/examples/node_modules/tsx/dist/cli.mjs +1 -1
- package/examples/node_modules/tsx/dist/esm/api/index.cjs +1 -1
- package/examples/node_modules/tsx/dist/esm/api/index.mjs +1 -1
- package/examples/node_modules/tsx/dist/esm/index.cjs +1 -1
- package/examples/node_modules/tsx/dist/esm/index.mjs +1 -1
- package/examples/node_modules/tsx/dist/loader.cjs +1 -1
- package/examples/node_modules/tsx/dist/loader.mjs +1 -1
- package/examples/node_modules/tsx/dist/package-BhsaYzSJ.cjs +1 -0
- package/examples/node_modules/tsx/dist/package-REq4Oepp.mjs +1 -0
- package/examples/node_modules/tsx/dist/register-BBZNEaBg.cjs +2 -0
- package/examples/node_modules/tsx/dist/register-tkXbOgAS.mjs +2 -0
- package/examples/node_modules/tsx/dist/repl.cjs +1 -1
- package/examples/node_modules/tsx/dist/repl.mjs +1 -1
- package/examples/node_modules/tsx/package.json +1 -1
- package/examples/package-lock.json +3 -3
- package/openapi_prepped_for_speakeasy.json +2 -658
- package/package.json +1 -1
- package/src/models/components/aavelooprequest.ts +30 -43
- package/src/models/components/accountsummary.ts +0 -4
- package/src/models/components/collateralposition.ts +0 -16
- package/src/models/components/creditborrowparams.ts +0 -11
- package/src/models/components/creditborrowrequest.ts +0 -11
- package/src/models/components/creditenablecollateralparams.ts +0 -4
- package/src/models/components/creditprotocol.ts +0 -9
- package/src/models/components/creditrepayparams.ts +0 -11
- package/src/models/components/creditrepayrequest.ts +0 -11
- package/src/models/components/creditsupplyparams.ts +0 -11
- package/src/models/components/creditwithdrawparams.ts +0 -11
- package/src/models/components/debtposition.ts +0 -16
- package/src/models/components/index.ts +0 -6
- package/src/models/operations/index.ts +0 -1
- package/src/sdk/credit.ts +0 -54
- package/dist/commonjs/funcs/creditCreditLoop.d.ts +0 -31
- package/dist/commonjs/funcs/creditCreditLoop.d.ts.map +0 -1
- package/dist/commonjs/funcs/creditCreditLoop.js +0 -132
- package/dist/commonjs/funcs/creditCreditLoop.js.map +0 -1
- package/dist/commonjs/funcs/creditCreditMorphoMarkets.d.ts +0 -24
- package/dist/commonjs/funcs/creditCreditMorphoMarkets.d.ts.map +0 -1
- package/dist/commonjs/funcs/creditCreditMorphoMarkets.js +0 -128
- package/dist/commonjs/funcs/creditCreditMorphoMarkets.js.map +0 -1
- package/dist/commonjs/models/components/creditlooppreview.d.ts +0 -45
- package/dist/commonjs/models/components/creditlooppreview.d.ts.map +0 -1
- package/dist/commonjs/models/components/creditlooppreview.js +0 -68
- package/dist/commonjs/models/components/creditlooppreview.js.map +0 -1
- package/dist/commonjs/models/components/creditlooprequest.d.ts +0 -125
- package/dist/commonjs/models/components/creditlooprequest.d.ts.map +0 -1
- package/dist/commonjs/models/components/creditlooprequest.js +0 -98
- package/dist/commonjs/models/components/creditlooprequest.js.map +0 -1
- package/dist/commonjs/models/components/creditloopresponse.d.ts +0 -27
- package/dist/commonjs/models/components/creditloopresponse.d.ts.map +0 -1
- package/dist/commonjs/models/components/creditloopresponse.js +0 -61
- package/dist/commonjs/models/components/creditloopresponse.js.map +0 -1
- package/dist/commonjs/models/components/looplegpreview.d.ts +0 -24
- package/dist/commonjs/models/components/looplegpreview.d.ts.map +0 -1
- package/dist/commonjs/models/components/looplegpreview.js +0 -59
- package/dist/commonjs/models/components/looplegpreview.js.map +0 -1
- package/dist/commonjs/models/components/morpholendingmarket.d.ts +0 -80
- package/dist/commonjs/models/components/morpholendingmarket.d.ts.map +0 -1
- package/dist/commonjs/models/components/morpholendingmarket.js +0 -82
- package/dist/commonjs/models/components/morpholendingmarket.js.map +0 -1
- package/dist/commonjs/models/components/morphomarketsresponse.d.ts +0 -21
- package/dist/commonjs/models/components/morphomarketsresponse.d.ts.map +0 -1
- package/dist/commonjs/models/components/morphomarketsresponse.js +0 -52
- package/dist/commonjs/models/components/morphomarketsresponse.js.map +0 -1
- package/dist/commonjs/models/operations/v2creditmorphomarkets.d.ts +0 -22
- package/dist/commonjs/models/operations/v2creditmorphomarkets.d.ts.map +0 -1
- package/dist/commonjs/models/operations/v2creditmorphomarkets.js +0 -57
- package/dist/commonjs/models/operations/v2creditmorphomarkets.js.map +0 -1
- package/dist/esm/funcs/creditCreditLoop.d.ts +0 -31
- package/dist/esm/funcs/creditCreditLoop.d.ts.map +0 -1
- package/dist/esm/funcs/creditCreditLoop.js +0 -96
- package/dist/esm/funcs/creditCreditLoop.js.map +0 -1
- package/dist/esm/funcs/creditCreditMorphoMarkets.d.ts +0 -24
- package/dist/esm/funcs/creditCreditMorphoMarkets.d.ts.map +0 -1
- package/dist/esm/funcs/creditCreditMorphoMarkets.js +0 -92
- package/dist/esm/funcs/creditCreditMorphoMarkets.js.map +0 -1
- package/dist/esm/models/components/creditlooppreview.d.ts +0 -45
- package/dist/esm/models/components/creditlooppreview.d.ts.map +0 -1
- package/dist/esm/models/components/creditlooppreview.js +0 -31
- package/dist/esm/models/components/creditlooppreview.js.map +0 -1
- package/dist/esm/models/components/creditlooprequest.d.ts +0 -125
- package/dist/esm/models/components/creditlooprequest.d.ts.map +0 -1
- package/dist/esm/models/components/creditlooprequest.js +0 -57
- package/dist/esm/models/components/creditlooprequest.js.map +0 -1
- package/dist/esm/models/components/creditloopresponse.d.ts +0 -27
- package/dist/esm/models/components/creditloopresponse.d.ts.map +0 -1
- package/dist/esm/models/components/creditloopresponse.js +0 -24
- package/dist/esm/models/components/creditloopresponse.js.map +0 -1
- package/dist/esm/models/components/looplegpreview.d.ts +0 -24
- package/dist/esm/models/components/looplegpreview.d.ts.map +0 -1
- package/dist/esm/models/components/looplegpreview.js +0 -22
- package/dist/esm/models/components/looplegpreview.js.map +0 -1
- package/dist/esm/models/components/morpholendingmarket.d.ts +0 -80
- package/dist/esm/models/components/morpholendingmarket.d.ts.map +0 -1
- package/dist/esm/models/components/morpholendingmarket.js +0 -45
- package/dist/esm/models/components/morpholendingmarket.js.map +0 -1
- package/dist/esm/models/components/morphomarketsresponse.d.ts +0 -21
- package/dist/esm/models/components/morphomarketsresponse.d.ts.map +0 -1
- package/dist/esm/models/components/morphomarketsresponse.js +0 -15
- package/dist/esm/models/components/morphomarketsresponse.js.map +0 -1
- package/dist/esm/models/operations/v2creditmorphomarkets.d.ts +0 -22
- package/dist/esm/models/operations/v2creditmorphomarkets.d.ts.map +0 -1
- package/dist/esm/models/operations/v2creditmorphomarkets.js +0 -20
- package/dist/esm/models/operations/v2creditmorphomarkets.js.map +0 -1
- package/docs/models/components/creditlooppreview.md +0 -33
- package/docs/models/components/creditlooprequest.md +0 -41
- package/docs/models/components/creditlooprequestinitialcollateralamount.md +0 -19
- package/docs/models/components/creditlooprequestloantovalue.md +0 -19
- package/docs/models/components/creditlooprequestmaxslippagepercent.md +0 -19
- package/docs/models/components/creditlooprequestmultiplier.md +0 -19
- package/docs/models/components/creditloopresponse.md +0 -30
- package/docs/models/components/looplegpreview.md +0 -21
- package/docs/models/components/morpholendingmarket.md +0 -49
- package/docs/models/components/morphomarketsresponse.md +0 -21
- package/docs/models/operations/v2creditmorphomarketschain.md +0 -15
- package/docs/models/operations/v2creditmorphomarketsrequest.md +0 -17
- package/examples/node_modules/tsx/dist/package-Bj47PlGH.mjs +0 -1
- package/examples/node_modules/tsx/dist/package-DMqO70yR.cjs +0 -1
- package/examples/node_modules/tsx/dist/register-CKju0f8h.cjs +0 -2
- package/examples/node_modules/tsx/dist/register-CqMfTiWi.mjs +0 -2
- package/src/funcs/creditCreditLoop.ts +0 -184
- package/src/funcs/creditCreditMorphoMarkets.ts +0 -182
- package/src/models/components/creditlooppreview.ts +0 -86
- package/src/models/components/creditlooprequest.ts +0 -235
- package/src/models/components/creditloopresponse.ts +0 -65
- package/src/models/components/looplegpreview.ts +0 -54
- package/src/models/components/morpholendingmarket.ts +0 -133
- package/src/models/components/morphomarketsresponse.ts +0 -46
- package/src/models/operations/v2creditmorphomarkets.ts +0 -49
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
/**
|
|
5
|
-
* One planned loop iteration.
|
|
6
|
-
*/
|
|
7
|
-
export type LoopLegPreview = {
|
|
8
|
-
/**
|
|
9
|
-
* Collateral supplied this iteration (token units).
|
|
10
|
-
*/
|
|
11
|
-
supplyAmount: string | null;
|
|
12
|
-
/**
|
|
13
|
-
* Loan borrowed this iteration; null on the final supply-only iteration.
|
|
14
|
-
*/
|
|
15
|
-
borrowAmount?: string | null | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* Guaranteed swap output (collateral units) — the next iteration's supply. Enforced on-chain by the swap's minimum-return.
|
|
18
|
-
*/
|
|
19
|
-
minSwapOut?: string | null | undefined;
|
|
20
|
-
};
|
|
21
|
-
/** @internal */
|
|
22
|
-
export declare const LoopLegPreview$inboundSchema: z.ZodType<LoopLegPreview, z.ZodTypeDef, unknown>;
|
|
23
|
-
export declare function loopLegPreviewFromJSON(jsonString: string): SafeParseResult<LoopLegPreview, SDKValidationError>;
|
|
24
|
-
//# sourceMappingURL=looplegpreview.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"looplegpreview.d.ts","sourceRoot":"","sources":["../../../../src/models/components/looplegpreview.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAClD,cAAc,EACd,CAAC,CAAC,UAAU,EACZ,OAAO,CAWP,CAAC;AAEH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAMrD"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod/v3";
|
|
5
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
/** @internal */
|
|
8
|
-
export const LoopLegPreview$inboundSchema = z.object({
|
|
9
|
-
supply_amount: z.nullable(z.string()),
|
|
10
|
-
borrow_amount: z.nullable(z.string()).optional(),
|
|
11
|
-
min_swap_out: z.nullable(z.string()).optional(),
|
|
12
|
-
}).transform((v) => {
|
|
13
|
-
return remap$(v, {
|
|
14
|
-
"supply_amount": "supplyAmount",
|
|
15
|
-
"borrow_amount": "borrowAmount",
|
|
16
|
-
"min_swap_out": "minSwapOut",
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
export function loopLegPreviewFromJSON(jsonString) {
|
|
20
|
-
return safeParse(jsonString, (x) => LoopLegPreview$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LoopLegPreview' from JSON`);
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=looplegpreview.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"looplegpreview.js","sourceRoot":"","sources":["../../../../src/models/components/looplegpreview.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAsBjD,gBAAgB;AAChB,MAAM,CAAC,MAAM,4BAA4B,GAIrC,CAAC,CAAC,MAAM,CAAC;IACX,aAAa,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACrC,aAAa,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAChD,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,eAAe,EAAE,cAAc;QAC/B,eAAe,EAAE,cAAc;QAC/B,cAAc,EAAE,YAAY;KAC7B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,sBAAsB,CACpC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,4BAA4B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACxD,4CAA4C,CAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
/**
|
|
5
|
-
* A Morpho Blue lending market: one isolated (collateral, loan) pair.
|
|
6
|
-
*/
|
|
7
|
-
export type MorphoLendingMarket = {
|
|
8
|
-
/**
|
|
9
|
-
* Morpho Blue market id — the bytes32 keccak of the market's (loanToken, collateralToken, oracle, irm, lltv) tuple. Pass this to the Morpho credit actions to identify the market.
|
|
10
|
-
*/
|
|
11
|
-
marketId: string;
|
|
12
|
-
/**
|
|
13
|
-
* Token that is supplied and borrowed in this market.
|
|
14
|
-
*/
|
|
15
|
-
loanToken: string;
|
|
16
|
-
/**
|
|
17
|
-
* Symbol of the loan token (e.g. USDC).
|
|
18
|
-
*/
|
|
19
|
-
loanTokenSymbol: string;
|
|
20
|
-
/**
|
|
21
|
-
* Decimals of the loan token.
|
|
22
|
-
*/
|
|
23
|
-
loanTokenDecimals: number;
|
|
24
|
-
/**
|
|
25
|
-
* Token accepted as collateral in this market.
|
|
26
|
-
*/
|
|
27
|
-
collateralToken: string;
|
|
28
|
-
/**
|
|
29
|
-
* Symbol of the collateral token (e.g. wstETH).
|
|
30
|
-
*/
|
|
31
|
-
collateralTokenSymbol: string;
|
|
32
|
-
/**
|
|
33
|
-
* Decimals of the collateral token.
|
|
34
|
-
*/
|
|
35
|
-
collateralTokenDecimals: number;
|
|
36
|
-
/**
|
|
37
|
-
* Oracle pricing the collateral in loan-token terms for this market.
|
|
38
|
-
*/
|
|
39
|
-
oracle: string;
|
|
40
|
-
/**
|
|
41
|
-
* Interest rate model contract of this market.
|
|
42
|
-
*/
|
|
43
|
-
irm: string;
|
|
44
|
-
/**
|
|
45
|
-
* Liquidation loan-to-value in percentage (e.g. 86 means a position is liquidatable once debt exceeds 86% of collateral value).
|
|
46
|
-
*/
|
|
47
|
-
lltv: string;
|
|
48
|
-
/**
|
|
49
|
-
* Current supply APY for lending the loan token, in percentage (e.g. 3.5 means 3.5%). Null if the rate is unavailable.
|
|
50
|
-
*/
|
|
51
|
-
supplyApy?: string | null | undefined;
|
|
52
|
-
/**
|
|
53
|
-
* Current borrow APY for the loan token, in percentage (e.g. 5.25 means 5.25%). Null if the rate is unavailable.
|
|
54
|
-
*/
|
|
55
|
-
borrowApy?: string | null | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* Borrowed share of supplied assets, in percentage 0-100.
|
|
58
|
-
*/
|
|
59
|
-
utilization: string;
|
|
60
|
-
/**
|
|
61
|
-
* Total loan tokens supplied to the market, in token units.
|
|
62
|
-
*/
|
|
63
|
-
totalSupplyAssets: string;
|
|
64
|
-
/**
|
|
65
|
-
* Total loan tokens borrowed from the market, in token units.
|
|
66
|
-
*/
|
|
67
|
-
totalBorrowAssets: string;
|
|
68
|
-
/**
|
|
69
|
-
* Loan tokens available to borrow or withdraw (supplied - borrowed), in token units.
|
|
70
|
-
*/
|
|
71
|
-
availableLiquidity: string;
|
|
72
|
-
/**
|
|
73
|
-
* Protocol fee taken from interest, in percentage of interest (e.g. 0 means no fee).
|
|
74
|
-
*/
|
|
75
|
-
fee: string;
|
|
76
|
-
};
|
|
77
|
-
/** @internal */
|
|
78
|
-
export declare const MorphoLendingMarket$inboundSchema: z.ZodType<MorphoLendingMarket, z.ZodTypeDef, unknown>;
|
|
79
|
-
export declare function morphoLendingMarketFromJSON(jsonString: string): SafeParseResult<MorphoLendingMarket, SDKValidationError>;
|
|
80
|
-
//# sourceMappingURL=morpholendingmarket.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"morpholendingmarket.d.ts","sourceRoot":"","sources":["../../../../src/models/components/morpholendingmarket.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,uBAAuB,EAAE,MAAM,CAAC;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CACvD,mBAAmB,EACnB,CAAC,CAAC,UAAU,EACZ,OAAO,CAkCP,CAAC;AAEH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAM1D"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod/v3";
|
|
5
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
/** @internal */
|
|
8
|
-
export const MorphoLendingMarket$inboundSchema = z.object({
|
|
9
|
-
market_id: z.string(),
|
|
10
|
-
loan_token: z.string(),
|
|
11
|
-
loan_token_symbol: z.string(),
|
|
12
|
-
loan_token_decimals: z.number().int(),
|
|
13
|
-
collateral_token: z.string(),
|
|
14
|
-
collateral_token_symbol: z.string(),
|
|
15
|
-
collateral_token_decimals: z.number().int(),
|
|
16
|
-
oracle: z.string(),
|
|
17
|
-
irm: z.string(),
|
|
18
|
-
lltv: z.string(),
|
|
19
|
-
supply_apy: z.nullable(z.string()).optional(),
|
|
20
|
-
borrow_apy: z.nullable(z.string()).optional(),
|
|
21
|
-
utilization: z.string(),
|
|
22
|
-
total_supply_assets: z.string(),
|
|
23
|
-
total_borrow_assets: z.string(),
|
|
24
|
-
available_liquidity: z.string(),
|
|
25
|
-
fee: z.string(),
|
|
26
|
-
}).transform((v) => {
|
|
27
|
-
return remap$(v, {
|
|
28
|
-
"market_id": "marketId",
|
|
29
|
-
"loan_token": "loanToken",
|
|
30
|
-
"loan_token_symbol": "loanTokenSymbol",
|
|
31
|
-
"loan_token_decimals": "loanTokenDecimals",
|
|
32
|
-
"collateral_token": "collateralToken",
|
|
33
|
-
"collateral_token_symbol": "collateralTokenSymbol",
|
|
34
|
-
"collateral_token_decimals": "collateralTokenDecimals",
|
|
35
|
-
"supply_apy": "supplyApy",
|
|
36
|
-
"borrow_apy": "borrowApy",
|
|
37
|
-
"total_supply_assets": "totalSupplyAssets",
|
|
38
|
-
"total_borrow_assets": "totalBorrowAssets",
|
|
39
|
-
"available_liquidity": "availableLiquidity",
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
export function morphoLendingMarketFromJSON(jsonString) {
|
|
43
|
-
return safeParse(jsonString, (x) => MorphoLendingMarket$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MorphoLendingMarket' from JSON`);
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=morpholendingmarket.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"morpholendingmarket.js","sourceRoot":"","sources":["../../../../src/models/components/morpholendingmarket.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AA8EjD,gBAAgB;AAChB,MAAM,CAAC,MAAM,iCAAiC,GAI1C,CAAC,CAAC,MAAM,CAAC;IACX,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC7B,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACrC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,uBAAuB,EAAE,CAAC,CAAC,MAAM,EAAE;IACnC,yBAAyB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC3C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC7C,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC7C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC/B,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC/B,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC/B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,WAAW,EAAE,UAAU;QACvB,YAAY,EAAE,WAAW;QACzB,mBAAmB,EAAE,iBAAiB;QACtC,qBAAqB,EAAE,mBAAmB;QAC1C,kBAAkB,EAAE,iBAAiB;QACrC,yBAAyB,EAAE,uBAAuB;QAClD,2BAA2B,EAAE,yBAAyB;QACtD,YAAY,EAAE,WAAW;QACzB,YAAY,EAAE,WAAW;QACzB,qBAAqB,EAAE,mBAAmB;QAC1C,qBAAqB,EAAE,mBAAmB;QAC1C,qBAAqB,EAAE,oBAAoB;KAC5C,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,2BAA2B,CACzC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,iCAAiC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC7D,iDAAiD,CAClD,CAAC;AACJ,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
import { MorphoLendingMarket } from "./morpholendingmarket.js";
|
|
5
|
-
/**
|
|
6
|
-
* Curated Morpho Blue lending markets, read on-chain per request.
|
|
7
|
-
*/
|
|
8
|
-
export type MorphoMarketsResponse = {
|
|
9
|
-
/**
|
|
10
|
-
* Morpho Blue singleton contract the markets were read from.
|
|
11
|
-
*/
|
|
12
|
-
morpho: string;
|
|
13
|
-
/**
|
|
14
|
-
* Curated lending markets with live LLTV, APYs, utilization, and liquidity.
|
|
15
|
-
*/
|
|
16
|
-
markets?: Array<MorphoLendingMarket> | undefined;
|
|
17
|
-
};
|
|
18
|
-
/** @internal */
|
|
19
|
-
export declare const MorphoMarketsResponse$inboundSchema: z.ZodType<MorphoMarketsResponse, z.ZodTypeDef, unknown>;
|
|
20
|
-
export declare function morphoMarketsResponseFromJSON(jsonString: string): SafeParseResult<MorphoMarketsResponse, SDKValidationError>;
|
|
21
|
-
//# sourceMappingURL=morphomarketsresponse.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"morphomarketsresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/morphomarketsresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,GAAG,SAAS,CAAC;CAClD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAM5D"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod/v3";
|
|
5
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
6
|
-
import { MorphoLendingMarket$inboundSchema, } from "./morpholendingmarket.js";
|
|
7
|
-
/** @internal */
|
|
8
|
-
export const MorphoMarketsResponse$inboundSchema = z.object({
|
|
9
|
-
morpho: z.string(),
|
|
10
|
-
markets: z.array(MorphoLendingMarket$inboundSchema).optional(),
|
|
11
|
-
});
|
|
12
|
-
export function morphoMarketsResponseFromJSON(jsonString) {
|
|
13
|
-
return safeParse(jsonString, (x) => MorphoMarketsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MorphoMarketsResponse' from JSON`);
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=morphomarketsresponse.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"morphomarketsresponse.js","sourceRoot":"","sources":["../../../../src/models/components/morphomarketsresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAEL,iCAAiC,GAClC,MAAM,0BAA0B,CAAC;AAgBlC,gBAAgB;AAChB,MAAM,CAAC,MAAM,mCAAmC,GAI5C,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC,QAAQ,EAAE;CAC/D,CAAC,CAAC;AAEH,MAAM,UAAU,6BAA6B,CAC3C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,mCAAmC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC/D,mDAAmD,CACpD,CAAC;AACJ,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v3";
|
|
2
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
3
|
-
export declare const V2CreditMorphoMarketsChain: {
|
|
4
|
-
readonly Arbitrum: "arbitrum";
|
|
5
|
-
readonly Base: "base";
|
|
6
|
-
readonly Ethereum: "ethereum";
|
|
7
|
-
readonly Tempo: "tempo";
|
|
8
|
-
};
|
|
9
|
-
export type V2CreditMorphoMarketsChain = ClosedEnum<typeof V2CreditMorphoMarketsChain>;
|
|
10
|
-
export type V2CreditMorphoMarketsRequest = {
|
|
11
|
-
chain: V2CreditMorphoMarketsChain;
|
|
12
|
-
};
|
|
13
|
-
/** @internal */
|
|
14
|
-
export declare const V2CreditMorphoMarketsChain$outboundSchema: z.ZodNativeEnum<typeof V2CreditMorphoMarketsChain>;
|
|
15
|
-
/** @internal */
|
|
16
|
-
export type V2CreditMorphoMarketsRequest$Outbound = {
|
|
17
|
-
chain: string;
|
|
18
|
-
};
|
|
19
|
-
/** @internal */
|
|
20
|
-
export declare const V2CreditMorphoMarketsRequest$outboundSchema: z.ZodType<V2CreditMorphoMarketsRequest$Outbound, z.ZodTypeDef, V2CreditMorphoMarketsRequest>;
|
|
21
|
-
export declare function v2CreditMorphoMarketsRequestToJSON(v2CreditMorphoMarketsRequest: V2CreditMorphoMarketsRequest): string;
|
|
22
|
-
//# sourceMappingURL=v2creditmorphomarkets.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"v2creditmorphomarkets.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/v2creditmorphomarkets.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,eAAO,MAAM,0BAA0B;;;;;CAK7B,CAAC;AACX,MAAM,MAAM,0BAA0B,GAAG,UAAU,CACjD,OAAO,0BAA0B,CAClC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,KAAK,EAAE,0BAA0B,CAAC;CACnC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,aAAa,CACrE,OAAO,0BAA0B,CACS,CAAC;AAE7C,gBAAgB;AAChB,MAAM,MAAM,qCAAqC,GAAG;IAClD,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,2CAA2C,EAAE,CAAC,CAAC,OAAO,CACjE,qCAAqC,EACrC,CAAC,CAAC,UAAU,EACZ,4BAA4B,CAG5B,CAAC;AAEH,wBAAgB,kCAAkC,CAChD,4BAA4B,EAAE,4BAA4B,GACzD,MAAM,CAMR"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod/v3";
|
|
5
|
-
export const V2CreditMorphoMarketsChain = {
|
|
6
|
-
Arbitrum: "arbitrum",
|
|
7
|
-
Base: "base",
|
|
8
|
-
Ethereum: "ethereum",
|
|
9
|
-
Tempo: "tempo",
|
|
10
|
-
};
|
|
11
|
-
/** @internal */
|
|
12
|
-
export const V2CreditMorphoMarketsChain$outboundSchema = z.nativeEnum(V2CreditMorphoMarketsChain);
|
|
13
|
-
/** @internal */
|
|
14
|
-
export const V2CreditMorphoMarketsRequest$outboundSchema = z.object({
|
|
15
|
-
chain: V2CreditMorphoMarketsChain$outboundSchema,
|
|
16
|
-
});
|
|
17
|
-
export function v2CreditMorphoMarketsRequestToJSON(v2CreditMorphoMarketsRequest) {
|
|
18
|
-
return JSON.stringify(V2CreditMorphoMarketsRequest$outboundSchema.parse(v2CreditMorphoMarketsRequest));
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=v2creditmorphomarkets.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"v2creditmorphomarkets.js","sourceRoot":"","sources":["../../../../src/models/operations/v2creditmorphomarkets.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;CACN,CAAC;AASX,gBAAgB;AAChB,MAAM,CAAC,MAAM,yCAAyC,GAElD,CAAC,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC;AAO7C,gBAAgB;AAChB,MAAM,CAAC,MAAM,2CAA2C,GAIpD,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,yCAAyC;CACjD,CAAC,CAAC;AAEH,MAAM,UAAU,kCAAkC,CAChD,4BAA0D;IAE1D,OAAO,IAAI,CAAC,SAAS,CACnB,2CAA2C,CAAC,KAAK,CAC/C,4BAA4B,CAC7B,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# CreditLoopPreview
|
|
2
|
-
|
|
3
|
-
Projected end state of the loop, computed on GUARANTEED swap floors.
|
|
4
|
-
|
|
5
|
-
## Example Usage
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { CreditLoopPreview } from "@compass-labs/api-sdk/models/components";
|
|
9
|
-
|
|
10
|
-
let value: CreditLoopPreview = {
|
|
11
|
-
iterations: 64825,
|
|
12
|
-
totalCollateralSupplied: "<value>",
|
|
13
|
-
totalBorrowed: "<value>",
|
|
14
|
-
achievedMultiplier: "<value>",
|
|
15
|
-
projectedLtv: "<value>",
|
|
16
|
-
projectedHealthFactor: "<value>",
|
|
17
|
-
estimatedMaxDust: "<value>",
|
|
18
|
-
legs: [],
|
|
19
|
-
};
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Fields
|
|
23
|
-
|
|
24
|
-
| Field | Type | Required | Description | Example |
|
|
25
|
-
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
26
|
-
| `iterations` | *number* | :heavy_check_mark: | Number of loop iterations bundled. | |
|
|
27
|
-
| `totalCollateralSupplied` | *string* | :heavy_check_mark: | Guaranteed minimum total collateral supplied (token units); actual can only be higher (swap fills above the floor become dust). | |
|
|
28
|
-
| `totalBorrowed` | *string* | :heavy_check_mark: | Total loan tokens borrowed across iterations. | |
|
|
29
|
-
| `achievedMultiplier` | *string* | :heavy_check_mark: | Guaranteed leverage floor: total_collateral_supplied / initial_collateral_amount. | |
|
|
30
|
-
| `projectedLtv` | *string* | :heavy_check_mark: | Projected end loan-to-value in percent, at the sizing oracle prices. | |
|
|
31
|
-
| `projectedHealthFactor` | *string* | :heavy_check_mark: | Projected health factor (liquidation threshold / projected LTV). Below 1 would be liquidatable — the request is rejected long before that. | |
|
|
32
|
-
| `estimatedMaxDust` | *string* | :heavy_check_mark: | Upper bound of collateral-token surplus the swaps can leave in the Credit Account (sum of quote − guaranteed floor per swap). It is bounded by max_slippage_percent per iteration, stays in the account, and is never lost. | |
|
|
33
|
-
| `legs` | [components.LoopLegPreview](../../models/components/looplegpreview.md)[] | :heavy_minus_sign: | Per-iteration breakdown. | [] |
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# CreditLoopRequest
|
|
2
|
-
|
|
3
|
-
Open a leveraged loop: repeatedly supply collateral, borrow, and swap the
|
|
4
|
-
borrow back to collateral — all in ONE atomic transaction from the Credit
|
|
5
|
-
Account.
|
|
6
|
-
|
|
7
|
-
## Example Usage
|
|
8
|
-
|
|
9
|
-
```typescript
|
|
10
|
-
import { CreditLoopRequest } from "@compass-labs/api-sdk/models/components";
|
|
11
|
-
|
|
12
|
-
let value: CreditLoopRequest = {
|
|
13
|
-
owner: "0x5e5b00ed886A6879C2B934612D2312975427fcAf",
|
|
14
|
-
chain: "ethereum",
|
|
15
|
-
protocol: "AAVE",
|
|
16
|
-
collateralToken: "WETH",
|
|
17
|
-
borrowToken: "USDC",
|
|
18
|
-
initialCollateralAmount: 1,
|
|
19
|
-
multiplier: 2,
|
|
20
|
-
loanToValue: 70,
|
|
21
|
-
maxSlippagePercent: 0.5,
|
|
22
|
-
gasSponsorship: false,
|
|
23
|
-
};
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Fields
|
|
27
|
-
|
|
28
|
-
| Field | Type | Required | Description | Example |
|
|
29
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
30
|
-
| `owner` | *string* | :heavy_check_mark: | The address that owns the Credit Account. | 0x5e5b00ed886A6879C2B934612D2312975427fcAf |
|
|
31
|
-
| `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
|
|
32
|
-
| `protocol` | [components.CreditProtocol](../../models/components/creditprotocol.md) | :heavy_minus_sign: | Which lending protocol a credit action targets.<br/><br/>``AAVE`` is the default so existing callers (which never send a ``protocol``<br/>field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the<br/>Euler V2 path, where the market is identified by EVK vault address(es).<br/>``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is<br/>currently read-only: positions and market discovery only — transaction<br/>builders land with the looping work (COM-7106/7107/7108), so transact<br/>endpoints reject it with a 422. | |
|
|
33
|
-
| `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
|
|
34
|
-
| `collateralToken` | *string* | :heavy_check_mark: | Token supplied as collateral each iteration. Must already be in the Credit Account for the initial amount. For MORPHO it must be the market's collateral token. | WETH |
|
|
35
|
-
| `borrowToken` | *string* | :heavy_check_mark: | Token borrowed each iteration and swapped back to the collateral token. For MORPHO it must be the market's loan token. | USDC |
|
|
36
|
-
| `initialCollateralAmount` | *components.CreditLoopRequestInitialCollateralAmount* | :heavy_check_mark: | Collateral (in token units) already held in the Credit Account to seed the loop. | 1 |
|
|
37
|
-
| `multiplier` | *components.CreditLoopRequestMultiplier* | :heavy_check_mark: | Target leverage: total collateral exposure = multiplier × initial_collateral_amount. Must be achievable at the requested loan_to_value (max ≈ 0.9 / (1 − LTV)). | 2 |
|
|
38
|
-
| `loanToValue` | *components.CreditLoopRequestLoanToValue* | :heavy_check_mark: | Per-iteration borrow LTV in percent. Must not exceed the protocol's maximum for the market (Aave reserve/e-mode LTV; Morpho LLTV with a safety margin); borrows are sized slightly inside the requested value so no leg sits on the protocol's revert boundary. | 70 |
|
|
39
|
-
| `maxSlippagePercent` | *components.CreditLoopRequestMaxSlippagePercent* | :heavy_minus_sign: | Per-swap slippage tolerance in percent. Loop dust is bounded by this per iteration, so tighter slippage means less dust. | 0.5 |
|
|
40
|
-
| `emodeCategory` | *number* | :heavy_minus_sign: | Aave only: e-mode category to enable before looping (higher LTV for correlated pairs, e.g. ETH-correlated). | |
|
|
41
|
-
| `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 typed data for gas-sponsored execution instead of an unsigned transaction. | false |
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# CreditLoopRequestInitialCollateralAmount
|
|
2
|
-
|
|
3
|
-
Collateral (in token units) already held in the Credit Account to seed the loop.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Supported Types
|
|
7
|
-
|
|
8
|
-
### `number`
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
const value: number = 1;
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### `string`
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
const value: string = "<value>";
|
|
18
|
-
```
|
|
19
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# CreditLoopRequestLoanToValue
|
|
2
|
-
|
|
3
|
-
Per-iteration borrow LTV in percent. Must not exceed the protocol's maximum for the market (Aave reserve/e-mode LTV; Morpho LLTV with a safety margin); borrows are sized slightly inside the requested value so no leg sits on the protocol's revert boundary.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Supported Types
|
|
7
|
-
|
|
8
|
-
### `number`
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
const value: number = 70;
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### `string`
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
const value: string = "<value>";
|
|
18
|
-
```
|
|
19
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# CreditLoopRequestMaxSlippagePercent
|
|
2
|
-
|
|
3
|
-
Per-swap slippage tolerance in percent. Loop dust is bounded by this per iteration, so tighter slippage means less dust.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Supported Types
|
|
7
|
-
|
|
8
|
-
### `number`
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
const value: number = 1284.03;
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### `string`
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
const value: string = "0.5";
|
|
18
|
-
```
|
|
19
|
-
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# CreditLoopRequestMultiplier
|
|
2
|
-
|
|
3
|
-
Target leverage: total collateral exposure = multiplier × initial_collateral_amount. Must be achievable at the requested loan_to_value (max ≈ 0.9 / (1 − LTV)).
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Supported Types
|
|
7
|
-
|
|
8
|
-
### `number`
|
|
9
|
-
|
|
10
|
-
```typescript
|
|
11
|
-
const value: number = 2;
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
### `string`
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
const value: string = "<value>";
|
|
18
|
-
```
|
|
19
|
-
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# CreditLoopResponse
|
|
2
|
-
|
|
3
|
-
The atomic loop transaction plus its guaranteed-floor preview.
|
|
4
|
-
|
|
5
|
-
## Example Usage
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { CreditLoopResponse } from "@compass-labs/api-sdk/models/components";
|
|
9
|
-
|
|
10
|
-
let value: CreditLoopResponse = {
|
|
11
|
-
preview: {
|
|
12
|
-
iterations: 869428,
|
|
13
|
-
totalCollateralSupplied: "<value>",
|
|
14
|
-
totalBorrowed: "<value>",
|
|
15
|
-
achievedMultiplier: "<value>",
|
|
16
|
-
projectedLtv: "<value>",
|
|
17
|
-
projectedHealthFactor: "<value>",
|
|
18
|
-
estimatedMaxDust: "<value>",
|
|
19
|
-
legs: [],
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Fields
|
|
25
|
-
|
|
26
|
-
| Field | Type | Required | Description |
|
|
27
|
-
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
28
|
-
| `transaction` | [components.UnsignedTransaction](../../models/components/unsignedtransaction.md) | :heavy_minus_sign: | Unsigned transaction for direct execution by the owner. Present when gas_sponsorship=false. |
|
|
29
|
-
| `eip712` | [components.BatchedSafeOperationsResponseOutput](../../models/components/batchedsafeoperationsresponseoutput.md) | :heavy_minus_sign: | EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true. |
|
|
30
|
-
| `preview` | [components.CreditLoopPreview](../../models/components/creditlooppreview.md) | :heavy_check_mark: | Projected end state of the loop, computed on GUARANTEED swap floors. |
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# LoopLegPreview
|
|
2
|
-
|
|
3
|
-
One planned loop iteration.
|
|
4
|
-
|
|
5
|
-
## Example Usage
|
|
6
|
-
|
|
7
|
-
```typescript
|
|
8
|
-
import { LoopLegPreview } from "@compass-labs/api-sdk/models/components";
|
|
9
|
-
|
|
10
|
-
let value: LoopLegPreview = {
|
|
11
|
-
supplyAmount: null,
|
|
12
|
-
};
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Fields
|
|
16
|
-
|
|
17
|
-
| Field | Type | Required | Description |
|
|
18
|
-
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
|
19
|
-
| `supplyAmount` | *string* | :heavy_check_mark: | Collateral supplied this iteration (token units). |
|
|
20
|
-
| `borrowAmount` | *string* | :heavy_minus_sign: | Loan borrowed this iteration; null on the final supply-only iteration. |
|
|
21
|
-
| `minSwapOut` | *string* | :heavy_minus_sign: | Guaranteed swap output (collateral units) — the next iteration's supply. Enforced on-chain by the swap's minimum-return. |
|