@illalabs/interfaces 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/index.js.map +1 -1
- package/dist/interfaces/polymarket/constants.d.ts +8 -0
- package/dist/interfaces/polymarket/constants.d.ts.map +1 -0
- package/dist/interfaces/polymarket/constants.js +12 -0
- package/dist/interfaces/polymarket/constants.js.map +1 -0
- package/dist/interfaces/polymarket/index.d.ts +4 -0
- package/dist/interfaces/polymarket/index.d.ts.map +1 -0
- package/dist/interfaces/polymarket/index.js +2 -0
- package/dist/interfaces/polymarket/index.js.map +1 -0
- package/dist/interfaces/polymarket/request.d.ts +71 -0
- package/dist/interfaces/polymarket/request.d.ts.map +1 -0
- package/dist/interfaces/polymarket/request.js +2 -0
- package/dist/interfaces/polymarket/request.js.map +1 -0
- package/dist/interfaces/polymarket/response.d.ts +65 -0
- package/dist/interfaces/polymarket/response.d.ts.map +1 -0
- package/dist/interfaces/polymarket/response.js +2 -0
- package/dist/interfaces/polymarket/response.js.map +1 -0
- package/dist/schemas/chatContext.d.ts +12 -12
- package/dist/schemas/chatRequestBody.d.ts +16 -16
- package/dist/schemas/polymarketBody.d.ts +3 -0
- package/dist/schemas/polymarketBody.d.ts.map +1 -1
- package/dist/schemas/polymarketBody.js +1 -0
- package/dist/schemas/polymarketBody.js.map +1 -1
- package/dist/schemas/toolAutorouter.d.ts +9 -9
- package/dist/schemas/toolAutorouter.d.ts.map +1 -1
- package/dist/types/actions/outputs.d.ts +48 -2
- package/dist/types/actions/outputs.d.ts.map +1 -1
- package/dist/types/actions/outputs.js +12 -1
- package/dist/types/actions/outputs.js.map +1 -1
- package/dist/types/actions/tools/bridgeAction.d.ts +2 -2
- package/dist/types/actions/tools/bridgeAction.d.ts.map +1 -1
- package/dist/types/actions/tools/resolveNameAction.d.ts +2 -0
- package/dist/types/actions/tools/resolveNameAction.d.ts.map +1 -1
- package/dist/types/actions/tools/swapAction.d.ts +7 -2
- package/dist/types/actions/tools/swapAction.d.ts.map +1 -1
- package/dist/types/nameResolution/index.d.ts +0 -4
- package/dist/types/nameResolution/index.d.ts.map +1 -1
- package/dist/types/nameResolution/index.js +0 -1
- package/dist/types/nameResolution/index.js.map +1 -1
- package/dist/types/nameResolution/resolver.d.ts +3 -23
- package/dist/types/nameResolution/resolver.d.ts.map +1 -1
- package/dist/types/nameResolution/resolver.js.map +1 -1
- package/dist/utils/constants.d.ts +12 -1
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +10 -1
- package/dist/utils/constants.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/nameResolution/namingServiceEntry.d.ts +0 -17
- package/dist/types/nameResolution/namingServiceEntry.d.ts.map +0 -1
- package/dist/types/nameResolution/namingServiceEntry.js +0 -2
- package/dist/types/nameResolution/namingServiceEntry.js.map +0 -1
- package/dist/types/nameResolution/registry.d.ts +0 -34
- package/dist/types/nameResolution/registry.d.ts.map +0 -1
- package/dist/types/nameResolution/registry.js +0 -13
- package/dist/types/nameResolution/registry.js.map +0 -1
- package/dist/types/nameResolution/resolveNameOutput.d.ts +0 -20
- package/dist/types/nameResolution/resolveNameOutput.d.ts.map +0 -1
- package/dist/types/nameResolution/resolveNameOutput.js +0 -2
- package/dist/types/nameResolution/resolveNameOutput.js.map +0 -1
- package/dist/types/nameResolution/serviceConfig.d.ts +0 -42
- package/dist/types/nameResolution/serviceConfig.d.ts.map +0 -1
- package/dist/types/nameResolution/serviceConfig.js +0 -2
- package/dist/types/nameResolution/serviceConfig.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolAutorouter.d.ts","sourceRoot":"","sources":["../../src/schemas/toolAutorouter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;IAAkD,CAAC;AAGhF,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"toolAutorouter.d.ts","sourceRoot":"","sources":["../../src/schemas/toolAutorouter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;IAAkD,CAAC;AAGhF,eAAO,MAAM,wBAAwB,kCAAgC,CAAC;AAGtE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKtB,CAAC;AAGd,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIpB,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { PrepareTransactionRequestReturnType } from "viem";
|
|
1
|
+
import type { Address, PrepareTransactionRequestReturnType } from "viem";
|
|
2
2
|
import type { SignatureRequest, TransactionActionMetadata, TransactionActionMetadataToken } from "../../schemas/messages.js";
|
|
3
|
+
import type { NamingSystem } from "../../utils/constants.js";
|
|
4
|
+
import type { NameResolutionFailureCause } from "../nameResolution/failure.js";
|
|
3
5
|
import type { ActionError } from "./errors.js";
|
|
4
6
|
import type { ActionInput } from "./inputs.js";
|
|
5
7
|
export type { TransactionActionMetadata, TransactionActionMetadataToken };
|
|
@@ -93,5 +95,49 @@ export type ActionStep<T extends Transaction = Transaction> = ActionSingleTransa
|
|
|
93
95
|
* ```
|
|
94
96
|
*/
|
|
95
97
|
export type ActionSequenceOutput<T extends Transaction = Transaction> = BaseActionOutput<"ActionSequence", ActionStep<T>[]> & WithTransactionActionMetadata;
|
|
96
|
-
export type ActionOutput<Input extends ActionInput | unknown = unknown> = ActionSingleTransactionOutput<Transaction> | ActionBatchTransactionsOutput<Transaction> | ActionSignatureRequestsOutput | ActionSequenceOutput<Transaction> | ActionDataOutput<unknown> | ActionErrorOutput<Input>;
|
|
98
|
+
export type ActionOutput<Input extends ActionInput | unknown = unknown> = ActionSingleTransactionOutput<Transaction> | ActionBatchTransactionsOutput<Transaction> | ActionSignatureRequestsOutput | ActionSequenceOutput<Transaction> | ActionDataOutput<unknown> | ResolveNameOutput | ActionErrorOutput<Input>;
|
|
99
|
+
/**
|
|
100
|
+
* Status discriminator for {@link RegistryOutcome}. Same const-object pattern
|
|
101
|
+
* as `NameResolverStatus`: compile-time exhaustiveness, no enum overhead.
|
|
102
|
+
*/
|
|
103
|
+
export declare const RegistryStatus: Readonly<{
|
|
104
|
+
/** One resolver returned an address. */
|
|
105
|
+
readonly RESOLVED: "RESOLVED";
|
|
106
|
+
/** ≥1 resolver claimed the format but the name does not exist there. */
|
|
107
|
+
readonly NOT_FOUND: "NOT_FOUND";
|
|
108
|
+
/** No resolver recognized the format. */
|
|
109
|
+
readonly UNSUPPORTED: "UNSUPPORTED";
|
|
110
|
+
}>;
|
|
111
|
+
export type RegistryStatus = (typeof RegistryStatus)[keyof typeof RegistryStatus];
|
|
112
|
+
/**
|
|
113
|
+
* Aggregate verdict produced by a name resolver registry's `resolveAny`
|
|
114
|
+
* method.
|
|
115
|
+
*
|
|
116
|
+
* The split between `NOT_FOUND` and `UNSUPPORTED` lets the caller emit
|
|
117
|
+
* specific user-facing messages: typo on a known service vs. unknown service
|
|
118
|
+
* entirely.
|
|
119
|
+
*/
|
|
120
|
+
export type RegistryOutcome = {
|
|
121
|
+
status: typeof RegistryStatus.RESOLVED;
|
|
122
|
+
address: Address;
|
|
123
|
+
system: NamingSystem;
|
|
124
|
+
} | {
|
|
125
|
+
status: typeof RegistryStatus.NOT_FOUND;
|
|
126
|
+
attemptedSystems: NamingSystem[];
|
|
127
|
+
} | {
|
|
128
|
+
status: typeof RegistryStatus.UNSUPPORTED;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Action output returned by the `resolveName` action. `resolution: null`
|
|
132
|
+
* means no supported naming service matched the input; `failure` is only
|
|
133
|
+
* carried on that null branch so the LLM can craft a specific message.
|
|
134
|
+
*/
|
|
135
|
+
export type ResolveNameOutput = BaseActionOutput<"ResolveName", {
|
|
136
|
+
resolution: {
|
|
137
|
+
name: string;
|
|
138
|
+
address: string;
|
|
139
|
+
system: NamingSystem;
|
|
140
|
+
} | null;
|
|
141
|
+
failure?: NameResolutionFailureCause;
|
|
142
|
+
}>;
|
|
97
143
|
//# sourceMappingURL=outputs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputs.d.ts","sourceRoot":"","sources":["../../../src/types/actions/outputs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"outputs.d.ts","sourceRoot":"","sources":["../../../src/types/actions/outputs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,mCAAmC,EAAE,MAAM,MAAM,CAAC;AAEzE,OAAO,KAAK,EACR,gBAAgB,EAChB,yBAAyB,EACzB,8BAA8B,EACjC,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,YAAY,EAAE,yBAAyB,EAAE,8BAA8B,EAAE,CAAC;AAE1E,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,yBAAyB,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AACxF,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,yBAAyB,EAAE;IAAE,MAAM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B,CAAC,WAAW,CAAC,GACjC,gBAAgB,CAAC,OAAO,CAAC,GACzB,iBAAiB,GACjB,iBAAiB,CAAC,KAAK,CAAC,CAAC;AAE/B;;;GAGG;AACH,eAAO,MAAM,cAAc;IACvB,wCAAwC;;IAExC,wEAAwE;;IAExE,yCAAyC;;EAElC,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAElF;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GACrB;IAAE,MAAM,EAAE,OAAO,cAAc,CAAC,QAAQ,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,GAClF;IAAE,MAAM,EAAE,OAAO,cAAc,CAAC,SAAS,CAAC;IAAC,gBAAgB,EAAE,YAAY,EAAE,CAAA;CAAE,GAC7E;IAAE,MAAM,EAAE,OAAO,cAAc,CAAC,WAAW,CAAA;CAAE,CAAC;AAEpD;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,CAC5C,aAAa,EACb;IACI,UAAU,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,YAAY,CAAC;KACxB,GAAG,IAAI,CAAC;IACT,OAAO,CAAC,EAAE,0BAA0B,CAAC;CACxC,CACJ,CAAC"}
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Status discriminator for {@link RegistryOutcome}. Same const-object pattern
|
|
3
|
+
* as `NameResolverStatus`: compile-time exhaustiveness, no enum overhead.
|
|
4
|
+
*/
|
|
5
|
+
export const RegistryStatus = Object.freeze({
|
|
6
|
+
/** One resolver returned an address. */
|
|
7
|
+
RESOLVED: "RESOLVED",
|
|
8
|
+
/** ≥1 resolver claimed the format but the name does not exist there. */
|
|
9
|
+
NOT_FOUND: "NOT_FOUND",
|
|
10
|
+
/** No resolver recognized the format. */
|
|
11
|
+
UNSUPPORTED: "UNSUPPORTED",
|
|
12
|
+
});
|
|
2
13
|
//# sourceMappingURL=outputs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputs.js","sourceRoot":"","sources":["../../../src/types/actions/outputs.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"outputs.js","sourceRoot":"","sources":["../../../src/types/actions/outputs.ts"],"names":[],"mappings":"AA2IA;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;IACxC,wCAAwC;IACxC,QAAQ,EAAE,UAAU;IACpB,wEAAwE;IACxE,SAAS,EAAE,WAAW;IACtB,yCAAyC;IACzC,WAAW,EAAE,aAAa;CACpB,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TypeOf, z } from "zod";
|
|
2
|
-
import type {
|
|
2
|
+
import type { SupportedBridgeProvider, SupportedChain } from "../../../utils/constants.js";
|
|
3
3
|
export type BridgeActionInputSchema = z.ZodObject<{
|
|
4
4
|
fromAddress: z.ZodString;
|
|
5
5
|
fromChain: z.ZodEnum<[SupportedChain, ...SupportedChain[]]>;
|
|
@@ -9,7 +9,7 @@ export type BridgeActionInputSchema = z.ZodObject<{
|
|
|
9
9
|
toToken: z.ZodOptional<z.ZodString>;
|
|
10
10
|
toAddress: z.ZodOptional<z.ZodString>;
|
|
11
11
|
toAmount: z.ZodOptional<z.ZodString>;
|
|
12
|
-
protocol: z.ZodEnum<[
|
|
12
|
+
protocol: z.ZodEnum<[SupportedBridgeProvider, ...SupportedBridgeProvider[]]>;
|
|
13
13
|
}>;
|
|
14
14
|
export type BridgeActionInput = TypeOf<BridgeActionInputSchema>;
|
|
15
15
|
//# sourceMappingURL=bridgeAction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridgeAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/bridgeAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"bridgeAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/bridgeAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE3F,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,SAAS,CAAC;IAC9C,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC,CAAC,CAAC;IAC5D,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC;IACvB,UAAU,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACvC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC,CAAC,CAAC;IAC1D,OAAO,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACpC,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACtC,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACrC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,uBAAuB,EAAE,GAAG,uBAAuB,EAAE,CAAC,CAAC,CAAC;CAChF,CAAC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { TypeOf, z } from "zod";
|
|
2
|
+
import type { NamingSystem } from "../../../utils/constants.js";
|
|
2
3
|
export type ResolveNameActionInputSchema = z.ZodObject<{
|
|
3
4
|
name: z.ZodString;
|
|
5
|
+
protocol: z.ZodEnum<[NamingSystem, ...NamingSystem[]]>;
|
|
4
6
|
}>;
|
|
5
7
|
export type ResolveNameActionInput = TypeOf<ResolveNameActionInputSchema>;
|
|
6
8
|
//# sourceMappingURL=resolveNameAction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveNameAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/resolveNameAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAErC,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,SAAS,CAAC;IACnD,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"resolveNameAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/resolveNameAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,SAAS,CAAC;IACnD,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC;IAClB,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,GAAG,YAAY,EAAE,CAAC,CAAC,CAAC;CAC1D,CAAC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,4BAA4B,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TypeOf, z } from "zod";
|
|
2
|
-
import type { SupportedChain,
|
|
2
|
+
import type { SupportedChain, SupportedSwapProvider } from "../../../utils/constants.js";
|
|
3
3
|
export type SwapActionInputSchema = z.ZodObject<{
|
|
4
4
|
fromAddress: z.ZodString;
|
|
5
5
|
chain: z.ZodEnum<[SupportedChain, ...SupportedChain[]]>;
|
|
@@ -8,7 +8,12 @@ export type SwapActionInputSchema = z.ZodObject<{
|
|
|
8
8
|
toToken: z.ZodOptional<z.ZodString>;
|
|
9
9
|
toAddress: z.ZodOptional<z.ZodString>;
|
|
10
10
|
toAmount: z.ZodOptional<z.ZodString>;
|
|
11
|
-
protocol: z.ZodEnum<[
|
|
11
|
+
protocol: z.ZodEnum<[SupportedSwapProvider, ...SupportedSwapProvider[]]>;
|
|
12
|
+
/**
|
|
13
|
+
* Optional slippage tolerance as a fraction (0–1, e.g. 0.005 = 0.5%). When omitted, each
|
|
14
|
+
* provider applies its own configured default.
|
|
15
|
+
*/
|
|
16
|
+
slippage: z.ZodOptional<z.ZodNumber>;
|
|
12
17
|
}>;
|
|
13
18
|
export type SwapActionInput = TypeOf<SwapActionInputSchema>;
|
|
14
19
|
//# sourceMappingURL=swapAction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swapAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/swapAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"swapAction.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/tools/swapAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,SAAS,CAAC;IAC5C,WAAW,EAAE,CAAC,CAAC,SAAS,CAAC;IACzB,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC,CAAC,CAAC;IACxD,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC;IACvB,UAAU,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACvC,OAAO,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACpC,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACtC,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACrC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,qBAAqB,EAAE,GAAG,qBAAqB,EAAE,CAAC,CAAC,CAAC;IACzE;;;OAGG;IACH,QAAQ,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;CACxC,CAAC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
export * from "./resolver.js";
|
|
2
|
-
export * from "./registry.js";
|
|
3
2
|
export * from "./failure.js";
|
|
4
|
-
export type * from "./serviceConfig.js";
|
|
5
|
-
export type * from "./resolveNameOutput.js";
|
|
6
|
-
export type * from "./namingServiceEntry.js";
|
|
7
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/nameResolution/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/nameResolution/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/nameResolution/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/nameResolution/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Address } from "viem";
|
|
2
|
-
import type { NamingSystem } from "../../utils/constants.js";
|
|
3
2
|
/**
|
|
4
3
|
* Status discriminator for {@link NameResolverOutcome}. Kept as a frozen
|
|
5
4
|
* const object (not a TS `enum`) so each value is a regular string literal:
|
|
@@ -15,9 +14,9 @@ export declare const NameResolverStatus: Readonly<{
|
|
|
15
14
|
}>;
|
|
16
15
|
export type NameResolverStatus = (typeof NameResolverStatus)[keyof typeof NameResolverStatus];
|
|
17
16
|
/**
|
|
18
|
-
* Verdict returned by a single
|
|
19
|
-
*
|
|
20
|
-
*
|
|
17
|
+
* Verdict returned by a single name resolver. Discriminated so callers can
|
|
18
|
+
* distinguish "I would resolve this but the name is missing" (`NOT_FOUND`)
|
|
19
|
+
* from "this is not my naming system" (`NOT_APPLICABLE`).
|
|
21
20
|
*
|
|
22
21
|
* Infrastructure failures (RPC down, timeouts) propagate as thrown errors;
|
|
23
22
|
* they are NOT encoded as a status. Mixing them in the enum would force
|
|
@@ -31,23 +30,4 @@ export type NameResolverOutcome = {
|
|
|
31
30
|
} | {
|
|
32
31
|
status: typeof NameResolverStatus.NOT_APPLICABLE;
|
|
33
32
|
};
|
|
34
|
-
/**
|
|
35
|
-
* Pluggable resolver for one public naming service (ENS, Basenames, etc.).
|
|
36
|
-
*
|
|
37
|
-
* A resolver has one job: given a name, return a verdict. Format-matching
|
|
38
|
-
* is encapsulated inside `resolve` and is expected to short-circuit cheaply
|
|
39
|
-
* (sync regex / Zod schema) before any I/O.
|
|
40
|
-
*/
|
|
41
|
-
export interface INameResolver {
|
|
42
|
-
/** Identifier for this resolver — used by the registry for telemetry and error messages. */
|
|
43
|
-
readonly system: NamingSystem;
|
|
44
|
-
/**
|
|
45
|
-
* Returns a verdict for the given name.
|
|
46
|
-
*
|
|
47
|
-
* @throws When the underlying lookup infrastructure fails (RPC timeout,
|
|
48
|
-
* network error). The registry/policy decides how to surface the
|
|
49
|
-
* failure.
|
|
50
|
-
*/
|
|
51
|
-
resolve(name: string): Promise<NameResolverOutcome>;
|
|
52
|
-
}
|
|
53
33
|
//# sourceMappingURL=resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../src/types/nameResolution/resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC
|
|
1
|
+
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../src/types/nameResolution/resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;IAC3B,uDAAuD;;IAEvD,+DAA+D;;IAE/D,6EAA6E;;EAEtE,CAAC;AAEZ,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,OAAO,kBAAkB,CAAC,CAAC;AAE9F;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GACzB;IAAE,MAAM,EAAE,OAAO,kBAAkB,CAAC,QAAQ,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAChE;IAAE,MAAM,EAAE,OAAO,kBAAkB,CAAC,SAAS,CAAA;CAAE,GAC/C;IAAE,MAAM,EAAE,OAAO,kBAAkB,CAAC,cAAc,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../../src/types/nameResolution/resolver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolver.js","sourceRoot":"","sources":["../../../src/types/nameResolution/resolver.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5C,uDAAuD;IACvD,QAAQ,EAAE,UAAU;IACpB,+DAA+D;IAC/D,SAAS,EAAE,WAAW;IACtB,6EAA6E;IAC7E,cAAc,EAAE,gBAAgB;CAC1B,CAAC,CAAC"}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
export declare const LENDING_PROVIDERS: readonly ["aave"];
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const SUPPORTED_SWAP_PROVIDERS: readonly ["lifi", "aerodrome"];
|
|
3
|
+
export declare const SUPPORTED_BRIDGE_PROVIDERS: readonly ["lifi"];
|
|
4
|
+
/**
|
|
5
|
+
* Union of swap and bridge providers. Kept for cross-cutting consumers that do not
|
|
6
|
+
* distinguish the action — the execution-checker registry, the autorouter routing
|
|
7
|
+
* config, and the MCP capabilities resource. Per-action input validation should use
|
|
8
|
+
* {@link SUPPORTED_SWAP_PROVIDERS} / {@link SUPPORTED_BRIDGE_PROVIDERS} instead so a
|
|
9
|
+
* swap-only provider (e.g. aerodrome) is not offered for bridges.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SWAP_BRIDGE_PROVIDERS: readonly ["lifi", "aerodrome"];
|
|
3
12
|
export declare const EXCHANGE_RATE_PROVIDERS: readonly ["coinMarketCap", "duneSim", "coingecko"];
|
|
4
13
|
export declare const PREDICTION_MARKET_PROVIDERS: readonly ["polymarket"];
|
|
5
14
|
/**
|
|
@@ -63,6 +72,8 @@ export type SupportedAction = (typeof SUPPORTED_ACTIONS)[number];
|
|
|
63
72
|
export type ContactToolNameKey = keyof typeof CONTACT_TOOL_NAMES;
|
|
64
73
|
export type ContactToolName = (typeof CONTACT_TOOL_NAMES)[ContactToolNameKey];
|
|
65
74
|
export type SupportedLendingProvider = (typeof LENDING_PROVIDERS)[number];
|
|
75
|
+
export type SupportedSwapProvider = (typeof SUPPORTED_SWAP_PROVIDERS)[number];
|
|
76
|
+
export type SupportedBridgeProvider = (typeof SUPPORTED_BRIDGE_PROVIDERS)[number];
|
|
66
77
|
export type SupportedSwapBridgeProvider = (typeof SWAP_BRIDGE_PROVIDERS)[number];
|
|
67
78
|
export type SupportedWalletBalanceProvider = (typeof SUPPORTED_WALLET_BALANCE_PROVIDERS)[number];
|
|
68
79
|
export type SupportedExchangeRateProvider = (typeof EXCHANGE_RATE_PROVIDERS)[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,mBAAmC,CAAC;AAElE,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB,mBAAmC,CAAC;AAElE,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;;;;;;;;;;;;;;;;;;;;;EAQsB,CAAC;AAE7D,0BAA0B;AAC1B,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC9E,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;AAC1D,MAAM,MAAM,cAAc,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAE1D,4CAA4C;AAC5C,eAAO,MAAM,mBAAmB,EAAE,gBAAgB,EAA+C,CAAC;AA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AO,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,4eAoB9B,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,5 +1,14 @@
|
|
|
1
1
|
export const LENDING_PROVIDERS = Object.freeze(["aave"]);
|
|
2
|
-
export const
|
|
2
|
+
export const SUPPORTED_SWAP_PROVIDERS = Object.freeze(["lifi", "aerodrome"]);
|
|
3
|
+
export const SUPPORTED_BRIDGE_PROVIDERS = Object.freeze(["lifi"]);
|
|
4
|
+
/**
|
|
5
|
+
* Union of swap and bridge providers. Kept for cross-cutting consumers that do not
|
|
6
|
+
* distinguish the action — the execution-checker registry, the autorouter routing
|
|
7
|
+
* config, and the MCP capabilities resource. Per-action input validation should use
|
|
8
|
+
* {@link SUPPORTED_SWAP_PROVIDERS} / {@link SUPPORTED_BRIDGE_PROVIDERS} instead so a
|
|
9
|
+
* swap-only provider (e.g. aerodrome) is not offered for bridges.
|
|
10
|
+
*/
|
|
11
|
+
export const SWAP_BRIDGE_PROVIDERS = Object.freeze(["lifi", "aerodrome"]);
|
|
3
12
|
export const EXCHANGE_RATE_PROVIDERS = Object.freeze([
|
|
4
13
|
"coinMarketCap",
|
|
5
14
|
"duneSim",
|
|
@@ -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;AAElE,MAAM,CAAC,MAAM,qBAAqB,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,CAAU,CAAC,CAAC;AAElE,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,WAAW,CAAU,CAAC,CAAC;AAEtF,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAU,CAAC,CAAC;AAE3E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,WAAW,CAAU,CAAC,CAAC;AAEnF,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC;IACjD,eAAe;IACf,SAAS;IACT,WAAW;CACL,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,YAAY,CAAU,CAAC,CAAC;AAElF;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACrC,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE;IAC3B,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI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AgB;CAC3B,CAAC,CAAC;AAEZ,MAAM,CAAC,MAAM,kCAAkC,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5D,SAAS;IACT,YAAY;IACZ,SAAS;CACH,CAAC,CAAC;AAcZ,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC3C,MAAM;IACN,QAAQ;IACR,YAAY;IACZ,cAAc;CACR,CAAC,CAAC;AAWZ;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAU,CAAC;AAO3E;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACvC,6BAA6B;IAC7B,uBAAuB;IACvB,cAAc;IACd,gCAAgC;IAChC,mBAAmB;IACnB,6BAA6B;IAC7B,+BAA+B;IAC/B,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,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Human-readable description of a supported naming service for the system
|
|
3
|
-
* prompt.
|
|
4
|
-
*
|
|
5
|
-
* Kept structural so consumers can add new entries without depending on the
|
|
6
|
-
* closed `NamingSystem` union — the prompt renderer accepts any id and
|
|
7
|
-
* silently skips unknown systems.
|
|
8
|
-
*/
|
|
9
|
-
export type NamingServiceEntry = {
|
|
10
|
-
/** Short identifier (matches `INameResolver.system`, e.g., "ens"). */
|
|
11
|
-
id: string;
|
|
12
|
-
/** Human-readable name (e.g., "ENS"). */
|
|
13
|
-
label: string;
|
|
14
|
-
/** Suffix or pattern users will type (e.g., ".eth"). */
|
|
15
|
-
suffix: string;
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=namingServiceEntry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"namingServiceEntry.d.ts","sourceRoot":"","sources":["../../../src/types/nameResolution/namingServiceEntry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,sEAAsE;IACtE,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"namingServiceEntry.js","sourceRoot":"","sources":["../../../src/types/nameResolution/namingServiceEntry.ts"],"names":[],"mappings":""}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { Address } from "viem";
|
|
2
|
-
import type { NamingSystem } from "../../utils/constants.js";
|
|
3
|
-
/**
|
|
4
|
-
* Status discriminator for {@link RegistryOutcome}. Same const-object pattern
|
|
5
|
-
* as `NameResolverStatus`: compile-time exhaustiveness, no enum overhead.
|
|
6
|
-
*/
|
|
7
|
-
export declare const RegistryStatus: Readonly<{
|
|
8
|
-
/** One resolver returned an address. */
|
|
9
|
-
readonly RESOLVED: "RESOLVED";
|
|
10
|
-
/** ≥1 resolver claimed the format but the name does not exist there. */
|
|
11
|
-
readonly NOT_FOUND: "NOT_FOUND";
|
|
12
|
-
/** No resolver recognized the format. */
|
|
13
|
-
readonly UNSUPPORTED: "UNSUPPORTED";
|
|
14
|
-
}>;
|
|
15
|
-
export type RegistryStatus = (typeof RegistryStatus)[keyof typeof RegistryStatus];
|
|
16
|
-
/**
|
|
17
|
-
* Aggregate verdict produced by a name resolver registry's `resolveAny`
|
|
18
|
-
* method.
|
|
19
|
-
*
|
|
20
|
-
* The split between `NOT_FOUND` and `UNSUPPORTED` lets the caller emit
|
|
21
|
-
* specific user-facing messages: typo on a known service vs. unknown service
|
|
22
|
-
* entirely.
|
|
23
|
-
*/
|
|
24
|
-
export type RegistryOutcome = {
|
|
25
|
-
status: typeof RegistryStatus.RESOLVED;
|
|
26
|
-
address: Address;
|
|
27
|
-
system: NamingSystem;
|
|
28
|
-
} | {
|
|
29
|
-
status: typeof RegistryStatus.NOT_FOUND;
|
|
30
|
-
attemptedSystems: NamingSystem[];
|
|
31
|
-
} | {
|
|
32
|
-
status: typeof RegistryStatus.UNSUPPORTED;
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/types/nameResolution/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,cAAc;IACvB,wCAAwC;;IAExC,wEAAwE;;IAExE,yCAAyC;;EAElC,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAElF;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GACrB;IAAE,MAAM,EAAE,OAAO,cAAc,CAAC,QAAQ,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,GAClF;IAAE,MAAM,EAAE,OAAO,cAAc,CAAC,SAAS,CAAC;IAAC,gBAAgB,EAAE,YAAY,EAAE,CAAA;CAAE,GAC7E;IAAE,MAAM,EAAE,OAAO,cAAc,CAAC,WAAW,CAAA;CAAE,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Status discriminator for {@link RegistryOutcome}. Same const-object pattern
|
|
3
|
-
* as `NameResolverStatus`: compile-time exhaustiveness, no enum overhead.
|
|
4
|
-
*/
|
|
5
|
-
export const RegistryStatus = Object.freeze({
|
|
6
|
-
/** One resolver returned an address. */
|
|
7
|
-
RESOLVED: "RESOLVED",
|
|
8
|
-
/** ≥1 resolver claimed the format but the name does not exist there. */
|
|
9
|
-
NOT_FOUND: "NOT_FOUND",
|
|
10
|
-
/** No resolver recognized the format. */
|
|
11
|
-
UNSUPPORTED: "UNSUPPORTED",
|
|
12
|
-
});
|
|
13
|
-
//# sourceMappingURL=registry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/types/nameResolution/registry.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;IACxC,wCAAwC;IACxC,QAAQ,EAAE,UAAU;IACpB,wEAAwE;IACxE,SAAS,EAAE,WAAW;IACtB,yCAAyC;IACzC,WAAW,EAAE,aAAa;CACpB,CAAC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { NamingSystem } from "../../utils/constants.js";
|
|
2
|
-
/**
|
|
3
|
-
* Output payload returned to the LLM by the `resolveName` action.
|
|
4
|
-
*
|
|
5
|
-
* `resolution: null` means no supported naming service matched the input
|
|
6
|
-
* (either the format is unknown, the name does not exist, or the resolver
|
|
7
|
-
* failed). The LLM is instructed in the tool description to NOT proceed
|
|
8
|
-
* with a send when this is null.
|
|
9
|
-
*
|
|
10
|
-
* The non-null branch carries the system that produced the match (`ens`,
|
|
11
|
-
* etc.) so the LLM can mention it back to the user when summarizing.
|
|
12
|
-
*/
|
|
13
|
-
export type ResolveNameOutput = {
|
|
14
|
-
resolution: {
|
|
15
|
-
name: string;
|
|
16
|
-
address: string;
|
|
17
|
-
system: NamingSystem;
|
|
18
|
-
} | null;
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=resolveNameOutput.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveNameOutput.d.ts","sourceRoot":"","sources":["../../../src/types/nameResolution/resolveNameOutput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC5B,UAAU,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,YAAY,CAAC;KACxB,GAAG,IAAI,CAAC;CACZ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveNameOutput.js","sourceRoot":"","sources":["../../../src/types/nameResolution/resolveNameOutput.ts"],"names":[],"mappings":""}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { Address } from "viem";
|
|
2
|
-
import type { z } from "zod";
|
|
3
|
-
import type { NamingSystem, SupportedChainId } from "../../utils/constants.js";
|
|
4
|
-
/**
|
|
5
|
-
* Declarative description of one ENS-compatible naming service.
|
|
6
|
-
*
|
|
7
|
-
* The pipeline reads this config at startup, looks up the right
|
|
8
|
-
* `PublicClient` for the configured `chainId`, and instantiates a single
|
|
9
|
-
* generic resolver implementation per entry. Adding Basenames / other
|
|
10
|
-
* ENS-compatible registries is a new entry in the configs array — no new
|
|
11
|
-
* resolver class.
|
|
12
|
-
*
|
|
13
|
-
* Naming services that are NOT ENS-compatible (e.g. Solana's SNS, where the
|
|
14
|
-
* on-chain shape differs) require their own resolver implementation but
|
|
15
|
-
* still share this config shape contract.
|
|
16
|
-
*/
|
|
17
|
-
export type NamingServiceConfig = {
|
|
18
|
-
/** Identifier surfaced to telemetry and prompt text. */
|
|
19
|
-
id: NamingSystem;
|
|
20
|
-
/**
|
|
21
|
-
* Chain on which the lookup runs. The startup wiring uses this to pick
|
|
22
|
-
* the matching `PublicClient`; if no client is configured for the chain,
|
|
23
|
-
* the service is skipped silently.
|
|
24
|
-
*/
|
|
25
|
-
chainId: SupportedChainId;
|
|
26
|
-
/** Suffix shown to users (e.g. `.eth`). Used for prompt rendering only. */
|
|
27
|
-
suffix: string;
|
|
28
|
-
/**
|
|
29
|
-
* Validation schema that matches names this service handles. Used as a
|
|
30
|
-
* cheap fast-fail before any RPC call. Lives here (rather than inside
|
|
31
|
-
* the resolver implementation) so the per-system regex stays alongside
|
|
32
|
-
* the other system metadata.
|
|
33
|
-
*/
|
|
34
|
-
nameSchema: z.ZodSchema<string>;
|
|
35
|
-
/**
|
|
36
|
-
* Optional override for viem's ENS universal resolver address. Required
|
|
37
|
-
* for ENS-compatible registries on non-mainnet chains (Basenames on
|
|
38
|
-
* Base, etc.); leave undefined for vanilla ENS on mainnet.
|
|
39
|
-
*/
|
|
40
|
-
universalResolverAddress?: Address;
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=serviceConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serviceConfig.d.ts","sourceRoot":"","sources":["../../../src/types/nameResolution/serviceConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE/E;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAC9B,wDAAwD;IACxD,EAAE,EAAE,YAAY,CAAC;IACjB;;;;OAIG;IACH,OAAO,EAAE,gBAAgB,CAAC;IAC1B,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,UAAU,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACtC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"serviceConfig.js","sourceRoot":"","sources":["../../../src/types/nameResolution/serviceConfig.ts"],"names":[],"mappings":""}
|