@illalabs/interfaces 0.23.0 → 0.24.1-canary-beta-60a2dc6d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/interfaces/index.d.ts +0 -1
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/index.js +0 -1
- package/dist/interfaces/index.js.map +1 -1
- package/dist/schemas/chatContext.d.ts +416 -48
- package/dist/schemas/chatContext.d.ts.map +1 -1
- package/dist/schemas/chatRequestBody.d.ts +512 -60
- package/dist/schemas/chatRequestBody.d.ts.map +1 -1
- package/dist/schemas/telemetryEvents.d.ts +8 -8
- package/dist/schemas/toolAutorouter.d.ts +418 -45
- package/dist/schemas/toolAutorouter.d.ts.map +1 -1
- package/dist/schemas/toolAutorouter.js +69 -1
- package/dist/schemas/toolAutorouter.js.map +1 -1
- package/dist/types/actions/tools/defiFetchListingsAction.d.ts +1 -1
- package/dist/types/actions/tools/defiFetchListingsAction.d.ts.map +1 -1
- package/dist/types/actions/tools/defiPositionsAction.d.ts +30 -1
- package/dist/types/actions/tools/defiPositionsAction.d.ts.map +1 -1
- package/dist/types/toolAutorouter.d.ts +8 -1
- package/dist/types/toolAutorouter.d.ts.map +1 -1
- package/dist/types/toolAutorouter.js +1 -1
- package/dist/types/toolAutorouter.js.map +1 -1
- package/dist/utils/constants.d.ts +9 -1
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +17 -1
- package/dist/utils/constants.js.map +1 -1
- package/package.json +1 -1
- package/dist/interfaces/autoRouter.d.ts +0 -34
- package/dist/interfaces/autoRouter.d.ts.map +0 -1
- package/dist/interfaces/autoRouter.js +0 -2
- package/dist/interfaces/autoRouter.js.map +0 -1
|
@@ -5,7 +5,7 @@ export type DefiFetchListingsActionInputSchema = z.ZodObject<{
|
|
|
5
5
|
tokens: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
6
|
criteria: z.ZodOptional<z.ZodEnum<["supplyAPY", "totalLiquidityUSD"]>>;
|
|
7
7
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
8
|
-
protocol: z.ZodEnum<[SupportedLendingProvider, ...SupportedLendingProvider[]]
|
|
8
|
+
protocol: z.ZodOptional<z.ZodEnum<[SupportedLendingProvider, ...SupportedLendingProvider[]]>>;
|
|
9
9
|
}>;
|
|
10
10
|
export type DefiFetchListingsActionInput = TypeOf<DefiFetchListingsActionInputSchema>;
|
|
11
11
|
//# sourceMappingURL=defiFetchListingsAction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defiFetchListingsAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiFetchListingsAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,SAAS,CAAC;IACzD,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC,CAAC,CAAC;IACxD,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/C,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IACvE,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAClC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,wBAAwB,EAAE,GAAG,wBAAwB,EAAE,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"defiFetchListingsAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiFetchListingsAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErF,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,SAAS,CAAC;IACzD,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC,CAAC,CAAC;IACxD,MAAM,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/C,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IACvE,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAClC,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,wBAAwB,EAAE,GAAG,wBAAwB,EAAE,CAAC,CAAC,CAAC,CAAC;CACjG,CAAC,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC,kCAAkC,CAAC,CAAC"}
|
|
@@ -4,9 +4,36 @@ export type DefiPositionsActionInputSchema = z.ZodObject<{
|
|
|
4
4
|
userAddress: z.ZodString;
|
|
5
5
|
chain: z.ZodEnum<[SupportedChain, ...SupportedChain[]]>;
|
|
6
6
|
tokens: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7
|
-
protocol: z.ZodEnum<[SupportedLendingProvider, ...SupportedLendingProvider[]]
|
|
7
|
+
protocol: z.ZodOptional<z.ZodEnum<[SupportedLendingProvider, ...SupportedLendingProvider[]]>>;
|
|
8
8
|
}>;
|
|
9
9
|
export type DefiPositionsActionInput = TypeOf<DefiPositionsActionInputSchema>;
|
|
10
|
+
/**
|
|
11
|
+
* Generic descriptor for an ERC-4626-style curated vault. Present on listings
|
|
12
|
+
* and positions sourced from vault-shaped lending protocols (Morpho today;
|
|
13
|
+
* other curated-vault protocols later); undefined for pool-shaped protocols
|
|
14
|
+
* like Aave.
|
|
15
|
+
*
|
|
16
|
+
* `curator` is optional because not every vault protocol exposes a curator
|
|
17
|
+
* identity (Morpho does; other future integrations may not).
|
|
18
|
+
*/
|
|
19
|
+
export type LendingVaultMetadata = {
|
|
20
|
+
/** Vault contract address. */
|
|
21
|
+
address: `0x${string}`;
|
|
22
|
+
/** Display name of the vault (e.g. "Gauntlet USDC Prime"). */
|
|
23
|
+
name: string;
|
|
24
|
+
/** Curator / strategist display name, when the protocol exposes one. */
|
|
25
|
+
curator?: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Surfaces partial failures from multi-provider fan-out (e.g. Morpho API down
|
|
29
|
+
* while Aave succeeds). Consumers can show a hint to the user without losing
|
|
30
|
+
* the available results.
|
|
31
|
+
*/
|
|
32
|
+
export type LendingProviderError = {
|
|
33
|
+
protocol: SupportedLendingProvider;
|
|
34
|
+
chain?: string;
|
|
35
|
+
message: string;
|
|
36
|
+
};
|
|
10
37
|
export type DefiFetchOutput = {
|
|
11
38
|
type: "DefiFetchListings";
|
|
12
39
|
value: {
|
|
@@ -17,7 +44,9 @@ export type DefiFetchOutput = {
|
|
|
17
44
|
url: string;
|
|
18
45
|
protocol: string;
|
|
19
46
|
chain: string | undefined;
|
|
47
|
+
vault?: LendingVaultMetadata;
|
|
20
48
|
}[];
|
|
49
|
+
providerErrors?: ReadonlyArray<LendingProviderError>;
|
|
21
50
|
};
|
|
22
51
|
};
|
|
23
52
|
//# sourceMappingURL=defiPositionsAction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defiPositionsAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/defiPositionsAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAA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G,MAAM,CAAC,8BAA8B,CAAC,CAAC;AAE9E;;;;;;;;GAQG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,8BAA8B;IAC9B,OAAO,EAAE,KAAK,MAAM,EAAE,CAAC;IACvB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B,QAAQ,EAAE,wBAAwB,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC1B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,KAAK,EAAE;QACH,OAAO,EAAE;YACL,OAAO,EAAE,MAAM,CAAC;YAChB,IAAI,EAAE,MAAM,CAAC;YACb,GAAG,EAAE,MAAM,CAAC;YACZ,GAAG,EAAE,MAAM,CAAC;YACZ,QAAQ,EAAE,MAAM,CAAC;YACjB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;YAC1B,KAAK,CAAC,EAAE,oBAAoB,CAAC;SAChC,EAAE,CAAC;QACJ,cAAc,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;KACxD,CAAC;CACL,CAAC"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import type { TypeOf } from "zod";
|
|
2
|
-
import { AutoRouterConfigSchema, DeFiConfigSchema, SwapBridgeProviderSchema, ToolAutorouterSchema } from "../internal.js";
|
|
2
|
+
import { AutoRouterConfigSchema, DeFiConfigSchema, SwapBridgeProviderSchema, ToolAutorouterSchema, ToolsAllowlistSchema } from "../internal.js";
|
|
3
3
|
export type ToolAutorouterRequest = TypeOf<typeof ToolAutorouterSchema>;
|
|
4
4
|
export type AutoRouterConfigType = TypeOf<typeof AutoRouterConfigSchema>;
|
|
5
5
|
export type LendingProviderType = TypeOf<typeof DeFiConfigSchema>;
|
|
6
6
|
export type SwapBridgeProviderType = TypeOf<typeof SwapBridgeProviderSchema>;
|
|
7
|
+
/**
|
|
8
|
+
* Per-key tool category allowlist. The set fields are the enabled
|
|
9
|
+
* categories; an absent field means the category is excluded.
|
|
10
|
+
*/
|
|
11
|
+
export type ToolsAllowlistType = TypeOf<typeof ToolsAllowlistSchema>;
|
|
12
|
+
/** The category keys of {@link ToolsAllowlistType}. */
|
|
13
|
+
export type AutoRouterToolCategory = keyof ToolsAllowlistType;
|
|
7
14
|
//# sourceMappingURL=toolAutorouter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolAutorouter.d.ts","sourceRoot":"","sources":["../../src/types/toolAutorouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAElC,OAAO,EACH,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACvB,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACxE,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACzE,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAClE,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"toolAutorouter.d.ts","sourceRoot":"","sources":["../../src/types/toolAutorouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAElC,OAAO,EACH,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACvB,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACxE,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACzE,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAClE,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE7E;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAErE,uDAAuD;AACvD,MAAM,MAAM,sBAAsB,GAAG,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AutoRouterConfigSchema, DeFiConfigSchema, SwapBridgeProviderSchema, ToolAutorouterSchema, } from "../internal.js";
|
|
1
|
+
import { AutoRouterConfigSchema, DeFiConfigSchema, SwapBridgeProviderSchema, ToolAutorouterSchema, ToolsAllowlistSchema, } from "../internal.js";
|
|
2
2
|
//# sourceMappingURL=toolAutorouter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolAutorouter.js","sourceRoot":"","sources":["../../src/types/toolAutorouter.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,GACvB,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"toolAutorouter.js","sourceRoot":"","sources":["../../src/types/toolAutorouter.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,sBAAsB,EACtB,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,GACvB,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const LENDING_PROVIDERS: readonly ["aave"];
|
|
1
|
+
export declare const LENDING_PROVIDERS: readonly ["aave", "morpho"];
|
|
2
2
|
export declare const SUPPORTED_SWAP_PROVIDERS: readonly ["lifi", "aerodrome"];
|
|
3
3
|
export declare const SUPPORTED_BRIDGE_PROVIDERS: readonly ["lifi"];
|
|
4
4
|
/**
|
|
@@ -45,6 +45,14 @@ export type SupportedChain = SupportedChainWithId["name"];
|
|
|
45
45
|
/** Arrays runtime but with precise types */
|
|
46
46
|
export declare const SUPPORTED_CHAIN_IDS: SupportedChainId[];
|
|
47
47
|
export declare const SUPPORTED_CHAINS: SupportedChain[];
|
|
48
|
+
/**
|
|
49
|
+
* Chain names as a non-empty literal tuple, for consumers that need a Zod enum:
|
|
50
|
+
* `z.enum` requires a `[T, ...T[]]` tuple, which the `SupportedChain[]`-typed
|
|
51
|
+
* {@link SUPPORTED_CHAINS} array does not satisfy. The `satisfies` clause keeps
|
|
52
|
+
* every entry a valid {@link SupportedChain}; keep it in sync with
|
|
53
|
+
* {@link SUPPORTED_CHAINS_WITH_IDS}.
|
|
54
|
+
*/
|
|
55
|
+
export declare const SUPPORTED_CHAIN_NAMES: readonly ["Ethereum", "Polygon", "Optimism", "Base", "Arbitrum", "Avalanche", "BSC"];
|
|
48
56
|
/**
|
|
49
57
|
* Const list of all supported actions with their schemas
|
|
50
58
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,6BAA6C,CAAC;AAE5E,eAAO,MAAM,wBAAwB,gCAAgD,CAAC;AAEtF,eAAO,MAAM,0BAA0B,mBAAmC,CAAC;AAE3E;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,gCAAgD,CAAC;AAEnF,eAAO,MAAM,uBAAuB,oDAIzB,CAAC;AAEZ,eAAO,MAAM,2BAA2B,yBAAyC,CAAC;AAElF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;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,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AACjF,MAAM,MAAM,8BAA8B,GAAG,CAAC,OAAO,kCAAkC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjG,MAAM,MAAM,6BAA6B,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AACrF,MAAM,MAAM,iCAAiC,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7F,eAAO,MAAM,iBAAiB,2DAKnB,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAChC,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,GAClC,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,yBAAyB,mCAAoC,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,2BAA2B,4gBAqB9B,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpF;;GAEG;AACH,eAAO,MAAM,uBAAuB,sEAK1B,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
package/dist/utils/constants.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const LENDING_PROVIDERS = Object.freeze(["aave"]);
|
|
1
|
+
export const LENDING_PROVIDERS = Object.freeze(["aave", "morpho"]);
|
|
2
2
|
export const SUPPORTED_SWAP_PROVIDERS = Object.freeze(["lifi", "aerodrome"]);
|
|
3
3
|
export const SUPPORTED_BRIDGE_PROVIDERS = Object.freeze(["lifi"]);
|
|
4
4
|
/**
|
|
@@ -32,6 +32,22 @@ export const SUPPORTED_CHAINS_WITH_IDS = [
|
|
|
32
32
|
/** Arrays runtime but with precise types */
|
|
33
33
|
export const SUPPORTED_CHAIN_IDS = SUPPORTED_CHAINS_WITH_IDS.map((c) => c.id);
|
|
34
34
|
export const SUPPORTED_CHAINS = SUPPORTED_CHAINS_WITH_IDS.map((c) => c.name);
|
|
35
|
+
/**
|
|
36
|
+
* Chain names as a non-empty literal tuple, for consumers that need a Zod enum:
|
|
37
|
+
* `z.enum` requires a `[T, ...T[]]` tuple, which the `SupportedChain[]`-typed
|
|
38
|
+
* {@link SUPPORTED_CHAINS} array does not satisfy. The `satisfies` clause keeps
|
|
39
|
+
* every entry a valid {@link SupportedChain}; keep it in sync with
|
|
40
|
+
* {@link SUPPORTED_CHAINS_WITH_IDS}.
|
|
41
|
+
*/
|
|
42
|
+
export const SUPPORTED_CHAIN_NAMES = [
|
|
43
|
+
"Ethereum",
|
|
44
|
+
"Polygon",
|
|
45
|
+
"Optimism",
|
|
46
|
+
"Base",
|
|
47
|
+
"Arbitrum",
|
|
48
|
+
"Avalanche",
|
|
49
|
+
"BSC",
|
|
50
|
+
];
|
|
35
51
|
/**
|
|
36
52
|
* Const list of all supported actions with their schemas
|
|
37
53
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAU,CAAC,C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2BAA2B,GAAG;IACvC,6BAA6B;IAC7B,uBAAuB;IACvB,cAAc;IACd,gCAAgC;IAChC,mBAAmB;IACnB,6BAA6B;IAC7B,+BAA+B;IAC/B,8BAA8B;IAC9B,oBAAoB;IACpB,4BAA4B;IAC5B,wBAAwB;IACxB,qBAAqB;IACrB,qBAAqB;IACrB,6BAA6B;IAC7B,2BAA2B;IAC3B,sBAAsB;IACtB,sBAAsB;IACtB,sBAAsB;IACtB,YAAY;IACZ,kBAAkB;CACZ,CAAC;AAOX;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACnC,QAAQ;IACR,aAAa;IACb,OAAO;IACP,uBAAuB;CACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { SupportedLendingProvider, SupportedSwapBridgeProvider } from "../utils/constants.js";
|
|
2
|
-
/**
|
|
3
|
-
* Lending provider type
|
|
4
|
-
*/
|
|
5
|
-
export type LendingProvider = SupportedLendingProvider;
|
|
6
|
-
/**
|
|
7
|
-
* Configuration for lending only operations
|
|
8
|
-
*/
|
|
9
|
-
export type LendingOnly = {
|
|
10
|
-
lending: LendingProvider;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Configuration for specific DeFi actions
|
|
14
|
-
*/
|
|
15
|
-
export type ActionsOnly = {
|
|
16
|
-
supply: LendingProvider;
|
|
17
|
-
withdraw: LendingProvider;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* DeFi configuration union type
|
|
21
|
-
*/
|
|
22
|
-
export type DeFiConfig = LendingOnly | ActionsOnly;
|
|
23
|
-
/**
|
|
24
|
-
* Swap and bridge provider type
|
|
25
|
-
*/
|
|
26
|
-
export type SwapBridgeProvider = SupportedSwapBridgeProvider;
|
|
27
|
-
/**
|
|
28
|
-
* Auto router configuration interface
|
|
29
|
-
*/
|
|
30
|
-
export interface AutoRouterConfig {
|
|
31
|
-
DeFi?: DeFiConfig;
|
|
32
|
-
SwapBridge?: SwapBridgeProvider;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=autoRouter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"autoRouter.d.ts","sourceRoot":"","sources":["../../src/interfaces/autoRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEnG;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,wBAAwB,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB,OAAO,EAAE,eAAe,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB,MAAM,EAAE,eAAe,CAAC;IACxB,QAAQ,EAAE,eAAe,CAAC;CAC7B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,2BAA2B,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACnC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"autoRouter.js","sourceRoot":"","sources":["../../src/interfaces/autoRouter.ts"],"names":[],"mappings":""}
|