@rhinestone/sdk 1.0.0-beta.38 → 1.0.0-beta.40
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 +46 -8
- package/dist/src/errors/index.d.ts +2 -2
- package/dist/src/errors/index.d.ts.map +1 -1
- package/dist/src/errors/index.js +16 -1
- package/dist/src/execution/compact.d.ts +2 -2
- package/dist/src/execution/compact.d.ts.map +1 -1
- package/dist/src/execution/compact.js +2 -2
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +2 -2
- package/dist/src/execution/permit2.d.ts +2 -2
- package/dist/src/execution/permit2.d.ts.map +1 -1
- package/dist/src/execution/permit2.js +28 -19
- package/dist/src/execution/types.d.ts +2 -1
- package/dist/src/execution/types.d.ts.map +1 -1
- package/dist/src/execution/utils.d.ts +7 -3
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +57 -45
- package/dist/src/orchestrator/client.d.ts +2 -0
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/client.js +219 -160
- package/dist/src/orchestrator/error.d.ts +111 -1
- package/dist/src/orchestrator/error.d.ts.map +1 -1
- package/dist/src/orchestrator/error.js +128 -1
- package/dist/src/orchestrator/index.d.ts +2 -2
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/orchestrator/index.js +16 -1
- package/package.json +1 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../orchestrator/error.ts"],"names":[],"mappings":"AAAA,cAAM,iBAAkB,SAAQ,KAAK;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAK;IAC9B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAQ;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;
|
|
1
|
+
{"version":3,"file":"error.d.ts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AC3B,kBAAkB,EAClB,2BAA2B,EAC3B,uCAAuC,EACvC,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,eAAe,EACf,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,GAChB,CAAA"}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IntentNotFoundError = exports.NoPathFoundError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.InvalidIntentSignatureError = exports.InvalidApiKeyError = exports.AuthenticationRequiredError = exports.TokenNotSupportedError = exports.UnsupportedTokenError = exports.UnsupportedChainError = exports.UnsupportedChainIdError = exports.InsufficientBalanceError = exports.OrchestratorError = void 0;
|
|
3
|
+
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.OrchestratorError = void 0;
|
|
4
4
|
exports.isOrchestratorError = isOrchestratorError;
|
|
5
|
+
exports.isRetryable = isRetryable;
|
|
6
|
+
exports.isAuthError = isAuthError;
|
|
7
|
+
exports.isValidationError = isValidationError;
|
|
8
|
+
exports.isRateLimited = isRateLimited;
|
|
5
9
|
class OrchestratorError extends Error {
|
|
6
10
|
_message;
|
|
7
11
|
_context;
|
|
8
12
|
_errorType;
|
|
9
13
|
_traceId;
|
|
14
|
+
_statusCode;
|
|
10
15
|
constructor(params) {
|
|
11
16
|
super();
|
|
12
17
|
this._message = params?.message || 'OrchestratorError ';
|
|
13
18
|
this._context = params?.context || {};
|
|
14
19
|
this._errorType = params?.errorType || 'Unknown';
|
|
15
20
|
this._traceId = params?.traceId || '';
|
|
21
|
+
this._statusCode = params?.statusCode;
|
|
16
22
|
}
|
|
17
23
|
get message() {
|
|
18
24
|
return this._message;
|
|
@@ -26,6 +32,9 @@ class OrchestratorError extends Error {
|
|
|
26
32
|
get traceId() {
|
|
27
33
|
return this._traceId;
|
|
28
34
|
}
|
|
35
|
+
get statusCode() {
|
|
36
|
+
return this._statusCode;
|
|
37
|
+
}
|
|
29
38
|
}
|
|
30
39
|
exports.OrchestratorError = OrchestratorError;
|
|
31
40
|
class InsufficientBalanceError extends OrchestratorError {
|
|
@@ -127,6 +136,124 @@ class IntentNotFoundError extends OrchestratorError {
|
|
|
127
136
|
}
|
|
128
137
|
}
|
|
129
138
|
exports.IntentNotFoundError = IntentNotFoundError;
|
|
139
|
+
class SchemaValidationError extends OrchestratorError {
|
|
140
|
+
constructor(params) {
|
|
141
|
+
super({
|
|
142
|
+
message: params?.message || 'Schema validation error',
|
|
143
|
+
...params,
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
exports.SchemaValidationError = SchemaValidationError;
|
|
148
|
+
class RateLimitedError extends OrchestratorError {
|
|
149
|
+
constructor(params) {
|
|
150
|
+
super({
|
|
151
|
+
message: 'Too Many Requests',
|
|
152
|
+
...params,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
exports.RateLimitedError = RateLimitedError;
|
|
157
|
+
class ServiceUnavailableError extends OrchestratorError {
|
|
158
|
+
constructor(params) {
|
|
159
|
+
super({
|
|
160
|
+
message: 'Service Unavailable',
|
|
161
|
+
...params,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
exports.ServiceUnavailableError = ServiceUnavailableError;
|
|
166
|
+
class UnauthorizedError extends OrchestratorError {
|
|
167
|
+
constructor(params) {
|
|
168
|
+
super({
|
|
169
|
+
message: 'Unauthorized',
|
|
170
|
+
...params,
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
exports.UnauthorizedError = UnauthorizedError;
|
|
175
|
+
class ForbiddenError extends OrchestratorError {
|
|
176
|
+
constructor(params) {
|
|
177
|
+
super({
|
|
178
|
+
message: 'Forbidden',
|
|
179
|
+
...params,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
exports.ForbiddenError = ForbiddenError;
|
|
184
|
+
class ResourceNotFoundError extends OrchestratorError {
|
|
185
|
+
constructor(params) {
|
|
186
|
+
super({
|
|
187
|
+
message: 'Not Found',
|
|
188
|
+
...params,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
exports.ResourceNotFoundError = ResourceNotFoundError;
|
|
193
|
+
class ConflictError extends OrchestratorError {
|
|
194
|
+
constructor(params) {
|
|
195
|
+
super({
|
|
196
|
+
message: 'Conflict',
|
|
197
|
+
...params,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
exports.ConflictError = ConflictError;
|
|
202
|
+
class BadRequestError extends OrchestratorError {
|
|
203
|
+
constructor(params) {
|
|
204
|
+
super({
|
|
205
|
+
message: params?.message || 'Bad Request',
|
|
206
|
+
...params,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
exports.BadRequestError = BadRequestError;
|
|
211
|
+
class UnprocessableEntityError extends OrchestratorError {
|
|
212
|
+
constructor(params) {
|
|
213
|
+
super({
|
|
214
|
+
message: params?.message || 'Unprocessable Entity',
|
|
215
|
+
...params,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
exports.UnprocessableEntityError = UnprocessableEntityError;
|
|
220
|
+
class InternalServerError extends OrchestratorError {
|
|
221
|
+
constructor(params) {
|
|
222
|
+
super({
|
|
223
|
+
message: 'Internal Server Error',
|
|
224
|
+
...params,
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
exports.InternalServerError = InternalServerError;
|
|
229
|
+
class BodyParserError extends OrchestratorError {
|
|
230
|
+
constructor(params) {
|
|
231
|
+
super({
|
|
232
|
+
message: params?.message || 'Body parser error',
|
|
233
|
+
...params,
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
exports.BodyParserError = BodyParserError;
|
|
130
238
|
function isOrchestratorError(error) {
|
|
131
239
|
return error instanceof OrchestratorError;
|
|
132
240
|
}
|
|
241
|
+
function isRateLimited(error) {
|
|
242
|
+
return (error instanceof RateLimitedError ||
|
|
243
|
+
(error instanceof OrchestratorError && error.statusCode === 429));
|
|
244
|
+
}
|
|
245
|
+
function isValidationError(error) {
|
|
246
|
+
if (!(error instanceof OrchestratorError))
|
|
247
|
+
return false;
|
|
248
|
+
return error.statusCode === 400 || error.statusCode === 422;
|
|
249
|
+
}
|
|
250
|
+
function isAuthError(error) {
|
|
251
|
+
if (!(error instanceof OrchestratorError))
|
|
252
|
+
return false;
|
|
253
|
+
return (error.statusCode === 401 || error instanceof AuthenticationRequiredError);
|
|
254
|
+
}
|
|
255
|
+
function isRetryable(error) {
|
|
256
|
+
if (!(error instanceof OrchestratorError))
|
|
257
|
+
return false;
|
|
258
|
+
return error.statusCode === 500 || error.statusCode === 503;
|
|
259
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Orchestrator } from './client';
|
|
2
2
|
import { RHINESTONE_SPOKE_POOL_ADDRESS } from './consts';
|
|
3
|
-
import { AuthenticationRequiredError, InsufficientBalanceError, IntentNotFoundError, InvalidApiKeyError, InvalidIntentSignatureError, isOrchestratorError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError } from './error';
|
|
3
|
+
import { AuthenticationRequiredError, BadRequestError, BodyParserError, ConflictError, ForbiddenError, InsufficientBalanceError, IntentNotFoundError, InternalServerError, InvalidApiKeyError, InvalidIntentSignatureError, isAuthError, isOrchestratorError, isRateLimited, isRetryable, isValidationError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, RateLimitedError, ResourceNotFoundError, SchemaValidationError, ServiceUnavailableError, TokenNotSupportedError, UnauthorizedError, UnprocessableEntityError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError } from './error';
|
|
4
4
|
import { getSupportedTokens, getTokenAddress, getTokenSymbol, getWethAddress, isTokenAddressSupported } from './registry';
|
|
5
5
|
import type { IntentCost, IntentInput, IntentOp, IntentOpStatus, IntentResult, IntentRoute, Portfolio, SettlementSystem, SignedIntentOp, SupportedChain, TokenConfig } from './types';
|
|
6
6
|
import { INTENT_STATUS_COMPLETED, INTENT_STATUS_EXPIRED, INTENT_STATUS_FAILED, INTENT_STATUS_FILLED, INTENT_STATUS_PARTIALLY_COMPLETED, INTENT_STATUS_PENDING, INTENT_STATUS_PRECONFIRMED, INTENT_STATUS_UNKNOWN } from './types';
|
|
7
7
|
declare function getOrchestrator(apiKey?: string, orchestratorUrl?: string): Orchestrator;
|
|
8
8
|
export type { IntentCost, IntentInput, IntentOp, IntentOpStatus, IntentResult, IntentRoute, SettlementSystem, SignedIntentOp, SupportedChain, TokenConfig, Portfolio, };
|
|
9
|
-
export { INTENT_STATUS_PENDING, INTENT_STATUS_EXPIRED, INTENT_STATUS_PARTIALLY_COMPLETED, INTENT_STATUS_COMPLETED, INTENT_STATUS_FILLED, INTENT_STATUS_FAILED, INTENT_STATUS_PRECONFIRMED, INTENT_STATUS_UNKNOWN, RHINESTONE_SPOKE_POOL_ADDRESS, Orchestrator, AuthenticationRequiredError, InsufficientBalanceError, InvalidApiKeyError, InvalidIntentSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, IntentNotFoundError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, getOrchestrator, getWethAddress, getTokenSymbol, getTokenAddress, getSupportedTokens, isOrchestratorError, isTokenAddressSupported, };
|
|
9
|
+
export { INTENT_STATUS_PENDING, INTENT_STATUS_EXPIRED, INTENT_STATUS_PARTIALLY_COMPLETED, INTENT_STATUS_COMPLETED, INTENT_STATUS_FILLED, INTENT_STATUS_FAILED, INTENT_STATUS_PRECONFIRMED, INTENT_STATUS_UNKNOWN, RHINESTONE_SPOKE_POOL_ADDRESS, Orchestrator, AuthenticationRequiredError, BadRequestError, BodyParserError, ConflictError, ForbiddenError, InsufficientBalanceError, InvalidApiKeyError, InvalidIntentSignatureError, NoPathFoundError, OnlyOneTargetTokenAmountCanBeUnsetError, OrchestratorError, IntentNotFoundError, InternalServerError, ResourceNotFoundError, RateLimitedError, SchemaValidationError, ServiceUnavailableError, UnprocessableEntityError, UnauthorizedError, TokenNotSupportedError, UnsupportedChainError, UnsupportedChainIdError, UnsupportedTokenError, getOrchestrator, getWethAddress, getTokenSymbol, getTokenAddress, getSupportedTokens, isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, isTokenAddressSupported, };
|
|
10
10
|
//# 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,wBAAwB,EACxB,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,mBAAmB,EACnB,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,cAAc,EACd,uBAAuB,EACxB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,WAAW,EACZ,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,iCAAiC,EACjC,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACtB,MAAM,SAAS,CAAA;AAEhB,iBAAS,eAAe,CACtB,MAAM,CAAC,EAAE,MAAM,EACf,eAAe,CAAC,EAAE,MAAM,GACvB,YAAY,CAEd;AAED,YAAY,EACV,UAAU,EACV,WAAW,EACX,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,WAAW,EACX,SAAS,GACV,CAAA;AACD,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,iCAAiC,EACjC,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,6BAA6B,EAC7B,YAAY,EACZ,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,GACxB,CAAA"}
|
|
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,6BAA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ACrB,6BAA6B,EAC7B,YAAY,EACZ,2BAA2B,EAC3B,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,EAChB,uCAAuC,EACvC,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,uBAAuB,GACxB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isTokenAddressSupported = exports.isOrchestratorError = exports.getSupportedTokens = exports.getTokenAddress = exports.getTokenSymbol = exports.getWethAddress = exports.UnsupportedTokenError = exports.UnsupportedChainIdError = exports.UnsupportedChainError = exports.TokenNotSupportedError = exports.IntentNotFoundError = exports.OrchestratorError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.NoPathFoundError = exports.InvalidIntentSignatureError = exports.InvalidApiKeyError = exports.InsufficientBalanceError = exports.AuthenticationRequiredError = exports.Orchestrator = exports.RHINESTONE_SPOKE_POOL_ADDRESS = exports.INTENT_STATUS_UNKNOWN = exports.INTENT_STATUS_PRECONFIRMED = exports.INTENT_STATUS_FAILED = exports.INTENT_STATUS_FILLED = exports.INTENT_STATUS_COMPLETED = exports.INTENT_STATUS_PARTIALLY_COMPLETED = exports.INTENT_STATUS_EXPIRED = exports.INTENT_STATUS_PENDING = void 0;
|
|
3
|
+
exports.isTokenAddressSupported = exports.isRateLimited = exports.isValidationError = exports.isAuthError = exports.isRetryable = exports.isOrchestratorError = exports.getSupportedTokens = exports.getTokenAddress = exports.getTokenSymbol = exports.getWethAddress = exports.UnsupportedTokenError = exports.UnsupportedChainIdError = exports.UnsupportedChainError = exports.TokenNotSupportedError = exports.UnauthorizedError = exports.UnprocessableEntityError = exports.ServiceUnavailableError = exports.SchemaValidationError = exports.RateLimitedError = exports.ResourceNotFoundError = exports.InternalServerError = exports.IntentNotFoundError = exports.OrchestratorError = exports.OnlyOneTargetTokenAmountCanBeUnsetError = exports.NoPathFoundError = exports.InvalidIntentSignatureError = exports.InvalidApiKeyError = exports.InsufficientBalanceError = exports.ForbiddenError = exports.ConflictError = exports.BodyParserError = exports.BadRequestError = exports.AuthenticationRequiredError = exports.Orchestrator = exports.RHINESTONE_SPOKE_POOL_ADDRESS = exports.INTENT_STATUS_UNKNOWN = exports.INTENT_STATUS_PRECONFIRMED = exports.INTENT_STATUS_FAILED = exports.INTENT_STATUS_FILLED = exports.INTENT_STATUS_COMPLETED = exports.INTENT_STATUS_PARTIALLY_COMPLETED = exports.INTENT_STATUS_EXPIRED = exports.INTENT_STATUS_PENDING = void 0;
|
|
4
4
|
exports.getOrchestrator = getOrchestrator;
|
|
5
5
|
const client_1 = require("./client");
|
|
6
6
|
Object.defineProperty(exports, "Orchestrator", { enumerable: true, get: function () { return client_1.Orchestrator; } });
|
|
@@ -8,15 +8,30 @@ const consts_1 = require("./consts");
|
|
|
8
8
|
Object.defineProperty(exports, "RHINESTONE_SPOKE_POOL_ADDRESS", { enumerable: true, get: function () { return consts_1.RHINESTONE_SPOKE_POOL_ADDRESS; } });
|
|
9
9
|
const error_1 = require("./error");
|
|
10
10
|
Object.defineProperty(exports, "AuthenticationRequiredError", { enumerable: true, get: function () { return error_1.AuthenticationRequiredError; } });
|
|
11
|
+
Object.defineProperty(exports, "BadRequestError", { enumerable: true, get: function () { return error_1.BadRequestError; } });
|
|
12
|
+
Object.defineProperty(exports, "BodyParserError", { enumerable: true, get: function () { return error_1.BodyParserError; } });
|
|
13
|
+
Object.defineProperty(exports, "ConflictError", { enumerable: true, get: function () { return error_1.ConflictError; } });
|
|
14
|
+
Object.defineProperty(exports, "ForbiddenError", { enumerable: true, get: function () { return error_1.ForbiddenError; } });
|
|
11
15
|
Object.defineProperty(exports, "InsufficientBalanceError", { enumerable: true, get: function () { return error_1.InsufficientBalanceError; } });
|
|
12
16
|
Object.defineProperty(exports, "IntentNotFoundError", { enumerable: true, get: function () { return error_1.IntentNotFoundError; } });
|
|
17
|
+
Object.defineProperty(exports, "InternalServerError", { enumerable: true, get: function () { return error_1.InternalServerError; } });
|
|
13
18
|
Object.defineProperty(exports, "InvalidApiKeyError", { enumerable: true, get: function () { return error_1.InvalidApiKeyError; } });
|
|
14
19
|
Object.defineProperty(exports, "InvalidIntentSignatureError", { enumerable: true, get: function () { return error_1.InvalidIntentSignatureError; } });
|
|
20
|
+
Object.defineProperty(exports, "isAuthError", { enumerable: true, get: function () { return error_1.isAuthError; } });
|
|
15
21
|
Object.defineProperty(exports, "isOrchestratorError", { enumerable: true, get: function () { return error_1.isOrchestratorError; } });
|
|
22
|
+
Object.defineProperty(exports, "isRateLimited", { enumerable: true, get: function () { return error_1.isRateLimited; } });
|
|
23
|
+
Object.defineProperty(exports, "isRetryable", { enumerable: true, get: function () { return error_1.isRetryable; } });
|
|
24
|
+
Object.defineProperty(exports, "isValidationError", { enumerable: true, get: function () { return error_1.isValidationError; } });
|
|
16
25
|
Object.defineProperty(exports, "NoPathFoundError", { enumerable: true, get: function () { return error_1.NoPathFoundError; } });
|
|
17
26
|
Object.defineProperty(exports, "OnlyOneTargetTokenAmountCanBeUnsetError", { enumerable: true, get: function () { return error_1.OnlyOneTargetTokenAmountCanBeUnsetError; } });
|
|
18
27
|
Object.defineProperty(exports, "OrchestratorError", { enumerable: true, get: function () { return error_1.OrchestratorError; } });
|
|
28
|
+
Object.defineProperty(exports, "RateLimitedError", { enumerable: true, get: function () { return error_1.RateLimitedError; } });
|
|
29
|
+
Object.defineProperty(exports, "ResourceNotFoundError", { enumerable: true, get: function () { return error_1.ResourceNotFoundError; } });
|
|
30
|
+
Object.defineProperty(exports, "SchemaValidationError", { enumerable: true, get: function () { return error_1.SchemaValidationError; } });
|
|
31
|
+
Object.defineProperty(exports, "ServiceUnavailableError", { enumerable: true, get: function () { return error_1.ServiceUnavailableError; } });
|
|
19
32
|
Object.defineProperty(exports, "TokenNotSupportedError", { enumerable: true, get: function () { return error_1.TokenNotSupportedError; } });
|
|
33
|
+
Object.defineProperty(exports, "UnauthorizedError", { enumerable: true, get: function () { return error_1.UnauthorizedError; } });
|
|
34
|
+
Object.defineProperty(exports, "UnprocessableEntityError", { enumerable: true, get: function () { return error_1.UnprocessableEntityError; } });
|
|
20
35
|
Object.defineProperty(exports, "UnsupportedChainError", { enumerable: true, get: function () { return error_1.UnsupportedChainError; } });
|
|
21
36
|
Object.defineProperty(exports, "UnsupportedChainIdError", { enumerable: true, get: function () { return error_1.UnsupportedChainIdError; } });
|
|
22
37
|
Object.defineProperty(exports, "UnsupportedTokenError", { enumerable: true, get: function () { return error_1.UnsupportedTokenError; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhinestone/sdk",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.40",
|
|
4
4
|
"description": "End-to-end chain abstraction and modularity toolkit",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Rhinestone",
|
|
@@ -107,7 +107,6 @@
|
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
109
|
"@rhinestone/shared-configs": "^1.4.4",
|
|
110
|
-
"axios": "^1.7.0",
|
|
111
110
|
"solady": "^0.1.21"
|
|
112
111
|
},
|
|
113
112
|
"peerDependencies": {
|