@rhinestone/sdk 1.4.2 → 2.0.0-beta.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/README.md +89 -1
- package/dist/src/accounts/error.d.ts +1 -1
- package/dist/src/accounts/error.js +1 -19
- package/dist/src/accounts/index.d.ts +5 -5
- package/dist/src/accounts/index.js +121 -157
- package/dist/src/accounts/json-rpc/index.d.ts +1 -1
- package/dist/src/accounts/json-rpc/index.js +8 -10
- package/dist/src/accounts/json-rpc/providers.d.ts +1 -1
- package/dist/src/accounts/json-rpc/providers.js +4 -7
- package/dist/src/accounts/kernel.d.ts +3 -3
- package/dist/src/accounts/kernel.js +66 -75
- package/dist/src/accounts/nexus.d.ts +3 -3
- package/dist/src/accounts/nexus.js +62 -73
- package/dist/src/accounts/passport.d.ts +3 -3
- package/dist/src/accounts/passport.js +9 -13
- package/dist/src/accounts/safe.d.ts +3 -3
- package/dist/src/accounts/safe.js +54 -63
- package/dist/src/accounts/signing/common.d.ts +10 -4
- package/dist/src/accounts/signing/common.d.ts.map +1 -1
- package/dist/src/accounts/signing/common.js +30 -36
- package/dist/src/accounts/signing/message.d.ts +2 -2
- package/dist/src/accounts/signing/message.js +10 -12
- package/dist/src/accounts/signing/passkeys.js +11 -17
- package/dist/src/accounts/signing/typedData.d.ts +1 -1
- package/dist/src/accounts/signing/typedData.js +6 -8
- package/dist/src/accounts/startale.d.ts +3 -3
- package/dist/src/accounts/startale.js +37 -47
- package/dist/src/accounts/utils.d.ts +2 -2
- package/dist/src/accounts/utils.js +22 -28
- package/dist/src/accounts/walletClient.js +4 -8
- package/dist/src/actions/compact.d.ts +1 -1
- package/dist/src/actions/compact.js +22 -35
- package/dist/src/actions/deployment.d.ts +1 -1
- package/dist/src/actions/deployment.js +11 -13
- package/dist/src/actions/ecdsa.d.ts +1 -1
- package/dist/src/actions/ecdsa.js +14 -20
- package/dist/src/actions/index.d.ts +2 -2
- package/dist/src/actions/index.js +6 -10
- package/dist/src/actions/mfa.d.ts +1 -1
- package/dist/src/actions/mfa.js +18 -24
- package/dist/src/actions/passkeys.d.ts +2 -2
- package/dist/src/actions/passkeys.js +14 -20
- package/dist/src/actions/recovery.d.ts +1 -1
- package/dist/src/actions/recovery.js +25 -29
- package/dist/src/actions/smart-sessions.d.ts +1 -1
- package/dist/src/actions/smart-sessions.js +8 -12
- package/dist/src/auth/provider.d.ts +7 -0
- package/dist/src/auth/provider.d.ts.map +1 -0
- package/dist/src/auth/provider.js +38 -0
- package/dist/src/errors/index.d.ts +3 -3
- package/dist/src/errors/index.js +10 -54
- package/dist/src/execution/compact.d.ts +3 -3
- package/dist/src/execution/compact.js +10 -18
- package/dist/src/execution/error.js +1 -11
- package/dist/src/execution/index.d.ts +9 -8
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +54 -67
- package/dist/src/execution/permit2.d.ts +5 -5
- package/dist/src/execution/permit2.js +8 -13
- package/dist/src/execution/singleChainOps.d.ts +2 -2
- package/dist/src/execution/singleChainOps.js +1 -3
- package/dist/src/execution/types.d.ts +1 -1
- package/dist/src/execution/types.js +1 -2
- package/dist/src/execution/utils.d.ts +10 -6
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +159 -162
- package/dist/src/index.d.ts +10 -10
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +57 -67
- package/dist/src/jwt-server/digest.d.ts +11 -0
- package/dist/src/jwt-server/digest.d.ts.map +1 -0
- package/dist/src/jwt-server/digest.js +19 -0
- package/dist/src/jwt-server/express.d.ts +16 -0
- package/dist/src/jwt-server/express.d.ts.map +1 -0
- package/dist/src/jwt-server/express.js +23 -0
- package/dist/src/jwt-server/handlers.d.ts +10 -0
- package/dist/src/jwt-server/handlers.d.ts.map +1 -0
- package/dist/src/jwt-server/handlers.js +37 -0
- package/dist/src/jwt-server/index.d.ts +8 -0
- package/dist/src/jwt-server/index.d.ts.map +1 -0
- package/dist/src/jwt-server/index.js +7 -0
- package/dist/src/jwt-server/jcs.d.ts +12 -0
- package/dist/src/jwt-server/jcs.d.ts.map +1 -0
- package/dist/src/jwt-server/jcs.js +57 -0
- package/dist/src/jwt-server/signer.d.ts +18 -0
- package/dist/src/jwt-server/signer.d.ts.map +1 -0
- package/dist/src/jwt-server/signer.js +68 -0
- package/dist/src/jwt-server/sponsorship.d.ts +19 -0
- package/dist/src/jwt-server/sponsorship.d.ts.map +1 -0
- package/dist/src/jwt-server/sponsorship.js +51 -0
- package/dist/src/jwt-server/web.d.ts +4 -0
- package/dist/src/jwt-server/web.d.ts.map +1 -0
- package/dist/src/jwt-server/web.js +23 -0
- package/dist/src/modules/abi/smart-session-emissary.js +1 -3
- package/dist/src/modules/abi/smart-sessions.js +1 -4
- package/dist/src/modules/chain-abstraction.js +1 -5
- package/dist/src/modules/common.d.ts +1 -1
- package/dist/src/modules/common.js +1 -13
- package/dist/src/modules/index.d.ts +5 -5
- package/dist/src/modules/index.js +35 -50
- package/dist/src/modules/legacy.d.ts +2 -2
- package/dist/src/modules/legacy.js +11 -14
- package/dist/src/modules/read.d.ts +1 -1
- package/dist/src/modules/read.js +11 -15
- package/dist/src/modules/validators/core.d.ts +2 -2
- package/dist/src/modules/validators/core.js +26 -44
- package/dist/src/modules/validators/index.d.ts +2 -2
- package/dist/src/modules/validators/index.js +3 -19
- package/dist/src/modules/validators/policies/claim/permit2.d.ts +1 -1
- package/dist/src/modules/validators/policies/claim/permit2.js +39 -44
- package/dist/src/modules/validators/policies/claim/types.js +11 -14
- package/dist/src/modules/validators/smart-sessions.d.ts +4 -4
- package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
- package/dist/src/modules/validators/smart-sessions.js +77 -97
- package/dist/src/orchestrator/client.d.ts +10 -5
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/client.js +73 -66
- package/dist/src/orchestrator/consts.d.ts +1 -1
- package/dist/src/orchestrator/consts.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.js +2 -8
- package/dist/src/orchestrator/error.js +1 -33
- package/dist/src/orchestrator/index.d.ts +8 -7
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/orchestrator/index.js +8 -57
- package/dist/src/orchestrator/registry.d.ts +2 -2
- package/dist/src/orchestrator/registry.js +19 -33
- package/dist/src/orchestrator/types.d.ts +5 -1
- package/dist/src/orchestrator/types.d.ts.map +1 -1
- package/dist/src/orchestrator/types.js +1 -17
- package/dist/src/orchestrator/utils.js +1 -3
- package/dist/src/types.d.ts +29 -5
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +1 -2
- package/dist/src/utils/index.d.ts +2 -2
- package/dist/src/utils/index.js +9 -15
- package/package.json +29 -98
- package/dist/src/accounts/index.test.d.ts +0 -2
- package/dist/src/accounts/index.test.d.ts.map +0 -1
- package/dist/src/accounts/index.test.js +0 -33
- package/dist/src/accounts/json-rpc/index.test.d.ts +0 -2
- package/dist/src/accounts/json-rpc/index.test.d.ts.map +0 -1
- package/dist/src/accounts/json-rpc/index.test.js +0 -35
- package/dist/src/accounts/json-rpc/providers.test.d.ts +0 -2
- package/dist/src/accounts/json-rpc/providers.test.d.ts.map +0 -1
- package/dist/src/accounts/json-rpc/providers.test.js +0 -43
- package/dist/src/accounts/kernel.test.d.ts +0 -2
- package/dist/src/accounts/kernel.test.d.ts.map +0 -1
- package/dist/src/accounts/kernel.test.js +0 -132
- package/dist/src/accounts/nexus.test.d.ts +0 -2
- package/dist/src/accounts/nexus.test.d.ts.map +0 -1
- package/dist/src/accounts/nexus.test.js +0 -118
- package/dist/src/accounts/safe.test.d.ts +0 -2
- package/dist/src/accounts/safe.test.d.ts.map +0 -1
- package/dist/src/accounts/safe.test.js +0 -168
- package/dist/src/accounts/signing/passkeys.test.d.ts +0 -2
- package/dist/src/accounts/signing/passkeys.test.d.ts.map +0 -1
- package/dist/src/accounts/signing/passkeys.test.js +0 -88
- package/dist/src/accounts/startale.test.d.ts +0 -2
- package/dist/src/accounts/startale.test.d.ts.map +0 -1
- package/dist/src/accounts/startale.test.js +0 -189
- package/dist/src/accounts/utils.test.d.ts +0 -2
- package/dist/src/accounts/utils.test.d.ts.map +0 -1
- package/dist/src/accounts/utils.test.js +0 -49
- package/dist/src/actions/ecdsa.test.d.ts +0 -2
- package/dist/src/actions/ecdsa.test.d.ts.map +0 -1
- package/dist/src/actions/ecdsa.test.js +0 -99
- package/dist/src/actions/passkeys.test.d.ts +0 -2
- package/dist/src/actions/passkeys.test.d.ts.map +0 -1
- package/dist/src/actions/passkeys.test.js +0 -54
- package/dist/src/actions/recovery.test.d.ts +0 -2
- package/dist/src/actions/recovery.test.d.ts.map +0 -1
- package/dist/src/actions/recovery.test.js +0 -168
- package/dist/src/execution/signing.test.d.ts +0 -2
- package/dist/src/execution/signing.test.d.ts.map +0 -1
- package/dist/src/execution/signing.test.js +0 -465
- package/dist/src/execution/utils.test.d.ts +0 -2
- package/dist/src/execution/utils.test.d.ts.map +0 -1
- package/dist/src/execution/utils.test.js +0 -388
- package/dist/src/modules/index.test.d.ts +0 -2
- package/dist/src/modules/index.test.d.ts.map +0 -1
- package/dist/src/modules/index.test.js +0 -81
- package/dist/src/modules/validators/core.test.d.ts +0 -2
- package/dist/src/modules/validators/core.test.d.ts.map +0 -1
- package/dist/src/modules/validators/core.test.js +0 -101
- package/dist/src/modules/validators/policies/claim/permit2.test.d.ts +0 -2
- package/dist/src/modules/validators/policies/claim/permit2.test.d.ts.map +0 -1
- package/dist/src/modules/validators/policies/claim/permit2.test.js +0 -519
- package/dist/src/modules/validators/smart-sessions.test.d.ts +0 -2
- package/dist/src/modules/validators/smart-sessions.test.d.ts.map +0 -1
- package/dist/src/modules/validators/smart-sessions.test.js +0 -311
- package/dist/src/orchestrator/registry.test.d.ts +0 -2
- package/dist/src/orchestrator/registry.test.d.ts.map +0 -1
- package/dist/src/orchestrator/registry.test.js +0 -154
- package/dist/src/utils/index.test.d.ts +0 -2
- package/dist/src/utils/index.test.d.ts.map +0 -1
- package/dist/src/utils/index.test.js +0 -42
- package/dist/test/consts.d.ts +0 -10
- package/dist/test/consts.d.ts.map +0 -1
- package/dist/test/consts.js +0 -22
- package/dist/test/utils/utils.d.ts +0 -5
- package/dist/test/utils/utils.d.ts.map +0 -1
- package/dist/test/utils/utils.js +0 -20
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const consts_1 = require("./consts");
|
|
5
|
-
const error_1 = require("./error");
|
|
6
|
-
const utils_1 = require("./utils");
|
|
1
|
+
import { API_VERSION, SDK_VERSION } from './consts.js';
|
|
2
|
+
import { AuthenticationRequiredError, BadRequestError, BodyParserError, ConflictError, ForbiddenError, InsufficientBalanceError, InsufficientLiquidityError, IntentNotFoundError, InternalServerError, InvalidApiKeyError, InvalidIntentSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, RateLimitedError, ResourceNotFoundError, ServiceUnavailableError, SimulationFailedError, TokenNotSupportedError, UnauthorizedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, } from './error.js';
|
|
3
|
+
import { convertBigIntFields } from './utils.js';
|
|
7
4
|
function parseTokenAmountsRecord(record) {
|
|
8
5
|
return Object.fromEntries(Object.entries(record).map(([addr, amount]) => [
|
|
9
6
|
addr,
|
|
10
7
|
BigInt(amount),
|
|
11
8
|
]));
|
|
12
9
|
}
|
|
13
|
-
class Orchestrator {
|
|
10
|
+
export class Orchestrator {
|
|
14
11
|
serverUrl;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
constructor(serverUrl,
|
|
12
|
+
authProvider;
|
|
13
|
+
extraHeaders;
|
|
14
|
+
constructor(serverUrl, authProvider, headers) {
|
|
18
15
|
this.serverUrl = serverUrl;
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
16
|
+
this.authProvider = authProvider;
|
|
17
|
+
this.extraHeaders = headers;
|
|
21
18
|
}
|
|
22
19
|
async getPortfolio(userAddress, filter) {
|
|
23
20
|
const params = new URLSearchParams();
|
|
@@ -32,7 +29,7 @@ class Orchestrator {
|
|
|
32
29
|
const url = new URL(`${this.serverUrl}/accounts/${userAddress}/portfolio`);
|
|
33
30
|
url.search = params.toString();
|
|
34
31
|
const json = await this.fetch(url.toString(), {
|
|
35
|
-
headers: this.getHeaders(),
|
|
32
|
+
headers: await this.getHeaders(),
|
|
36
33
|
});
|
|
37
34
|
const portfolioResponse = json.portfolio;
|
|
38
35
|
const portfolio = portfolioResponse.map((tokenResponse) => ({
|
|
@@ -52,18 +49,18 @@ class Orchestrator {
|
|
|
52
49
|
return portfolio;
|
|
53
50
|
}
|
|
54
51
|
async getIntentRoute(input) {
|
|
55
|
-
const body =
|
|
52
|
+
const body = convertBigIntFields(input);
|
|
56
53
|
return await this.fetch(`${this.serverUrl}/intents/route`, {
|
|
57
54
|
method: 'POST',
|
|
58
|
-
headers: this.getHeaders(),
|
|
55
|
+
headers: await this.getHeaders(),
|
|
59
56
|
body: JSON.stringify(body),
|
|
60
57
|
});
|
|
61
58
|
}
|
|
62
59
|
async splitIntents(input) {
|
|
63
60
|
const response = await fetch(`${this.serverUrl}/intents/split`, {
|
|
64
61
|
method: 'POST',
|
|
65
|
-
headers: this.getHeaders(),
|
|
66
|
-
body: JSON.stringify(
|
|
62
|
+
headers: await this.getHeaders(),
|
|
63
|
+
body: JSON.stringify(convertBigIntFields({
|
|
67
64
|
chainId: input.chain.id,
|
|
68
65
|
tokens: input.tokens,
|
|
69
66
|
settlementLayers: input.settlementLayers,
|
|
@@ -88,7 +85,7 @@ class Orchestrator {
|
|
|
88
85
|
}
|
|
89
86
|
if (response.status === 422 &&
|
|
90
87
|
errorData.error === 'INSUFFICIENT_LIQUIDITY') {
|
|
91
|
-
throw new
|
|
88
|
+
throw new InsufficientLiquidityError({
|
|
92
89
|
availableIntents: errorData.availableIntents.map(parseTokenAmountsRecord),
|
|
93
90
|
unfillable: parseTokenAmountsRecord(errorData.unfillable),
|
|
94
91
|
traceId: errorData.traceId,
|
|
@@ -102,37 +99,48 @@ class Orchestrator {
|
|
|
102
99
|
headers: {},
|
|
103
100
|
},
|
|
104
101
|
});
|
|
105
|
-
throw new
|
|
102
|
+
throw new OrchestratorError({ message: 'Unexpected error' });
|
|
106
103
|
}
|
|
107
|
-
async submitIntent(signedIntentOpUnformatted, dryRun) {
|
|
108
|
-
const signedIntentOp =
|
|
104
|
+
async submitIntent(signedIntentOpUnformatted, dryRun, policyContext) {
|
|
105
|
+
const signedIntentOp = convertBigIntFields(signedIntentOpUnformatted);
|
|
109
106
|
if (dryRun) {
|
|
110
107
|
signedIntentOp.options = {
|
|
111
108
|
dryRun: true,
|
|
112
109
|
};
|
|
113
110
|
}
|
|
114
111
|
const body = { signedIntentOp };
|
|
112
|
+
const headers = policyContext
|
|
113
|
+
? await this.getSubmitHeaders(policyContext.intentInput, policyContext.isSponsored)
|
|
114
|
+
: await this.getHeaders();
|
|
115
115
|
return await this.fetch(`${this.serverUrl}/intent-operations`, {
|
|
116
116
|
method: 'POST',
|
|
117
|
-
headers
|
|
117
|
+
headers,
|
|
118
118
|
body: JSON.stringify(body),
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
async getIntentOpStatus(intentId) {
|
|
122
122
|
return await this.fetch(`${this.serverUrl}/intent-operation/${intentId.toString()}`, {
|
|
123
|
-
headers: this.getHeaders(),
|
|
123
|
+
headers: await this.getHeaders(),
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
getHeaders() {
|
|
127
|
-
const
|
|
126
|
+
async getHeaders() {
|
|
127
|
+
const auth = await this.authProvider.getHeaders();
|
|
128
|
+
return {
|
|
128
129
|
'Content-Type': 'application/json',
|
|
129
|
-
'x-sdk-version':
|
|
130
|
-
'x-api-version':
|
|
130
|
+
'x-sdk-version': SDK_VERSION,
|
|
131
|
+
'x-api-version': API_VERSION,
|
|
132
|
+
...auth,
|
|
133
|
+
...this.extraHeaders,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
async getSubmitHeaders(intentInput, isSponsored) {
|
|
137
|
+
const auth = await this.authProvider.getSubmitHeaders(intentInput, isSponsored);
|
|
138
|
+
return {
|
|
139
|
+
'Content-Type': 'application/json',
|
|
140
|
+
'x-sdk-version': SDK_VERSION,
|
|
141
|
+
...auth,
|
|
142
|
+
...this.extraHeaders,
|
|
131
143
|
};
|
|
132
|
-
if (this.apiKey) {
|
|
133
|
-
headers['x-api-key'] = this.apiKey;
|
|
134
|
-
}
|
|
135
|
-
return { ...headers, ...this.headers };
|
|
136
144
|
}
|
|
137
145
|
async fetch(url, options) {
|
|
138
146
|
const response = await fetch(url, options);
|
|
@@ -207,13 +215,13 @@ class Orchestrator {
|
|
|
207
215
|
if (status === 429) {
|
|
208
216
|
const retryAfter = headers?.retryAfter;
|
|
209
217
|
const context = { traceId, retryAfter };
|
|
210
|
-
throw new
|
|
218
|
+
throw new RateLimitedError({
|
|
211
219
|
...baseParams,
|
|
212
220
|
context,
|
|
213
221
|
});
|
|
214
222
|
}
|
|
215
223
|
if (status === 503) {
|
|
216
|
-
throw new
|
|
224
|
+
throw new ServiceUnavailableError(baseParams);
|
|
217
225
|
}
|
|
218
226
|
if (message) {
|
|
219
227
|
this.parseErrorMessage(message, baseParams);
|
|
@@ -227,36 +235,36 @@ class Orchestrator {
|
|
|
227
235
|
}
|
|
228
236
|
switch (status) {
|
|
229
237
|
case 400:
|
|
230
|
-
throw new
|
|
238
|
+
throw new BadRequestError({
|
|
231
239
|
...baseParams,
|
|
232
240
|
context: { traceId, errors },
|
|
233
241
|
message: message,
|
|
234
242
|
});
|
|
235
243
|
case 401:
|
|
236
244
|
if (message === 'Authentication is required') {
|
|
237
|
-
throw new
|
|
245
|
+
throw new AuthenticationRequiredError(baseParams);
|
|
238
246
|
}
|
|
239
|
-
throw new
|
|
247
|
+
throw new UnauthorizedError(baseParams);
|
|
240
248
|
case 403:
|
|
241
|
-
throw new
|
|
249
|
+
throw new ForbiddenError(baseParams);
|
|
242
250
|
case 404:
|
|
243
|
-
throw new
|
|
251
|
+
throw new ResourceNotFoundError(baseParams);
|
|
244
252
|
case 409:
|
|
245
|
-
throw new
|
|
253
|
+
throw new ConflictError(baseParams);
|
|
246
254
|
case 500:
|
|
247
255
|
if (errors && errors.length > 0) {
|
|
248
256
|
const mergedParams = {
|
|
249
257
|
...baseParams,
|
|
250
258
|
context: { ...errors[0].context, traceId },
|
|
251
259
|
};
|
|
252
|
-
throw new
|
|
260
|
+
throw new OrchestratorError({
|
|
253
261
|
...mergedParams,
|
|
254
262
|
message: errors[0].message || 'Internal Server Error',
|
|
255
263
|
});
|
|
256
264
|
}
|
|
257
|
-
throw new
|
|
265
|
+
throw new InternalServerError(baseParams);
|
|
258
266
|
default:
|
|
259
|
-
throw new
|
|
267
|
+
throw new OrchestratorError({
|
|
260
268
|
...baseParams,
|
|
261
269
|
message: message || errorType,
|
|
262
270
|
});
|
|
@@ -265,19 +273,19 @@ class Orchestrator {
|
|
|
265
273
|
}
|
|
266
274
|
parseErrorMessage(message, errorParams) {
|
|
267
275
|
if (message === 'Insufficient balance') {
|
|
268
|
-
throw new
|
|
276
|
+
throw new InsufficientBalanceError(errorParams);
|
|
269
277
|
}
|
|
270
278
|
else if (message === 'Unsupported chain id' ||
|
|
271
279
|
message === 'Unsupported chain ids') {
|
|
272
|
-
throw new
|
|
280
|
+
throw new UnsupportedChainIdError(errorParams);
|
|
273
281
|
}
|
|
274
282
|
else if (message.startsWith('Unsupported chain ')) {
|
|
275
283
|
const chainIdMatch = message.match(/Unsupported chain (\d+)/);
|
|
276
284
|
if (chainIdMatch) {
|
|
277
285
|
const chainId = parseInt(chainIdMatch[1], 10);
|
|
278
|
-
throw new
|
|
286
|
+
throw new UnsupportedChainError(chainId, errorParams);
|
|
279
287
|
}
|
|
280
|
-
throw new
|
|
288
|
+
throw new UnsupportedChainIdError(errorParams);
|
|
281
289
|
}
|
|
282
290
|
else if (message.includes('Unsupported token') &&
|
|
283
291
|
message.includes('for chain')) {
|
|
@@ -285,70 +293,70 @@ class Orchestrator {
|
|
|
285
293
|
if (tokenMatch) {
|
|
286
294
|
const tokenSymbol = tokenMatch[1];
|
|
287
295
|
const chainId = parseInt(tokenMatch[2], 10);
|
|
288
|
-
throw new
|
|
296
|
+
throw new UnsupportedTokenError(tokenSymbol, chainId, errorParams);
|
|
289
297
|
}
|
|
290
|
-
throw new
|
|
298
|
+
throw new OrchestratorError({ message, ...errorParams });
|
|
291
299
|
}
|
|
292
300
|
else if (message === 'Unsupported token addresses') {
|
|
293
301
|
// generic unsupported tokens without specific symbol/chain context
|
|
294
|
-
throw new
|
|
302
|
+
throw new BadRequestError({ message, ...errorParams });
|
|
295
303
|
}
|
|
296
304
|
else if (message.includes('not supported on chain')) {
|
|
297
305
|
const tokenMatch = message.match(/Token (.+) not supported on chain (\d+)/);
|
|
298
306
|
if (tokenMatch) {
|
|
299
307
|
const tokenAddress = tokenMatch[1];
|
|
300
308
|
const chainId = parseInt(tokenMatch[2], 10);
|
|
301
|
-
throw new
|
|
309
|
+
throw new TokenNotSupportedError(tokenAddress, chainId, errorParams);
|
|
302
310
|
}
|
|
303
|
-
throw new
|
|
311
|
+
throw new OrchestratorError({ message, ...errorParams });
|
|
304
312
|
}
|
|
305
313
|
else if (message === 'Authentication is required') {
|
|
306
|
-
throw new
|
|
314
|
+
throw new AuthenticationRequiredError(errorParams);
|
|
307
315
|
}
|
|
308
316
|
else if (message === 'Invalid API key') {
|
|
309
|
-
throw new
|
|
317
|
+
throw new InvalidApiKeyError(errorParams);
|
|
310
318
|
}
|
|
311
319
|
else if (message === 'Insufficient permissions') {
|
|
312
|
-
throw new
|
|
320
|
+
throw new ForbiddenError(errorParams);
|
|
313
321
|
}
|
|
314
322
|
else if (message === 'Invalid bundle signature') {
|
|
315
|
-
throw new
|
|
323
|
+
throw new InvalidIntentSignatureError(errorParams);
|
|
316
324
|
}
|
|
317
325
|
else if (message === 'Invalid checksum signature') {
|
|
318
|
-
throw new
|
|
326
|
+
throw new InvalidIntentSignatureError(errorParams);
|
|
319
327
|
}
|
|
320
328
|
else if (message === 'Only one target token amount can be unset' ||
|
|
321
329
|
message === 'Only one max-out transfer is allowed') {
|
|
322
|
-
throw new
|
|
330
|
+
throw new OnlyOneTargetTokenAmountCanBeUnsetError(errorParams);
|
|
323
331
|
}
|
|
324
332
|
else if (message === 'No valid settlement plan found for the given transfers' ||
|
|
325
333
|
message === 'No valid transfers sent for settlement quotes' ||
|
|
326
334
|
message === 'No Path Found') {
|
|
327
|
-
throw new
|
|
335
|
+
throw new NoPathFoundError(errorParams);
|
|
328
336
|
}
|
|
329
337
|
else if (message === 'Emissary is not enabled' ||
|
|
330
338
|
message === 'Emissary is not the expected address') {
|
|
331
|
-
throw new
|
|
339
|
+
throw new ForbiddenError(errorParams);
|
|
332
340
|
}
|
|
333
341
|
else if (message.includes('No such intent with nonce') ||
|
|
334
342
|
message === 'Order bundle not found') {
|
|
335
|
-
throw new
|
|
343
|
+
throw new IntentNotFoundError(errorParams);
|
|
336
344
|
}
|
|
337
345
|
else if (message === 'Could not retrieve a valid quote from any aggregator') {
|
|
338
|
-
throw new
|
|
346
|
+
throw new NoPathFoundError(errorParams);
|
|
339
347
|
}
|
|
340
348
|
else if (message === 'No aggregators available for swap') {
|
|
341
|
-
throw new
|
|
349
|
+
throw new InternalServerError(errorParams);
|
|
342
350
|
}
|
|
343
351
|
else if (message === 'entity.parse.failed' ||
|
|
344
352
|
message === 'entity.too.large' ||
|
|
345
353
|
message === 'encoding.unsupported') {
|
|
346
|
-
throw new
|
|
354
|
+
throw new BodyParserError({ message, ...errorParams });
|
|
347
355
|
}
|
|
348
356
|
else if (message === 'Bundle simulation failed') {
|
|
349
357
|
const simulations = errorParams.context.error.simulations;
|
|
350
358
|
const { traceId, errorType, statusCode, context } = errorParams;
|
|
351
|
-
throw new
|
|
359
|
+
throw new SimulationFailedError({
|
|
352
360
|
message,
|
|
353
361
|
context,
|
|
354
362
|
errorType,
|
|
@@ -358,8 +366,7 @@ class Orchestrator {
|
|
|
358
366
|
});
|
|
359
367
|
}
|
|
360
368
|
else {
|
|
361
|
-
throw new
|
|
369
|
+
throw new OrchestratorError({ message, ...errorParams });
|
|
362
370
|
}
|
|
363
371
|
}
|
|
364
372
|
}
|
|
365
|
-
exports.Orchestrator = Orchestrator;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const PROD_ORCHESTRATOR_URL = "https://v1.orchestrator.rhinestone.dev";
|
|
2
2
|
declare const RHINESTONE_SPOKE_POOL_ADDRESS = "0x000000000060f6e853447881951574cdd0663530";
|
|
3
|
-
declare const SDK_VERSION = "
|
|
3
|
+
declare const SDK_VERSION = "2.0.0-beta.0";
|
|
4
4
|
declare const API_VERSION = "2026-01.alps";
|
|
5
5
|
export { PROD_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS, SDK_VERSION, API_VERSION, };
|
|
6
6
|
//# sourceMappingURL=consts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../orchestrator/consts.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,qBAAqB,2CAA2C,CAAA;AACtE,QAAA,MAAM,6BAA6B,+CACW,CAAA;AAE9C,QAAA,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../orchestrator/consts.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,qBAAqB,2CAA2C,CAAA;AACtE,QAAA,MAAM,6BAA6B,+CACW,CAAA;AAE9C,QAAA,MAAM,WAAW,iBAAiB,CAAA;AAClC,QAAA,MAAM,WAAW,iBAAiB,CAAA;AAElC,OAAO,EACL,qBAAqB,EACrB,6BAA6B,EAC7B,WAAW,EACX,WAAW,GACZ,CAAA"}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_VERSION = exports.SDK_VERSION = exports.RHINESTONE_SPOKE_POOL_ADDRESS = exports.PROD_ORCHESTRATOR_URL = void 0;
|
|
4
1
|
const PROD_ORCHESTRATOR_URL = 'https://v1.orchestrator.rhinestone.dev';
|
|
5
|
-
exports.PROD_ORCHESTRATOR_URL = PROD_ORCHESTRATOR_URL;
|
|
6
2
|
const RHINESTONE_SPOKE_POOL_ADDRESS = '0x000000000060f6e853447881951574cdd0663530';
|
|
7
|
-
|
|
8
|
-
const SDK_VERSION = '1.4.2';
|
|
9
|
-
exports.SDK_VERSION = SDK_VERSION;
|
|
3
|
+
const SDK_VERSION = '2.0.0-beta.0';
|
|
10
4
|
const API_VERSION = '2026-01.alps';
|
|
11
|
-
|
|
5
|
+
export { PROD_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS, SDK_VERSION, API_VERSION, };
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SimulationFailedError = exports.BodyParserError = exports.InternalServerError = exports.UnprocessableEntityError = exports.BadRequestError = exports.ConflictError = exports.ResourceNotFoundError = exports.ForbiddenError = exports.UnauthorizedError = exports.ServiceUnavailableError = exports.RateLimitedError = exports.SchemaValidationError = exports.IntentNotFoundError = exports.NoPathFoundError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.InvalidIntentSignatureError = exports.InvalidApiKeyError = exports.AuthenticationRequiredError = exports.TokenNotSupportedError = exports.UnsupportedTokenError = exports.UnsupportedChainError = exports.UnsupportedChainIdError = exports.InsufficientBalanceError = exports.InsufficientLiquidityError = exports.OrchestratorError = void 0;
|
|
4
|
-
exports.isOrchestratorError = isOrchestratorError;
|
|
5
|
-
exports.isRetryable = isRetryable;
|
|
6
|
-
exports.isAuthError = isAuthError;
|
|
7
|
-
exports.isValidationError = isValidationError;
|
|
8
|
-
exports.isRateLimited = isRateLimited;
|
|
9
1
|
class OrchestratorError extends Error {
|
|
10
2
|
_message;
|
|
11
3
|
_context;
|
|
@@ -36,7 +28,6 @@ class OrchestratorError extends Error {
|
|
|
36
28
|
return this._statusCode;
|
|
37
29
|
}
|
|
38
30
|
}
|
|
39
|
-
exports.OrchestratorError = OrchestratorError;
|
|
40
31
|
class InsufficientBalanceError extends OrchestratorError {
|
|
41
32
|
constructor(params) {
|
|
42
33
|
super({
|
|
@@ -45,7 +36,6 @@ class InsufficientBalanceError extends OrchestratorError {
|
|
|
45
36
|
});
|
|
46
37
|
}
|
|
47
38
|
}
|
|
48
|
-
exports.InsufficientBalanceError = InsufficientBalanceError;
|
|
49
39
|
class UnsupportedChainIdError extends OrchestratorError {
|
|
50
40
|
constructor(params) {
|
|
51
41
|
super({
|
|
@@ -54,7 +44,6 @@ class UnsupportedChainIdError extends OrchestratorError {
|
|
|
54
44
|
});
|
|
55
45
|
}
|
|
56
46
|
}
|
|
57
|
-
exports.UnsupportedChainIdError = UnsupportedChainIdError;
|
|
58
47
|
class UnsupportedChainError extends OrchestratorError {
|
|
59
48
|
constructor(chainId, params) {
|
|
60
49
|
super({
|
|
@@ -63,7 +52,6 @@ class UnsupportedChainError extends OrchestratorError {
|
|
|
63
52
|
});
|
|
64
53
|
}
|
|
65
54
|
}
|
|
66
|
-
exports.UnsupportedChainError = UnsupportedChainError;
|
|
67
55
|
class UnsupportedTokenError extends OrchestratorError {
|
|
68
56
|
constructor(tokenSymbol, chainId, params) {
|
|
69
57
|
super({
|
|
@@ -72,7 +60,6 @@ class UnsupportedTokenError extends OrchestratorError {
|
|
|
72
60
|
});
|
|
73
61
|
}
|
|
74
62
|
}
|
|
75
|
-
exports.UnsupportedTokenError = UnsupportedTokenError;
|
|
76
63
|
class TokenNotSupportedError extends OrchestratorError {
|
|
77
64
|
constructor(tokenAddress, chainId, params) {
|
|
78
65
|
super({
|
|
@@ -81,7 +68,6 @@ class TokenNotSupportedError extends OrchestratorError {
|
|
|
81
68
|
});
|
|
82
69
|
}
|
|
83
70
|
}
|
|
84
|
-
exports.TokenNotSupportedError = TokenNotSupportedError;
|
|
85
71
|
class AuthenticationRequiredError extends OrchestratorError {
|
|
86
72
|
constructor(params) {
|
|
87
73
|
super({
|
|
@@ -90,7 +76,6 @@ class AuthenticationRequiredError extends OrchestratorError {
|
|
|
90
76
|
});
|
|
91
77
|
}
|
|
92
78
|
}
|
|
93
|
-
exports.AuthenticationRequiredError = AuthenticationRequiredError;
|
|
94
79
|
class InvalidApiKeyError extends OrchestratorError {
|
|
95
80
|
constructor(params) {
|
|
96
81
|
super({
|
|
@@ -99,7 +84,6 @@ class InvalidApiKeyError extends OrchestratorError {
|
|
|
99
84
|
});
|
|
100
85
|
}
|
|
101
86
|
}
|
|
102
|
-
exports.InvalidApiKeyError = InvalidApiKeyError;
|
|
103
87
|
class InvalidIntentSignatureError extends OrchestratorError {
|
|
104
88
|
constructor(params) {
|
|
105
89
|
super({
|
|
@@ -108,7 +92,6 @@ class InvalidIntentSignatureError extends OrchestratorError {
|
|
|
108
92
|
});
|
|
109
93
|
}
|
|
110
94
|
}
|
|
111
|
-
exports.InvalidIntentSignatureError = InvalidIntentSignatureError;
|
|
112
95
|
class OnlyOneTargetTokenAmountCanBeUnsetError extends OrchestratorError {
|
|
113
96
|
constructor(params) {
|
|
114
97
|
super({
|
|
@@ -117,7 +100,6 @@ class OnlyOneTargetTokenAmountCanBeUnsetError extends OrchestratorError {
|
|
|
117
100
|
});
|
|
118
101
|
}
|
|
119
102
|
}
|
|
120
|
-
exports.OnlyOneTargetTokenAmountCanBeUnsetError = OnlyOneTargetTokenAmountCanBeUnsetError;
|
|
121
103
|
class NoPathFoundError extends OrchestratorError {
|
|
122
104
|
constructor(params) {
|
|
123
105
|
super({
|
|
@@ -126,7 +108,6 @@ class NoPathFoundError extends OrchestratorError {
|
|
|
126
108
|
});
|
|
127
109
|
}
|
|
128
110
|
}
|
|
129
|
-
exports.NoPathFoundError = NoPathFoundError;
|
|
130
111
|
class IntentNotFoundError extends OrchestratorError {
|
|
131
112
|
constructor(params) {
|
|
132
113
|
super({
|
|
@@ -135,7 +116,6 @@ class IntentNotFoundError extends OrchestratorError {
|
|
|
135
116
|
});
|
|
136
117
|
}
|
|
137
118
|
}
|
|
138
|
-
exports.IntentNotFoundError = IntentNotFoundError;
|
|
139
119
|
class SchemaValidationError extends OrchestratorError {
|
|
140
120
|
constructor(params) {
|
|
141
121
|
super({
|
|
@@ -144,7 +124,6 @@ class SchemaValidationError extends OrchestratorError {
|
|
|
144
124
|
});
|
|
145
125
|
}
|
|
146
126
|
}
|
|
147
|
-
exports.SchemaValidationError = SchemaValidationError;
|
|
148
127
|
class RateLimitedError extends OrchestratorError {
|
|
149
128
|
constructor(params) {
|
|
150
129
|
super({
|
|
@@ -153,7 +132,6 @@ class RateLimitedError extends OrchestratorError {
|
|
|
153
132
|
});
|
|
154
133
|
}
|
|
155
134
|
}
|
|
156
|
-
exports.RateLimitedError = RateLimitedError;
|
|
157
135
|
class ServiceUnavailableError extends OrchestratorError {
|
|
158
136
|
constructor(params) {
|
|
159
137
|
super({
|
|
@@ -162,7 +140,6 @@ class ServiceUnavailableError extends OrchestratorError {
|
|
|
162
140
|
});
|
|
163
141
|
}
|
|
164
142
|
}
|
|
165
|
-
exports.ServiceUnavailableError = ServiceUnavailableError;
|
|
166
143
|
class UnauthorizedError extends OrchestratorError {
|
|
167
144
|
constructor(params) {
|
|
168
145
|
super({
|
|
@@ -171,7 +148,6 @@ class UnauthorizedError extends OrchestratorError {
|
|
|
171
148
|
});
|
|
172
149
|
}
|
|
173
150
|
}
|
|
174
|
-
exports.UnauthorizedError = UnauthorizedError;
|
|
175
151
|
class ForbiddenError extends OrchestratorError {
|
|
176
152
|
constructor(params) {
|
|
177
153
|
super({
|
|
@@ -180,7 +156,6 @@ class ForbiddenError extends OrchestratorError {
|
|
|
180
156
|
});
|
|
181
157
|
}
|
|
182
158
|
}
|
|
183
|
-
exports.ForbiddenError = ForbiddenError;
|
|
184
159
|
class ResourceNotFoundError extends OrchestratorError {
|
|
185
160
|
constructor(params) {
|
|
186
161
|
super({
|
|
@@ -189,7 +164,6 @@ class ResourceNotFoundError extends OrchestratorError {
|
|
|
189
164
|
});
|
|
190
165
|
}
|
|
191
166
|
}
|
|
192
|
-
exports.ResourceNotFoundError = ResourceNotFoundError;
|
|
193
167
|
class ConflictError extends OrchestratorError {
|
|
194
168
|
constructor(params) {
|
|
195
169
|
super({
|
|
@@ -198,7 +172,6 @@ class ConflictError extends OrchestratorError {
|
|
|
198
172
|
});
|
|
199
173
|
}
|
|
200
174
|
}
|
|
201
|
-
exports.ConflictError = ConflictError;
|
|
202
175
|
class BadRequestError extends OrchestratorError {
|
|
203
176
|
constructor(params) {
|
|
204
177
|
super({
|
|
@@ -207,7 +180,6 @@ class BadRequestError extends OrchestratorError {
|
|
|
207
180
|
});
|
|
208
181
|
}
|
|
209
182
|
}
|
|
210
|
-
exports.BadRequestError = BadRequestError;
|
|
211
183
|
class UnprocessableEntityError extends OrchestratorError {
|
|
212
184
|
constructor(params) {
|
|
213
185
|
super({
|
|
@@ -216,7 +188,6 @@ class UnprocessableEntityError extends OrchestratorError {
|
|
|
216
188
|
});
|
|
217
189
|
}
|
|
218
190
|
}
|
|
219
|
-
exports.UnprocessableEntityError = UnprocessableEntityError;
|
|
220
191
|
class InternalServerError extends OrchestratorError {
|
|
221
192
|
constructor(params) {
|
|
222
193
|
super({
|
|
@@ -225,7 +196,6 @@ class InternalServerError extends OrchestratorError {
|
|
|
225
196
|
});
|
|
226
197
|
}
|
|
227
198
|
}
|
|
228
|
-
exports.InternalServerError = InternalServerError;
|
|
229
199
|
class BodyParserError extends OrchestratorError {
|
|
230
200
|
constructor(params) {
|
|
231
201
|
super({
|
|
@@ -234,7 +204,6 @@ class BodyParserError extends OrchestratorError {
|
|
|
234
204
|
});
|
|
235
205
|
}
|
|
236
206
|
}
|
|
237
|
-
exports.BodyParserError = BodyParserError;
|
|
238
207
|
class SimulationFailedError extends OrchestratorError {
|
|
239
208
|
constructor(params) {
|
|
240
209
|
super({
|
|
@@ -243,7 +212,6 @@ class SimulationFailedError extends OrchestratorError {
|
|
|
243
212
|
});
|
|
244
213
|
}
|
|
245
214
|
}
|
|
246
|
-
exports.SimulationFailedError = SimulationFailedError;
|
|
247
215
|
class InsufficientLiquidityError extends OrchestratorError {
|
|
248
216
|
availableIntents;
|
|
249
217
|
unfillable;
|
|
@@ -258,7 +226,6 @@ class InsufficientLiquidityError extends OrchestratorError {
|
|
|
258
226
|
this.unfillable = params.unfillable;
|
|
259
227
|
}
|
|
260
228
|
}
|
|
261
|
-
exports.InsufficientLiquidityError = InsufficientLiquidityError;
|
|
262
229
|
function isOrchestratorError(error) {
|
|
263
230
|
return error instanceof OrchestratorError;
|
|
264
231
|
}
|
|
@@ -281,3 +248,4 @@ function isRetryable(error) {
|
|
|
281
248
|
return false;
|
|
282
249
|
return error.statusCode === 500 || error.statusCode === 503;
|
|
283
250
|
}
|
|
251
|
+
export { isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, OrchestratorError, InsufficientLiquidityError, InsufficientBalanceError, UnsupportedChainIdError, UnsupportedChainError, UnsupportedTokenError, TokenNotSupportedError, AuthenticationRequiredError, InvalidApiKeyError, InvalidIntentSignatureError, OnlyOneTargetTokenAmountCanBeUnsetError, NoPathFoundError, IntentNotFoundError, SchemaValidationError, RateLimitedError, ServiceUnavailableError, UnauthorizedError, ForbiddenError, ResourceNotFoundError, ConflictError, BadRequestError, UnprocessableEntityError, InternalServerError, BodyParserError, SimulationFailedError, };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import type { AuthProvider } from '../auth/provider.js';
|
|
2
|
+
import { Orchestrator } from './client.js';
|
|
3
|
+
import { RHINESTONE_SPOKE_POOL_ADDRESS } from './consts.js';
|
|
4
|
+
import { AuthenticationRequiredError, BadRequestError, BodyParserError, ConflictError, ForbiddenError, InsufficientBalanceError, InsufficientLiquidityError, IntentNotFoundError, InternalServerError, InvalidApiKeyError, InvalidIntentSignatureError, isAuthError, isOrchestratorError, isRateLimited, isRetryable, isValidationError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, RateLimitedError, ResourceNotFoundError, SchemaValidationError, ServiceUnavailableError, SimulationFailedError, TokenNotSupportedError, UnauthorizedError, UnprocessableEntityError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError } from './error.js';
|
|
5
|
+
import { getAllSupportedChainsAndTokens, getSupportedTokens, getTokenAddress, getTokenDecimals, getTokenSymbol, getWethAddress, isTokenAddressSupported } from './registry.js';
|
|
6
|
+
import type { ApprovalRequired, AuxiliaryFunds, Execution, IntentInput, IntentOp, IntentOpStatus, IntentResult, IntentRoute, Portfolio, SettlementLayer, SignedIntentOp, SplitIntentsInput, SplitIntentsResult, SupportedChain, TokenConfig, TokenRequirements, WrapRequired } from './types.js';
|
|
7
|
+
import { INTENT_STATUS_CLAIMED, INTENT_STATUS_COMPLETED, INTENT_STATUS_EXPIRED, INTENT_STATUS_FAILED, INTENT_STATUS_FILLED, INTENT_STATUS_PENDING, INTENT_STATUS_PRECONFIRMED } from './types.js';
|
|
8
|
+
declare function getOrchestrator(authProvider: AuthProvider, orchestratorUrl?: string, headers?: Record<string, string>): Orchestrator;
|
|
8
9
|
export type { AuxiliaryFunds, Execution, IntentInput, IntentOp, IntentOpStatus, IntentResult, IntentRoute, SettlementLayer, SignedIntentOp, SplitIntentsInput, SplitIntentsResult, SupportedChain, TokenConfig, Portfolio, TokenRequirements, WrapRequired, ApprovalRequired, };
|
|
9
10
|
export { INTENT_STATUS_PENDING, INTENT_STATUS_EXPIRED, INTENT_STATUS_COMPLETED, INTENT_STATUS_FILLED, INTENT_STATUS_FAILED, INTENT_STATUS_PRECONFIRMED, INTENT_STATUS_CLAIMED, RHINESTONE_SPOKE_POOL_ADDRESS, Orchestrator, AuthenticationRequiredError, BadRequestError, BodyParserError, ConflictError, ForbiddenError, InsufficientBalanceError, InsufficientLiquidityError, InvalidApiKeyError, InvalidIntentSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, IntentNotFoundError, InternalServerError, ResourceNotFoundError, RateLimitedError, SchemaValidationError, ServiceUnavailableError, SimulationFailedError, UnprocessableEntityError, UnauthorizedError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, getOrchestrator, getWethAddress, getTokenSymbol, getTokenAddress, getTokenDecimals, getSupportedTokens, getAllSupportedChainsAndTokens, isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, isTokenAddressSupported, };
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../orchestrator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAyB,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,EACL,2BAA2B,EAC3B,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,8BAA8B,EAC9B,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,uBAAuB,EACxB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,YAAY,EACb,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,SAAS,CAAA;AAEhB,iBAAS,eAAe,CACtB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../orchestrator/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,OAAO,EAAyB,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAC/E,OAAO,EACL,2BAA2B,EAC3B,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,8BAA8B,EAC9B,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,uBAAuB,EACxB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,YAAY,EACb,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,SAAS,CAAA;AAEhB,iBAAS,eAAe,CACtB,YAAY,EAAE,YAAY,EAC1B,eAAe,CAAC,EAAE,MAAM,EACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,YAAY,CAMd;AAED,YAAY,EACV,cAAc,EACd,SAAS,EACT,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,GACjB,CAAA;AACD,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,6BAA6B,EAC7B,YAAY,EACZ,2BAA2B,EAC3B,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,0BAA0B,EAC1B,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,8BAA8B,EAC9B,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,uBAAuB,GACxB,CAAA"}
|