@compass-labs/api-sdk 2.2.112-rc.1 → 2.2.113
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/codeSamples_typescript.yaml +1 -1
- package/dist/commonjs/funcs/earnEarnSwapQuote.d.ts +5 -2
- package/dist/commonjs/funcs/earnEarnSwapQuote.d.ts.map +1 -1
- package/dist/commonjs/funcs/earnEarnSwapQuote.js +5 -2
- package/dist/commonjs/funcs/earnEarnSwapQuote.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/components/earnswapquoteresponse.d.ts +19 -1
- package/dist/commonjs/models/components/earnswapquoteresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/earnswapquoteresponse.js +12 -1
- package/dist/commonjs/models/components/earnswapquoteresponse.js.map +1 -1
- package/dist/commonjs/models/components/earnswaprequest.d.ts +20 -1
- package/dist/commonjs/models/components/earnswaprequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/earnswaprequest.js +12 -1
- package/dist/commonjs/models/components/earnswaprequest.js.map +1 -1
- package/dist/commonjs/models/components/earnswapresponse.d.ts +23 -1
- package/dist/commonjs/models/components/earnswapresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/earnswapresponse.js +14 -1
- package/dist/commonjs/models/components/earnswapresponse.js.map +1 -1
- package/dist/commonjs/models/components/v2bundleresponse.d.ts +16 -0
- package/dist/commonjs/models/components/v2bundleresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/v2bundleresponse.js +12 -1
- package/dist/commonjs/models/components/v2bundleresponse.js.map +1 -1
- package/dist/commonjs/sdk/earn.d.ts +5 -2
- package/dist/commonjs/sdk/earn.d.ts.map +1 -1
- package/dist/commonjs/sdk/earn.js +5 -2
- package/dist/commonjs/sdk/earn.js.map +1 -1
- package/dist/esm/funcs/earnEarnSwapQuote.d.ts +5 -2
- package/dist/esm/funcs/earnEarnSwapQuote.d.ts.map +1 -1
- package/dist/esm/funcs/earnEarnSwapQuote.js +5 -2
- package/dist/esm/funcs/earnEarnSwapQuote.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/components/earnswapquoteresponse.d.ts +19 -1
- package/dist/esm/models/components/earnswapquoteresponse.d.ts.map +1 -1
- package/dist/esm/models/components/earnswapquoteresponse.js +11 -0
- package/dist/esm/models/components/earnswapquoteresponse.js.map +1 -1
- package/dist/esm/models/components/earnswaprequest.d.ts +20 -1
- package/dist/esm/models/components/earnswaprequest.d.ts.map +1 -1
- package/dist/esm/models/components/earnswaprequest.js +11 -0
- package/dist/esm/models/components/earnswaprequest.js.map +1 -1
- package/dist/esm/models/components/earnswapresponse.d.ts +23 -1
- package/dist/esm/models/components/earnswapresponse.d.ts.map +1 -1
- package/dist/esm/models/components/earnswapresponse.js +13 -0
- package/dist/esm/models/components/earnswapresponse.js.map +1 -1
- package/dist/esm/models/components/v2bundleresponse.d.ts +16 -0
- package/dist/esm/models/components/v2bundleresponse.d.ts.map +1 -1
- package/dist/esm/models/components/v2bundleresponse.js +11 -0
- package/dist/esm/models/components/v2bundleresponse.js.map +1 -1
- package/dist/esm/sdk/earn.d.ts +5 -2
- package/dist/esm/sdk/earn.d.ts.map +1 -1
- package/dist/esm/sdk/earn.js +5 -2
- package/dist/esm/sdk/earn.js.map +1 -1
- package/docs/models/components/earnswapquoteresponse.md +7 -5
- package/docs/models/components/earnswapquoteresponseswapprovider.md +17 -0
- package/docs/models/components/earnswaprequest.md +12 -10
- package/docs/models/components/earnswaprequestpricing.md +17 -0
- package/docs/models/components/earnswapresponse.md +8 -5
- package/docs/models/components/earnswapresponseswapprovider.md +17 -0
- package/docs/models/components/v2bundleresponse.md +7 -5
- package/docs/models/components/v2bundleresponseswapprovider.md +15 -0
- package/docs/sdks/earn/README.md +7 -2
- package/openapi_prepped_for_speakeasy.json +79 -5
- package/package.json +1 -1
- package/src/funcs/earnEarnSwapQuote.ts +5 -2
- package/src/lib/config.ts +2 -2
- package/src/models/components/earnswapquoteresponse.ts +27 -1
- package/src/models/components/earnswaprequest.ts +25 -1
- package/src/models/components/earnswapresponse.ts +35 -1
- package/src/models/components/v2bundleresponse.ts +29 -0
- package/src/sdk/earn.ts +5 -2
|
@@ -632,7 +632,7 @@ actions:
|
|
|
632
632
|
"x-codeSamples":
|
|
633
633
|
- "lang": "typescript"
|
|
634
634
|
"label": "Typescript (SDK)"
|
|
635
|
-
"source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.earn.earnSwap({\n tokenIn: \"USDC\",\n tokenOut: \"USDT\",\n amountIn: \"0.01\",\n slippage: \"0.5\",\n owner: \"0x06A9aF046187895AcFc7258450B15397CAc67400\",\n chain: \"base\",\n gasSponsorship: false,\n });\n\n console.log(result);\n}\n\nrun();"
|
|
635
|
+
"source": "import { CompassApiSDK } from \"@compass-labs/api-sdk\";\n\nconst compassApiSDK = new CompassApiSDK({\n apiKeyAuth: \"<YOUR_API_KEY_HERE>\",\n});\n\nasync function run() {\n const result = await compassApiSDK.earn.earnSwap({\n tokenIn: \"USDC\",\n tokenOut: \"USDT\",\n amountIn: \"0.01\",\n slippage: \"0.5\",\n owner: \"0x06A9aF046187895AcFc7258450B15397CAc67400\",\n chain: \"base\",\n gasSponsorship: false,\n pricing: \"auto\",\n });\n\n console.log(result);\n}\n\nrun();"
|
|
636
636
|
- target: $["paths"]["/v2/earn/swap_quote"]["get"]
|
|
637
637
|
update:
|
|
638
638
|
"x-codeSamples":
|
|
@@ -16,8 +16,11 @@ import { Result } from "../types/fp.js";
|
|
|
16
16
|
* Estimate the output of a swap without building a transaction.
|
|
17
17
|
*
|
|
18
18
|
* Returns the expected amount of `token_out` received for selling `amount_in`
|
|
19
|
-
* of `token_in
|
|
20
|
-
*
|
|
19
|
+
* of `token_in`. On chains with a market route this is the market rate; on
|
|
20
|
+
* HyperEVM, where swaps are firm-priced, it is an indicative price from the
|
|
21
|
+
* firm provider's live levels (`swap_provider` tells you which). This is
|
|
22
|
+
* read-only: it does not build a transaction, require an account, or check
|
|
23
|
+
* balances.
|
|
21
24
|
*
|
|
22
25
|
* Use it to gauge exit liquidity and price impact for a token before entering
|
|
23
26
|
* a position — for example, to warn when a market's underlying asset cannot be
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earnEarnSwapQuote.d.ts","sourceRoot":"","sources":["../../../src/funcs/earnEarnSwapQuote.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC
|
|
1
|
+
{"version":3,"file":"earnEarnSwapQuote.d.ts","sourceRoot":"","sources":["../../../src/funcs/earnEarnSwapQuote.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,qBAAqB,EAC9B,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -55,8 +55,11 @@ const async_js_1 = require("../types/async.js");
|
|
|
55
55
|
* Estimate the output of a swap without building a transaction.
|
|
56
56
|
*
|
|
57
57
|
* Returns the expected amount of `token_out` received for selling `amount_in`
|
|
58
|
-
* of `token_in
|
|
59
|
-
*
|
|
58
|
+
* of `token_in`. On chains with a market route this is the market rate; on
|
|
59
|
+
* HyperEVM, where swaps are firm-priced, it is an indicative price from the
|
|
60
|
+
* firm provider's live levels (`swap_provider` tells you which). This is
|
|
61
|
+
* read-only: it does not build a transaction, require an account, or check
|
|
62
|
+
* balances.
|
|
60
63
|
*
|
|
61
64
|
* Use it to gauge exit liquidity and price impact for a token before entering
|
|
62
65
|
* a position — for example, to warn when a market's underlying asset cannot be
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earnEarnSwapQuote.js","sourceRoot":"","sources":["../../../src/funcs/earnEarnSwapQuote.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"earnEarnSwapQuote.js","sourceRoot":"","sources":["../../../src/funcs/earnEarnSwapQuote.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CH,8CAuBC;AAhED,sDAAsD;AACtD,4CAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAS5D,kEAAoD;AAGpD,0EAA4D;AAC5D,gDAAwD;AAGxD;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,iBAAiB,CAC/B,MAAyB,EACzB,OAA0C,EAC1C,OAAwB;IAexB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC;AAED,KAAK,UAAU,GAAG,CAChB,MAAyB,EACzB,OAA0C,EAC1C,OAAwB;IAkBxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,qCAAqC,CAAC,KAAK,CAAC,KAAK,CAAC,EACxE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAI,CA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/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAY5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,mCAAmC,CAAC,EAC3D,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,iCAAiC,CAAC,EACxD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -32,7 +32,7 @@ export declare const SDK_METADATA: {
|
|
|
32
32
|
readonly language: "typescript";
|
|
33
33
|
readonly openapiDocVersion: "0.0.1";
|
|
34
34
|
readonly sdkVersion: "2.0.0";
|
|
35
|
-
readonly genVersion: "2.
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 2.0.0 2.
|
|
35
|
+
readonly genVersion: "2.941.0";
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 2.0.0 2.941.0 0.0.1 @compass-labs/api-sdk";
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -32,7 +32,7 @@ exports.SDK_METADATA = {
|
|
|
32
32
|
language: "typescript",
|
|
33
33
|
openapiDocVersion: "0.0.1",
|
|
34
34
|
sdkVersion: "2.0.0",
|
|
35
|
-
genVersion: "2.
|
|
36
|
-
userAgent: "speakeasy-sdk/typescript 2.0.0 2.
|
|
35
|
+
genVersion: "2.941.0",
|
|
36
|
+
userAgent: "speakeasy-sdk/typescript 2.0.0 2.941.0 0.0.1 @compass-labs/api-sdk",
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
+
/**
|
|
6
|
+
* Which route priced the estimate. 'market': the market aggregator's price-only quote. 'firm': an INDICATIVE price from the firm provider's live levels (HyperEVM), computed without spending a quote; the executable build fetches the firm quote itself. When those levels cannot price `amount_in` the endpoint answers 409 rather than a zero `amount_out`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const EarnSwapQuoteResponseSwapProvider: {
|
|
9
|
+
readonly Market: "market";
|
|
10
|
+
readonly Firm: "firm";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Which route priced the estimate. 'market': the market aggregator's price-only quote. 'firm': an INDICATIVE price from the firm provider's live levels (HyperEVM), computed without spending a quote; the executable build fetches the firm quote itself. When those levels cannot price `amount_in` the endpoint answers 409 rather than a zero `amount_out`.
|
|
14
|
+
*/
|
|
15
|
+
export type EarnSwapQuoteResponseSwapProvider = ClosedEnum<typeof EarnSwapQuoteResponseSwapProvider>;
|
|
4
16
|
/**
|
|
5
17
|
* Estimated output of a read-only swap quote.
|
|
6
18
|
*/
|
|
7
19
|
export type EarnSwapQuoteResponse = {
|
|
8
20
|
/**
|
|
9
|
-
* Estimated amount of `token_out` received, in human-readable units.
|
|
21
|
+
* Estimated amount of `token_out` received, in human-readable units. On the market route, zero when no route / insufficient liquidity exists for the pair (a definitive answer). On the firm route (HyperEVM) a missing or short price book is a 409 instead, never a zero: unlike a missing route it is transient, so retry.
|
|
10
22
|
*/
|
|
11
23
|
amountOut: string;
|
|
12
24
|
/**
|
|
@@ -17,8 +29,14 @@ export type EarnSwapQuoteResponse = {
|
|
|
17
29
|
* The token address quoted as output — what `amount_out` is denominated in (the resolved `token_out` from the request).
|
|
18
30
|
*/
|
|
19
31
|
tokenOut: string;
|
|
32
|
+
/**
|
|
33
|
+
* Which route priced the estimate. 'market': the market aggregator's price-only quote. 'firm': an INDICATIVE price from the firm provider's live levels (HyperEVM), computed without spending a quote; the executable build fetches the firm quote itself. When those levels cannot price `amount_in` the endpoint answers 409 rather than a zero `amount_out`.
|
|
34
|
+
*/
|
|
35
|
+
swapProvider?: EarnSwapQuoteResponseSwapProvider | undefined;
|
|
20
36
|
};
|
|
21
37
|
/** @internal */
|
|
38
|
+
export declare const EarnSwapQuoteResponseSwapProvider$inboundSchema: z.ZodNativeEnum<typeof EarnSwapQuoteResponseSwapProvider>;
|
|
39
|
+
/** @internal */
|
|
22
40
|
export declare const EarnSwapQuoteResponse$inboundSchema: z.ZodType<EarnSwapQuoteResponse, z.ZodTypeDef, unknown>;
|
|
23
41
|
export declare function earnSwapQuoteResponseFromJSON(jsonString: string): SafeParseResult<EarnSwapQuoteResponse, SDKValidationError>;
|
|
24
42
|
//# sourceMappingURL=earnswapquoteresponse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earnswapquoteresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/earnswapquoteresponse.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,qBAAqB,GAAG;IAClC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"earnswapquoteresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/earnswapquoteresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,iCAAiC;;;CAGpC,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,iCAAiC,GAAG,UAAU,CACxD,OAAO,iCAAiC,CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,YAAY,CAAC,EAAE,iCAAiC,GAAG,SAAS,CAAC;CAC9D,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,+CAA+C,EAAE,CAAC,CAAC,aAAa,CAC3E,OAAO,iCAAiC,CACS,CAAC;AAEpD,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,OAAO,CAaP,CAAC;AAEH,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAM5D"}
|
|
@@ -36,21 +36,32 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.EarnSwapQuoteResponse$inboundSchema = void 0;
|
|
39
|
+
exports.EarnSwapQuoteResponse$inboundSchema = exports.EarnSwapQuoteResponseSwapProvider$inboundSchema = exports.EarnSwapQuoteResponseSwapProvider = void 0;
|
|
40
40
|
exports.earnSwapQuoteResponseFromJSON = earnSwapQuoteResponseFromJSON;
|
|
41
41
|
const z = __importStar(require("zod/v3"));
|
|
42
42
|
const primitives_js_1 = require("../../lib/primitives.js");
|
|
43
43
|
const schemas_js_1 = require("../../lib/schemas.js");
|
|
44
|
+
/**
|
|
45
|
+
* Which route priced the estimate. 'market': the market aggregator's price-only quote. 'firm': an INDICATIVE price from the firm provider's live levels (HyperEVM), computed without spending a quote; the executable build fetches the firm quote itself. When those levels cannot price `amount_in` the endpoint answers 409 rather than a zero `amount_out`.
|
|
46
|
+
*/
|
|
47
|
+
exports.EarnSwapQuoteResponseSwapProvider = {
|
|
48
|
+
Market: "market",
|
|
49
|
+
Firm: "firm",
|
|
50
|
+
};
|
|
51
|
+
/** @internal */
|
|
52
|
+
exports.EarnSwapQuoteResponseSwapProvider$inboundSchema = z.nativeEnum(exports.EarnSwapQuoteResponseSwapProvider);
|
|
44
53
|
/** @internal */
|
|
45
54
|
exports.EarnSwapQuoteResponse$inboundSchema = z.object({
|
|
46
55
|
amount_out: z.string(),
|
|
47
56
|
token_in: z.string(),
|
|
48
57
|
token_out: z.string(),
|
|
58
|
+
swap_provider: exports.EarnSwapQuoteResponseSwapProvider$inboundSchema.optional(),
|
|
49
59
|
}).transform((v) => {
|
|
50
60
|
return (0, primitives_js_1.remap)(v, {
|
|
51
61
|
"amount_out": "amountOut",
|
|
52
62
|
"token_in": "tokenIn",
|
|
53
63
|
"token_out": "tokenOut",
|
|
64
|
+
"swap_provider": "swapProvider",
|
|
54
65
|
});
|
|
55
66
|
});
|
|
56
67
|
function earnSwapQuoteResponseFromJSON(jsonString) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earnswapquoteresponse.js","sourceRoot":"","sources":["../../../../src/models/components/earnswapquoteresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"earnswapquoteresponse.js","sourceRoot":"","sources":["../../../../src/models/components/earnswapquoteresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEH,sEAQC;AA3ED,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAKjD;;GAEG;AACU,QAAA,iCAAiC,GAAG;IAC/C,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;CACJ,CAAC;AA8BX,gBAAgB;AACH,QAAA,+CAA+C,GAExD,CAAC,CAAC,UAAU,CAAC,yCAAiC,CAAC,CAAC;AAEpD,gBAAgB;AACH,QAAA,mCAAmC,GAI5C,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,aAAa,EAAE,uDAA+C,CAAC,QAAQ,EAAE;CAC1E,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,YAAY,EAAE,WAAW;QACzB,UAAU,EAAE,SAAS;QACrB,WAAW,EAAE,UAAU;QACvB,eAAe,EAAE,cAAc;KAChC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,6BAA6B,CAC3C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,2CAAmC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC/D,mDAAmD,CACpD,CAAC;AACJ,CAAC"}
|
|
@@ -23,6 +23,18 @@ export declare const EarnSwapRequestChain: {
|
|
|
23
23
|
* Target blockchain network where the swap will execute.
|
|
24
24
|
*/
|
|
25
25
|
export type EarnSwapRequestChain = ClosedEnum<typeof EarnSwapRequestChain>;
|
|
26
|
+
/**
|
|
27
|
+
* Swap routing policy. 'auto': on chains with a market route the swap is priced by the market aggregator and bounded by `slippage` (the default behaviour); on HyperEVM, where only firm pricing is available, it is a firm zero-slippage quote that fills exactly or reverts. 'firm': always a firm quote; refused with a typed 409 when no firm quote covers the pair right now, never silently priced at market. 'market': always the market route; refused with 422 on HyperEVM. Read `swap_provider` on the response for the route that actually priced the build, and `quote_expires_at` for a firm quote's deadline.
|
|
28
|
+
*/
|
|
29
|
+
export declare const EarnSwapRequestPricing: {
|
|
30
|
+
readonly Auto: "auto";
|
|
31
|
+
readonly Firm: "firm";
|
|
32
|
+
readonly Market: "market";
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Swap routing policy. 'auto': on chains with a market route the swap is priced by the market aggregator and bounded by `slippage` (the default behaviour); on HyperEVM, where only firm pricing is available, it is a firm zero-slippage quote that fills exactly or reverts. 'firm': always a firm quote; refused with a typed 409 when no firm quote covers the pair right now, never silently priced at market. 'market': always the market route; refused with 422 on HyperEVM. Read `swap_provider` on the response for the route that actually priced the build, and `quote_expires_at` for a firm quote's deadline.
|
|
36
|
+
*/
|
|
37
|
+
export type EarnSwapRequestPricing = ClosedEnum<typeof EarnSwapRequestPricing>;
|
|
26
38
|
/**
|
|
27
39
|
* Swap one token held in the Earn Account for another, in a single atomic
|
|
28
40
|
*
|
|
@@ -59,9 +71,13 @@ export type EarnSwapRequest = {
|
|
|
59
71
|
*/
|
|
60
72
|
chain: EarnSwapRequestChain;
|
|
61
73
|
/**
|
|
62
|
-
* Optionally request gas sponsorship. If `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`).
|
|
74
|
+
* Optionally request gas sponsorship. If `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`). Firm-priced builds may be sponsored: the sponsor must broadcast before `quote_expires_at`.
|
|
63
75
|
*/
|
|
64
76
|
gasSponsorship?: boolean | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Swap routing policy. 'auto': on chains with a market route the swap is priced by the market aggregator and bounded by `slippage` (the default behaviour); on HyperEVM, where only firm pricing is available, it is a firm zero-slippage quote that fills exactly or reverts. 'firm': always a firm quote; refused with a typed 409 when no firm quote covers the pair right now, never silently priced at market. 'market': always the market route; refused with 422 on HyperEVM. Read `swap_provider` on the response for the route that actually priced the build, and `quote_expires_at` for a firm quote's deadline.
|
|
79
|
+
*/
|
|
80
|
+
pricing?: EarnSwapRequestPricing | undefined;
|
|
65
81
|
};
|
|
66
82
|
/** @internal */
|
|
67
83
|
export type EarnSwapRequestAmountIn$Outbound = number | string;
|
|
@@ -76,6 +92,8 @@ export declare function earnSwapRequestSlippageToJSON(earnSwapRequestSlippage: E
|
|
|
76
92
|
/** @internal */
|
|
77
93
|
export declare const EarnSwapRequestChain$outboundSchema: z.ZodNativeEnum<typeof EarnSwapRequestChain>;
|
|
78
94
|
/** @internal */
|
|
95
|
+
export declare const EarnSwapRequestPricing$outboundSchema: z.ZodNativeEnum<typeof EarnSwapRequestPricing>;
|
|
96
|
+
/** @internal */
|
|
79
97
|
export type EarnSwapRequest$Outbound = {
|
|
80
98
|
action_type?: "V2_SWAP" | undefined;
|
|
81
99
|
token_in: string;
|
|
@@ -85,6 +103,7 @@ export type EarnSwapRequest$Outbound = {
|
|
|
85
103
|
owner: string;
|
|
86
104
|
chain: string;
|
|
87
105
|
gas_sponsorship?: boolean | undefined;
|
|
106
|
+
pricing?: string | undefined;
|
|
88
107
|
};
|
|
89
108
|
/** @internal */
|
|
90
109
|
export declare const EarnSwapRequest$outboundSchema: z.ZodType<EarnSwapRequest$Outbound, z.ZodTypeDef, EarnSwapRequest>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earnswaprequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/earnswaprequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;CAOvB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACnC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACvC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,oBAAoB,CAAC;IAC5B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"earnswaprequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/earnswaprequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtD;;GAEG;AACH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gC,EAChC,CAAC,CAAC,UAAU,EACZ,uBAAuB,CACY,CAAC;AAEtC,wBAAgB,6BAA6B,CAC3C,uBAAuB,EAAE,uBAAuB,GAC/C,MAAM,CAIR;AAED,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,aAAa,CAC/D,OAAO,oBAAoB,CACS,CAAC;AAEvC,gBAAgB;AAChB,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,aAAa,CACjE,OAAO,sBAAsB,CACS,CAAC;AAEzC,gBAAgB;AAChB,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OAAO,CACpD,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,eAAe,CAmBf,CAAC;AAEH,wBAAgB,qBAAqB,CACnC,eAAe,EAAE,eAAe,GAC/B,MAAM,CAER"}
|
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.EarnSwapRequest$outboundSchema = exports.EarnSwapRequestChain$outboundSchema = exports.EarnSwapRequestSlippage$outboundSchema = exports.EarnSwapRequestAmountIn$outboundSchema = exports.EarnSwapRequestChain = void 0;
|
|
39
|
+
exports.EarnSwapRequest$outboundSchema = exports.EarnSwapRequestPricing$outboundSchema = exports.EarnSwapRequestChain$outboundSchema = exports.EarnSwapRequestSlippage$outboundSchema = exports.EarnSwapRequestAmountIn$outboundSchema = exports.EarnSwapRequestPricing = exports.EarnSwapRequestChain = void 0;
|
|
40
40
|
exports.earnSwapRequestAmountInToJSON = earnSwapRequestAmountInToJSON;
|
|
41
41
|
exports.earnSwapRequestSlippageToJSON = earnSwapRequestSlippageToJSON;
|
|
42
42
|
exports.earnSwapRequestToJSON = earnSwapRequestToJSON;
|
|
@@ -53,6 +53,14 @@ exports.EarnSwapRequestChain = {
|
|
|
53
53
|
Hyperevm: "hyperevm",
|
|
54
54
|
Tempo: "tempo",
|
|
55
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Swap routing policy. 'auto': on chains with a market route the swap is priced by the market aggregator and bounded by `slippage` (the default behaviour); on HyperEVM, where only firm pricing is available, it is a firm zero-slippage quote that fills exactly or reverts. 'firm': always a firm quote; refused with a typed 409 when no firm quote covers the pair right now, never silently priced at market. 'market': always the market route; refused with 422 on HyperEVM. Read `swap_provider` on the response for the route that actually priced the build, and `quote_expires_at` for a firm quote's deadline.
|
|
58
|
+
*/
|
|
59
|
+
exports.EarnSwapRequestPricing = {
|
|
60
|
+
Auto: "auto",
|
|
61
|
+
Firm: "firm",
|
|
62
|
+
Market: "market",
|
|
63
|
+
};
|
|
56
64
|
/** @internal */
|
|
57
65
|
exports.EarnSwapRequestAmountIn$outboundSchema = z.union([z.number(), z.string()]);
|
|
58
66
|
function earnSwapRequestAmountInToJSON(earnSwapRequestAmountIn) {
|
|
@@ -66,6 +74,8 @@ function earnSwapRequestSlippageToJSON(earnSwapRequestSlippage) {
|
|
|
66
74
|
/** @internal */
|
|
67
75
|
exports.EarnSwapRequestChain$outboundSchema = z.nativeEnum(exports.EarnSwapRequestChain);
|
|
68
76
|
/** @internal */
|
|
77
|
+
exports.EarnSwapRequestPricing$outboundSchema = z.nativeEnum(exports.EarnSwapRequestPricing);
|
|
78
|
+
/** @internal */
|
|
69
79
|
exports.EarnSwapRequest$outboundSchema = z.object({
|
|
70
80
|
actionType: z.literal("V2_SWAP").optional(),
|
|
71
81
|
tokenIn: z.string(),
|
|
@@ -75,6 +85,7 @@ exports.EarnSwapRequest$outboundSchema = z.object({
|
|
|
75
85
|
owner: z.string(),
|
|
76
86
|
chain: exports.EarnSwapRequestChain$outboundSchema,
|
|
77
87
|
gasSponsorship: z.boolean().optional(),
|
|
88
|
+
pricing: exports.EarnSwapRequestPricing$outboundSchema.optional(),
|
|
78
89
|
}).transform((v) => {
|
|
79
90
|
return (0, primitives_js_1.remap)(v, {
|
|
80
91
|
actionType: "action_type",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earnswaprequest.js","sourceRoot":"","sources":["../../../../src/models/components/earnswaprequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"earnswaprequest.js","sourceRoot":"","sources":["../../../../src/models/components/earnswaprequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoGH,sEAMC;AAYD,sEAMC;AAkDD,sDAIC;AAhLD,0CAA4B;AAC5B,2DAA0D;AAa1D;;GAEG;AACU,QAAA,oBAAoB,GAAG;IAClC,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;CACN,CAAC;AAMX;;GAEG;AACU,QAAA,sBAAsB,GAAG;IACpC,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;CACR,CAAC;AAsDX,gBAAgB;AACH,QAAA,sCAAsC,GAI/C,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EA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E,CAAC,QAAQ,EAAE;IACtC,OAAO,EAAE,6CAAqC,CAAC,QAAQ,EAAE;CAC1D,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;QACzB,OAAO,EAAE,UAAU;QACnB,QAAQ,EAAE,WAAW;QACrB,QAAQ,EAAE,WAAW;QACrB,cAAc,EAAE,iBAAiB;KAClC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,qBAAqB,CACnC,eAAgC;IAEhC,OAAO,IAAI,CAAC,SAAS,CAAC,sCAA8B,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import * as z from "zod/v3";
|
|
2
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
5
|
import { BatchedSafeOperationsResponseOutput } from "./batchedsafeoperationsresponseoutput.js";
|
|
5
6
|
import { UnsignedTransaction } from "./unsignedtransaction.js";
|
|
7
|
+
/**
|
|
8
|
+
* Which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. Always present; this is the authoritative signal, since `pricing` is only what was requested.
|
|
9
|
+
*/
|
|
10
|
+
export declare const EarnSwapResponseSwapProvider: {
|
|
11
|
+
readonly Market: "market";
|
|
12
|
+
readonly Firm: "firm";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. Always present; this is the authoritative signal, since `pricing` is only what was requested.
|
|
16
|
+
*/
|
|
17
|
+
export type EarnSwapResponseSwapProvider = ClosedEnum<typeof EarnSwapResponseSwapProvider>;
|
|
6
18
|
export type EarnSwapResponse = {
|
|
7
19
|
/**
|
|
8
20
|
* Unsigned transaction for direct execution. Present when gas_sponsorship=false.
|
|
@@ -13,11 +25,21 @@ export type EarnSwapResponse = {
|
|
|
13
25
|
*/
|
|
14
26
|
eip712?: BatchedSafeOperationsResponseOutput | null | undefined;
|
|
15
27
|
/**
|
|
16
|
-
* Estimated amount of output token received from the swap.
|
|
28
|
+
* Estimated amount of output token received from the swap. Exact on firm builds (a firm quote fills at this amount or reverts); a quote-time estimate on market builds, where `slippage` sets how far below it the enforced minimum output sits.
|
|
17
29
|
*/
|
|
18
30
|
estimatedAmountOut: string;
|
|
31
|
+
/**
|
|
32
|
+
* Which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. Always present; this is the authoritative signal, since `pricing` is only what was requested.
|
|
33
|
+
*/
|
|
34
|
+
swapProvider?: EarnSwapResponseSwapProvider | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Deadline of the firm swap quote. The transaction (or the sponsor's broadcast of the signed typed data) must be included before it or the swap reverts on-chain; refresh by re-calling this endpoint and discarding the previous payload. Null on market builds.
|
|
37
|
+
*/
|
|
38
|
+
quoteExpiresAt?: Date | null | undefined;
|
|
19
39
|
};
|
|
20
40
|
/** @internal */
|
|
41
|
+
export declare const EarnSwapResponseSwapProvider$inboundSchema: z.ZodNativeEnum<typeof EarnSwapResponseSwapProvider>;
|
|
42
|
+
/** @internal */
|
|
21
43
|
export declare const EarnSwapResponse$inboundSchema: z.ZodType<EarnSwapResponse, z.ZodTypeDef, unknown>;
|
|
22
44
|
export declare function earnSwapResponseFromJSON(jsonString: string): SafeParseResult<EarnSwapResponse, SDKValidationError>;
|
|
23
45
|
//# sourceMappingURL=earnswapresponse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earnswapresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/earnswapresponse.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;AACrE,OAAO,EACL,mCAAmC,EAEpC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,CAAC;IACrD;;OAEG;IACH,MAAM,CAAC,EAAE,mCAAmC,GAAG,IAAI,GAAG,SAAS,CAAC;IAChE;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"earnswapresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/earnswapresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,mCAAmC,EAEpC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;CAG/B,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,4BAA4B,CACpC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,CAAC;IACrD;;OAEG;IACH,MAAM,CAAC,EAAE,mCAAmC,GAAG,IAAI,GAAG,SAAS,CAAC;IAChE;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,4BAA4B,GAAG,SAAS,CAAC;IACxD;;OAEG;IACH,cAAc,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CAC1C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,aAAa,CACtE,OAAO,4BAA4B,CACS,CAAC;AAE/C,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OAAO,CACpD,gBAAgB,EAChB,CAAC,CAAC,UAAU,EACZ,OAAO,CAiBP,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAMvD"}
|
|
@@ -36,23 +36,36 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.EarnSwapResponse$inboundSchema = void 0;
|
|
39
|
+
exports.EarnSwapResponse$inboundSchema = exports.EarnSwapResponseSwapProvider$inboundSchema = exports.EarnSwapResponseSwapProvider = void 0;
|
|
40
40
|
exports.earnSwapResponseFromJSON = earnSwapResponseFromJSON;
|
|
41
41
|
const z = __importStar(require("zod/v3"));
|
|
42
42
|
const primitives_js_1 = require("../../lib/primitives.js");
|
|
43
43
|
const schemas_js_1 = require("../../lib/schemas.js");
|
|
44
44
|
const batchedsafeoperationsresponseoutput_js_1 = require("./batchedsafeoperationsresponseoutput.js");
|
|
45
45
|
const unsignedtransaction_js_1 = require("./unsignedtransaction.js");
|
|
46
|
+
/**
|
|
47
|
+
* Which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. Always present; this is the authoritative signal, since `pricing` is only what was requested.
|
|
48
|
+
*/
|
|
49
|
+
exports.EarnSwapResponseSwapProvider = {
|
|
50
|
+
Market: "market",
|
|
51
|
+
Firm: "firm",
|
|
52
|
+
};
|
|
53
|
+
/** @internal */
|
|
54
|
+
exports.EarnSwapResponseSwapProvider$inboundSchema = z.nativeEnum(exports.EarnSwapResponseSwapProvider);
|
|
46
55
|
/** @internal */
|
|
47
56
|
exports.EarnSwapResponse$inboundSchema = z.object({
|
|
48
57
|
transaction: z.nullable(unsignedtransaction_js_1.UnsignedTransaction$inboundSchema).optional(),
|
|
49
58
|
eip_712: z.nullable(batchedsafeoperationsresponseoutput_js_1.BatchedSafeOperationsResponseOutput$inboundSchema)
|
|
50
59
|
.optional(),
|
|
51
60
|
estimated_amount_out: z.string(),
|
|
61
|
+
swap_provider: exports.EarnSwapResponseSwapProvider$inboundSchema.optional(),
|
|
62
|
+
quote_expires_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
|
|
52
63
|
}).transform((v) => {
|
|
53
64
|
return (0, primitives_js_1.remap)(v, {
|
|
54
65
|
"eip_712": "eip712",
|
|
55
66
|
"estimated_amount_out": "estimatedAmountOut",
|
|
67
|
+
"swap_provider": "swapProvider",
|
|
68
|
+
"quote_expires_at": "quoteExpiresAt",
|
|
56
69
|
});
|
|
57
70
|
});
|
|
58
71
|
function earnSwapResponseFromJSON(jsonString) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earnswapresponse.js","sourceRoot":"","sources":["../../../../src/models/components/earnswapresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"earnswapresponse.js","sourceRoot":"","sources":["../../../../src/models/components/earnswapresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFH,4DAQC;AAxFD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAIjD,qGAGkD;AAClD,qEAGkC;AAElC;;GAEG;AACU,QAAA,4BAA4B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num } from "../../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
5
|
import { BatchedSafeOperationsResponseOutput } from "./batchedsafeoperationsresponseoutput.js";
|
|
5
6
|
import { UnsignedTransaction } from "./unsignedtransaction.js";
|
|
7
|
+
export declare const V2BundleResponseSwapProvider: {
|
|
8
|
+
readonly Market: "market";
|
|
9
|
+
readonly Firm: "firm";
|
|
10
|
+
};
|
|
11
|
+
export type V2BundleResponseSwapProvider = ClosedEnum<typeof V2BundleResponseSwapProvider>;
|
|
6
12
|
export type V2BundleResponse = {
|
|
7
13
|
/**
|
|
8
14
|
* Unsigned transaction for direct execution by the owner. Present when gas_sponsorship=false.
|
|
@@ -16,8 +22,18 @@ export type V2BundleResponse = {
|
|
|
16
22
|
* Number of individual transactions bundled in this execution.
|
|
17
23
|
*/
|
|
18
24
|
actionsCount: number;
|
|
25
|
+
/**
|
|
26
|
+
* Which route priced the bundle's V2_SWAP action(s): 'market' (a DEX aggregator, slippage-bounded) or 'firm' (a zero-slippage quote that fills exactly or reverts; the only route on HyperEVM). Null when the bundle carries no swap.
|
|
27
|
+
*/
|
|
28
|
+
swapProvider?: V2BundleResponseSwapProvider | null | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Deadline of the firm swap quote inside the bundle. The transaction (or the sponsor's broadcast of the signed typed data) must be included before it or the bundle reverts on-chain; rebuild after it passes. Null unless a swap action was firm-priced.
|
|
31
|
+
*/
|
|
32
|
+
quoteExpiresAt?: Date | null | undefined;
|
|
19
33
|
};
|
|
20
34
|
/** @internal */
|
|
35
|
+
export declare const V2BundleResponseSwapProvider$inboundSchema: z.ZodNativeEnum<typeof V2BundleResponseSwapProvider>;
|
|
36
|
+
/** @internal */
|
|
21
37
|
export declare const V2BundleResponse$inboundSchema: z.ZodType<V2BundleResponse, z.ZodTypeDef, unknown>;
|
|
22
38
|
export declare function v2BundleResponseFromJSON(jsonString: string): SafeParseResult<V2BundleResponse, SDKValidationError>;
|
|
23
39
|
//# sourceMappingURL=v2bundleresponse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2bundleresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/v2bundleresponse.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;AACrE,OAAO,EACL,mCAAmC,EAEpC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,CAAC;IACrD;;OAEG;IACH,MAAM,CAAC,EAAE,mCAAmC,GAAG,IAAI,GAAG,SAAS,CAAC;IAChE;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"v2bundleresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/v2bundleresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,mCAAmC,EAEpC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC,eAAO,MAAM,4BAA4B;;;CAG/B,CAAC;AACX,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,4BAA4B,CACpC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,CAAC;IACrD;;OAEG;IACH,MAAM,CAAC,EAAE,mCAAmC,GAAG,IAAI,GAAG,SAAS,CAAC;IAChE;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,4BAA4B,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/D;;OAEG;IACH,cAAc,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CAC1C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,aAAa,CACtE,OAAO,4BAA4B,CACS,CAAC;AAE/C,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OAAO,CACpD,gBAAgB,EAChB,CAAC,CAAC,UAAU,EACZ,OAAO,CAkBP,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAMvD"}
|
|
@@ -36,23 +36,34 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.V2BundleResponse$inboundSchema = void 0;
|
|
39
|
+
exports.V2BundleResponse$inboundSchema = exports.V2BundleResponseSwapProvider$inboundSchema = exports.V2BundleResponseSwapProvider = void 0;
|
|
40
40
|
exports.v2BundleResponseFromJSON = v2BundleResponseFromJSON;
|
|
41
41
|
const z = __importStar(require("zod/v3"));
|
|
42
42
|
const primitives_js_1 = require("../../lib/primitives.js");
|
|
43
43
|
const schemas_js_1 = require("../../lib/schemas.js");
|
|
44
44
|
const batchedsafeoperationsresponseoutput_js_1 = require("./batchedsafeoperationsresponseoutput.js");
|
|
45
45
|
const unsignedtransaction_js_1 = require("./unsignedtransaction.js");
|
|
46
|
+
exports.V2BundleResponseSwapProvider = {
|
|
47
|
+
Market: "market",
|
|
48
|
+
Firm: "firm",
|
|
49
|
+
};
|
|
50
|
+
/** @internal */
|
|
51
|
+
exports.V2BundleResponseSwapProvider$inboundSchema = z.nativeEnum(exports.V2BundleResponseSwapProvider);
|
|
46
52
|
/** @internal */
|
|
47
53
|
exports.V2BundleResponse$inboundSchema = z.object({
|
|
48
54
|
transaction: z.nullable(unsignedtransaction_js_1.UnsignedTransaction$inboundSchema).optional(),
|
|
49
55
|
eip_712: z.nullable(batchedsafeoperationsresponseoutput_js_1.BatchedSafeOperationsResponseOutput$inboundSchema)
|
|
50
56
|
.optional(),
|
|
51
57
|
actions_count: z.number().int(),
|
|
58
|
+
swap_provider: z.nullable(exports.V2BundleResponseSwapProvider$inboundSchema)
|
|
59
|
+
.optional(),
|
|
60
|
+
quote_expires_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
|
|
52
61
|
}).transform((v) => {
|
|
53
62
|
return (0, primitives_js_1.remap)(v, {
|
|
54
63
|
"eip_712": "eip712",
|
|
55
64
|
"actions_count": "actionsCount",
|
|
65
|
+
"swap_provider": "swapProvider",
|
|
66
|
+
"quote_expires_at": "quoteExpiresAt",
|
|
56
67
|
});
|
|
57
68
|
});
|
|
58
69
|
function v2BundleResponseFromJSON(jsonString) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v2bundleresponse.js","sourceRoot":"","sources":["../../../../src/models/components/v2bundleresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"v2bundleresponse.js","sourceRoot":"","sources":["../../../../src/models/components/v2bundleresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6EH,4DAQC;AAnFD,0CAA4B;AAC5B,2DAA0D;AAC1D,q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/C,CAAC;AACJ,CAAC"}
|
|
@@ -79,8 +79,11 @@ export declare class Earn extends ClientSDK {
|
|
|
79
79
|
* Estimate the output of a swap without building a transaction.
|
|
80
80
|
*
|
|
81
81
|
* Returns the expected amount of `token_out` received for selling `amount_in`
|
|
82
|
-
* of `token_in
|
|
83
|
-
*
|
|
82
|
+
* of `token_in`. On chains with a market route this is the market rate; on
|
|
83
|
+
* HyperEVM, where swaps are firm-priced, it is an indicative price from the
|
|
84
|
+
* firm provider's live levels (`swap_provider` tells you which). This is
|
|
85
|
+
* read-only: it does not build a transaction, require an account, or check
|
|
86
|
+
* balances.
|
|
84
87
|
*
|
|
85
88
|
* Use it to gauge exit liquidity and price impact for a token before entering
|
|
86
89
|
* a position — for example, to warn when a market's underlying asset cannot be
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earn.d.ts","sourceRoot":"","sources":["../../../src/sdk/earn.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,IAAK,SAAQ,SAAS;IACjC;;;;;;;;;;;;OAYG;IACG,aAAa,CACjB,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;;;;;;;;;;;OAYG;IACG,gBAAgB,CACpB,OAAO,EAAE,UAAU,CAAC,yBAAyB,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC;IAQ/C;;;;;;;;;;;OAWG;IACG,UAAU,CACd,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC;IAQrC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n extends sdks_js_1.ClientSDK {
|
|
|
106
106
|
* Estimate the output of a swap without building a transaction.
|
|
107
107
|
*
|
|
108
108
|
* Returns the expected amount of `token_out` received for selling `amount_in`
|
|
109
|
-
* of `token_in
|
|
110
|
-
*
|
|
109
|
+
* of `token_in`. On chains with a market route this is the market rate; on
|
|
110
|
+
* HyperEVM, where swaps are firm-priced, it is an indicative price from the
|
|
111
|
+
* firm provider's live levels (`swap_provider` tells you which). This is
|
|
112
|
+
* read-only: it does not build a transaction, require an account, or check
|
|
113
|
+
* balances.
|
|
111
114
|
*
|
|
112
115
|
* Use it to gauge exit liquidity and price impact for a token before entering
|
|
113
116
|
* a position — for example, to warn when a market's underlying asset cannot be
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earn.js","sourceRoot":"","sources":["../../../src/sdk/earn.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4EAAsE;AACtE,sEAAgE;AAChE,kEAA4D;AAC5D,gFAA0E;AAC1E,kEAA4D;AAC5D,gFAA0E;AAC1E,wEAAkE;AAClE,8EAAwE;AACxE,8DAAwD;AACxD,wEAAkE;AAClE,sEAAgE;AAChE,kEAA4D;AAC5D,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,IAAK,SAAQ,mBAAS;IACjC;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,aAAa,CACjB,OAA0C,EAC1C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wCAAiB,EAClC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,gBAAgB,CACpB,OAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8CAAoB,EACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,UAAU,CACd,OAAuC,EACvC,OAAw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R,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,UAAU,CACd,OAAqC,EACrC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAmC,EACnC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,UAAU,CACd,OAAmC,EACnC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AArTD,oBAqTC"}
|
|
@@ -16,8 +16,11 @@ import { Result } from "../types/fp.js";
|
|
|
16
16
|
* Estimate the output of a swap without building a transaction.
|
|
17
17
|
*
|
|
18
18
|
* Returns the expected amount of `token_out` received for selling `amount_in`
|
|
19
|
-
* of `token_in
|
|
20
|
-
*
|
|
19
|
+
* of `token_in`. On chains with a market route this is the market rate; on
|
|
20
|
+
* HyperEVM, where swaps are firm-priced, it is an indicative price from the
|
|
21
|
+
* firm provider's live levels (`swap_provider` tells you which). This is
|
|
22
|
+
* read-only: it does not build a transaction, require an account, or check
|
|
23
|
+
* balances.
|
|
21
24
|
*
|
|
22
25
|
* Use it to gauge exit liquidity and price impact for a token before entering
|
|
23
26
|
* a position — for example, to warn when a market's underlying asset cannot be
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"earnEarnSwapQuote.d.ts","sourceRoot":"","sources":["../../../src/funcs/earnEarnSwapQuote.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;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OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,qBAAqB,EAC9B,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -19,8 +19,11 @@ import { APIPromise } from "../types/async.js";
|
|
|
19
19
|
* Estimate the output of a swap without building a transaction.
|
|
20
20
|
*
|
|
21
21
|
* Returns the expected amount of `token_out` received for selling `amount_in`
|
|
22
|
-
* of `token_in
|
|
23
|
-
*
|
|
22
|
+
* of `token_in`. On chains with a market route this is the market rate; on
|
|
23
|
+
* HyperEVM, where swaps are firm-priced, it is an indicative price from the
|
|
24
|
+
* firm provider's live levels (`swap_provider` tells you which). This is
|
|
25
|
+
* read-only: it does not build a transaction, require an account, or check
|
|
26
|
+
* balances.
|
|
24
27
|
*
|
|
25
28
|
* Use it to gauge exit liquidity and price impact for a token before entering
|
|
26
29
|
* a position — for example, to warn when a market's underlying asset cannot be
|