@rhinestone/sdk 2.0.0-beta.0 → 2.0.0-beta.1
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 +1 -1
- package/dist/src/accounts/json-rpc/providers.d.ts.map +1 -1
- package/dist/src/accounts/json-rpc/providers.js +3 -2
- package/dist/src/errors/index.d.ts +3 -3
- package/dist/src/errors/index.d.ts.map +1 -1
- package/dist/src/errors/index.js +6 -4
- package/dist/src/execution/compact.d.ts +1 -144
- package/dist/src/execution/compact.d.ts.map +1 -1
- package/dist/src/execution/compact.js +1 -109
- package/dist/src/execution/error.d.ts +10 -1
- package/dist/src/execution/error.d.ts.map +1 -1
- package/dist/src/execution/error.js +9 -1
- package/dist/src/execution/index.d.ts +3 -4
- package/dist/src/execution/index.d.ts.map +1 -1
- package/dist/src/execution/index.js +21 -17
- package/dist/src/execution/permit2.d.ts +1 -137
- package/dist/src/execution/permit2.d.ts.map +1 -1
- package/dist/src/execution/permit2.js +2 -231
- package/dist/src/execution/utils.d.ts +28 -12
- package/dist/src/execution/utils.d.ts.map +1 -1
- package/dist/src/execution/utils.js +167 -117
- package/dist/src/index.d.ts +9 -8
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -8
- package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
- package/dist/src/modules/validators/smart-sessions.js +3 -5
- package/dist/src/orchestrator/caip2.d.ts +7 -0
- package/dist/src/orchestrator/caip2.d.ts.map +1 -0
- package/dist/src/orchestrator/caip2.js +17 -0
- package/dist/src/orchestrator/client.d.ts +11 -11
- package/dist/src/orchestrator/client.d.ts.map +1 -1
- package/dist/src/orchestrator/client.js +193 -295
- package/dist/src/orchestrator/consts.d.ts +2 -2
- package/dist/src/orchestrator/consts.d.ts.map +1 -1
- package/dist/src/orchestrator/consts.js +2 -2
- package/dist/src/orchestrator/error.d.ts +72 -217
- package/dist/src/orchestrator/error.d.ts.map +1 -1
- package/dist/src/orchestrator/error.js +117 -195
- package/dist/src/orchestrator/index.d.ts +4 -4
- package/dist/src/orchestrator/index.d.ts.map +1 -1
- package/dist/src/orchestrator/index.js +2 -2
- package/dist/src/orchestrator/types.d.ts +97 -232
- package/dist/src/orchestrator/types.d.ts.map +1 -1
- package/dist/src/types.d.ts +2 -4
- package/dist/src/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src/execution/singleChainOps.d.ts +0 -41
- package/dist/src/execution/singleChainOps.d.ts.map +0 -1
- package/dist/src/execution/singleChainOps.js +0 -42
- package/dist/src/execution/types.d.ts +0 -36
- package/dist/src/execution/types.d.ts.map +0 -1
- package/dist/src/execution/types.js +0 -1
|
@@ -1,251 +1,173 @@
|
|
|
1
1
|
class OrchestratorError extends Error {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
_traceId;
|
|
6
|
-
_statusCode;
|
|
2
|
+
code;
|
|
3
|
+
traceId;
|
|
4
|
+
statusCode;
|
|
7
5
|
constructor(params) {
|
|
8
|
-
super();
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
12
|
-
this._traceId = params?.traceId || '';
|
|
13
|
-
this._statusCode = params?.statusCode;
|
|
14
|
-
}
|
|
15
|
-
get message() {
|
|
16
|
-
return this._message;
|
|
17
|
-
}
|
|
18
|
-
get context() {
|
|
19
|
-
return this._context;
|
|
20
|
-
}
|
|
21
|
-
get errorType() {
|
|
22
|
-
return this._errorType;
|
|
23
|
-
}
|
|
24
|
-
get traceId() {
|
|
25
|
-
return this._traceId;
|
|
26
|
-
}
|
|
27
|
-
get statusCode() {
|
|
28
|
-
return this._statusCode;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
class InsufficientBalanceError extends OrchestratorError {
|
|
32
|
-
constructor(params) {
|
|
33
|
-
super({
|
|
34
|
-
message: 'Insufficient balance',
|
|
35
|
-
...params,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
class UnsupportedChainIdError extends OrchestratorError {
|
|
40
|
-
constructor(params) {
|
|
41
|
-
super({
|
|
42
|
-
message: 'Unsupported chain id',
|
|
43
|
-
...params,
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
class UnsupportedChainError extends OrchestratorError {
|
|
48
|
-
constructor(chainId, params) {
|
|
49
|
-
super({
|
|
50
|
-
message: `Unsupported chain ${chainId}`,
|
|
51
|
-
...params,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
class UnsupportedTokenError extends OrchestratorError {
|
|
56
|
-
constructor(tokenSymbol, chainId, params) {
|
|
57
|
-
super({
|
|
58
|
-
message: `Unsupported token ${tokenSymbol} for chain ${chainId}`,
|
|
59
|
-
...params,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
class TokenNotSupportedError extends OrchestratorError {
|
|
64
|
-
constructor(tokenAddress, chainId, params) {
|
|
65
|
-
super({
|
|
66
|
-
message: `Token ${tokenAddress} not supported on chain ${chainId}`,
|
|
67
|
-
...params,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
class AuthenticationRequiredError extends OrchestratorError {
|
|
72
|
-
constructor(params) {
|
|
73
|
-
super({
|
|
74
|
-
message: 'Authentication is required',
|
|
75
|
-
...params,
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
class InvalidApiKeyError extends OrchestratorError {
|
|
80
|
-
constructor(params) {
|
|
81
|
-
super({
|
|
82
|
-
message: 'Invalid API key',
|
|
83
|
-
...params,
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
class InvalidIntentSignatureError extends OrchestratorError {
|
|
88
|
-
constructor(params) {
|
|
89
|
-
super({
|
|
90
|
-
message: 'Invalid intent signature',
|
|
91
|
-
...params,
|
|
92
|
-
});
|
|
6
|
+
super(params.message);
|
|
7
|
+
this.code = params.code ?? 'UNKNOWN';
|
|
8
|
+
this.traceId = params.traceId ?? '';
|
|
9
|
+
this.statusCode = params.statusCode;
|
|
93
10
|
}
|
|
94
11
|
}
|
|
95
|
-
class
|
|
12
|
+
class ValidationError extends OrchestratorError {
|
|
13
|
+
issues;
|
|
96
14
|
constructor(params) {
|
|
97
|
-
super({
|
|
98
|
-
|
|
99
|
-
...params,
|
|
100
|
-
});
|
|
15
|
+
super({ ...params, code: 'VALIDATION_ERROR' });
|
|
16
|
+
this.issues = params.issues ?? [];
|
|
101
17
|
}
|
|
102
18
|
}
|
|
103
|
-
class
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
message: 'No Path Found',
|
|
107
|
-
...params,
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
class IntentNotFoundError extends OrchestratorError {
|
|
112
|
-
constructor(params) {
|
|
113
|
-
super({
|
|
114
|
-
message: 'Intent not found',
|
|
115
|
-
...params,
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
class SchemaValidationError extends OrchestratorError {
|
|
120
|
-
constructor(params) {
|
|
121
|
-
super({
|
|
122
|
-
message: params?.message || 'Schema validation error',
|
|
123
|
-
...params,
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
class RateLimitedError extends OrchestratorError {
|
|
19
|
+
class InsufficientLiquidityError extends OrchestratorError {
|
|
20
|
+
availableIntents;
|
|
21
|
+
unfillable;
|
|
128
22
|
constructor(params) {
|
|
129
|
-
super({
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
});
|
|
23
|
+
super({ ...params, code: 'INSUFFICIENT_LIQUIDITY' });
|
|
24
|
+
this.availableIntents = params.availableIntents;
|
|
25
|
+
this.unfillable = params.unfillable;
|
|
133
26
|
}
|
|
134
27
|
}
|
|
135
|
-
class
|
|
28
|
+
class NotFoundError extends OrchestratorError {
|
|
136
29
|
constructor(params) {
|
|
137
|
-
super({
|
|
138
|
-
message: 'Service Unavailable',
|
|
139
|
-
...params,
|
|
140
|
-
});
|
|
30
|
+
super({ ...params, code: 'NOT_FOUND' });
|
|
141
31
|
}
|
|
142
32
|
}
|
|
143
33
|
class UnauthorizedError extends OrchestratorError {
|
|
144
34
|
constructor(params) {
|
|
145
|
-
super({
|
|
146
|
-
message: 'Unauthorized',
|
|
147
|
-
...params,
|
|
148
|
-
});
|
|
35
|
+
super({ ...params, code: 'UNAUTHORIZED' });
|
|
149
36
|
}
|
|
150
37
|
}
|
|
151
38
|
class ForbiddenError extends OrchestratorError {
|
|
152
39
|
constructor(params) {
|
|
153
|
-
super({
|
|
154
|
-
message: 'Forbidden',
|
|
155
|
-
...params,
|
|
156
|
-
});
|
|
40
|
+
super({ ...params, code: 'FORBIDDEN' });
|
|
157
41
|
}
|
|
158
42
|
}
|
|
159
|
-
class
|
|
43
|
+
class ConflictError extends OrchestratorError {
|
|
160
44
|
constructor(params) {
|
|
161
|
-
super({
|
|
162
|
-
message: 'Not Found',
|
|
163
|
-
...params,
|
|
164
|
-
});
|
|
45
|
+
super({ ...params, code: 'CONFLICT' });
|
|
165
46
|
}
|
|
166
47
|
}
|
|
167
|
-
class
|
|
48
|
+
class UnprocessableContentError extends OrchestratorError {
|
|
168
49
|
constructor(params) {
|
|
169
|
-
super({
|
|
170
|
-
message: 'Conflict',
|
|
171
|
-
...params,
|
|
172
|
-
});
|
|
50
|
+
super({ ...params, code: 'UNPROCESSABLE_CONTENT' });
|
|
173
51
|
}
|
|
174
52
|
}
|
|
175
|
-
class
|
|
53
|
+
class RateLimitedError extends OrchestratorError {
|
|
54
|
+
retryAfter;
|
|
176
55
|
constructor(params) {
|
|
177
|
-
super({
|
|
178
|
-
|
|
179
|
-
...params,
|
|
180
|
-
});
|
|
56
|
+
super({ ...params, code: 'TOO_MANY_REQUESTS' });
|
|
57
|
+
this.retryAfter = params.retryAfter;
|
|
181
58
|
}
|
|
182
59
|
}
|
|
183
|
-
class
|
|
60
|
+
class SettlementQuoteError extends OrchestratorError {
|
|
184
61
|
constructor(params) {
|
|
185
|
-
super({
|
|
186
|
-
message: params?.message || 'Unprocessable Entity',
|
|
187
|
-
...params,
|
|
188
|
-
});
|
|
62
|
+
super({ ...params, code: 'SETTLEMENT_QUOTE_ERROR' });
|
|
189
63
|
}
|
|
190
64
|
}
|
|
191
|
-
class
|
|
65
|
+
class SettlementExecutionError extends OrchestratorError {
|
|
192
66
|
constructor(params) {
|
|
193
|
-
super({
|
|
194
|
-
message: 'Internal Server Error',
|
|
195
|
-
...params,
|
|
196
|
-
});
|
|
67
|
+
super({ ...params, code: 'SETTLEMENT_EXECUTION_ERROR' });
|
|
197
68
|
}
|
|
198
69
|
}
|
|
199
|
-
class
|
|
70
|
+
class ExternalServiceTimeoutError extends OrchestratorError {
|
|
200
71
|
constructor(params) {
|
|
201
|
-
super({
|
|
202
|
-
message: params?.message || 'Body parser error',
|
|
203
|
-
...params,
|
|
204
|
-
});
|
|
72
|
+
super({ ...params, code: 'EXTERNAL_SERVICE_TIMEOUT' });
|
|
205
73
|
}
|
|
206
74
|
}
|
|
207
|
-
class
|
|
75
|
+
class RelayerMarketUnavailableError extends OrchestratorError {
|
|
208
76
|
constructor(params) {
|
|
209
|
-
super({
|
|
210
|
-
message: params?.message || 'Simulation failed',
|
|
211
|
-
...params,
|
|
212
|
-
});
|
|
77
|
+
super({ ...params, code: 'RELAYER_MARKET_UNAVAILABLE' });
|
|
213
78
|
}
|
|
214
79
|
}
|
|
215
|
-
class
|
|
216
|
-
availableIntents;
|
|
217
|
-
unfillable;
|
|
80
|
+
class InternalServerError extends OrchestratorError {
|
|
218
81
|
constructor(params) {
|
|
219
|
-
super({
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
82
|
+
super({ ...params, code: 'INTERNAL_ERROR' });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Thrown by the SDK's local token/chain registry — not an orchestrator API
|
|
87
|
+
* error. Distinct from `OrchestratorError` so consumers can catch them
|
|
88
|
+
* separately from server-side failures.
|
|
89
|
+
*/
|
|
90
|
+
class UnsupportedChainError extends Error {
|
|
91
|
+
chainId;
|
|
92
|
+
constructor(chainId) {
|
|
93
|
+
super(`Unsupported chain ${chainId}`);
|
|
94
|
+
this.chainId = chainId;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
class UnsupportedTokenError extends Error {
|
|
98
|
+
tokenSymbol;
|
|
99
|
+
chainId;
|
|
100
|
+
constructor(tokenSymbol, chainId) {
|
|
101
|
+
super(`Unsupported token ${tokenSymbol} for chain ${chainId}`);
|
|
102
|
+
this.tokenSymbol = tokenSymbol;
|
|
103
|
+
this.chainId = chainId;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function parseTokenAmounts(record) {
|
|
107
|
+
return Object.fromEntries(Object.entries(record).map(([addr, amount]) => [addr, BigInt(amount)]));
|
|
108
|
+
}
|
|
109
|
+
function parseErrorEnvelope(envelope, statusCode, retryAfter) {
|
|
110
|
+
const base = {
|
|
111
|
+
message: envelope.message,
|
|
112
|
+
traceId: envelope.traceId,
|
|
113
|
+
statusCode,
|
|
114
|
+
};
|
|
115
|
+
switch (envelope.code) {
|
|
116
|
+
case 'VALIDATION_ERROR': {
|
|
117
|
+
const issues = Array.isArray(envelope.details)
|
|
118
|
+
? envelope.details
|
|
119
|
+
: [];
|
|
120
|
+
return new ValidationError({ ...base, issues });
|
|
121
|
+
}
|
|
122
|
+
case 'INSUFFICIENT_LIQUIDITY': {
|
|
123
|
+
const details = (envelope.details ?? {});
|
|
124
|
+
return new InsufficientLiquidityError({
|
|
125
|
+
...base,
|
|
126
|
+
availableIntents: (details.availableIntents ?? []).map(parseTokenAmounts),
|
|
127
|
+
unfillable: parseTokenAmounts(details.unfillable ?? {}),
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
case 'NOT_FOUND':
|
|
131
|
+
return new NotFoundError(base);
|
|
132
|
+
case 'UNAUTHORIZED':
|
|
133
|
+
return new UnauthorizedError(base);
|
|
134
|
+
case 'FORBIDDEN':
|
|
135
|
+
return new ForbiddenError(base);
|
|
136
|
+
case 'CONFLICT':
|
|
137
|
+
return new ConflictError(base);
|
|
138
|
+
case 'UNPROCESSABLE_CONTENT':
|
|
139
|
+
return new UnprocessableContentError(base);
|
|
140
|
+
case 'TOO_MANY_REQUESTS':
|
|
141
|
+
return new RateLimitedError({ ...base, retryAfter });
|
|
142
|
+
case 'SETTLEMENT_QUOTE_ERROR':
|
|
143
|
+
return new SettlementQuoteError(base);
|
|
144
|
+
case 'SETTLEMENT_EXECUTION_ERROR':
|
|
145
|
+
return new SettlementExecutionError(base);
|
|
146
|
+
case 'EXTERNAL_SERVICE_TIMEOUT':
|
|
147
|
+
return new ExternalServiceTimeoutError(base);
|
|
148
|
+
case 'RELAYER_MARKET_UNAVAILABLE':
|
|
149
|
+
return new RelayerMarketUnavailableError(base);
|
|
150
|
+
case 'INTERNAL_ERROR':
|
|
151
|
+
return new InternalServerError(base);
|
|
152
|
+
default:
|
|
153
|
+
return new OrchestratorError({ ...base, code: 'UNKNOWN' });
|
|
227
154
|
}
|
|
228
155
|
}
|
|
229
156
|
function isOrchestratorError(error) {
|
|
230
157
|
return error instanceof OrchestratorError;
|
|
231
158
|
}
|
|
232
159
|
function isRateLimited(error) {
|
|
233
|
-
return
|
|
234
|
-
(error instanceof OrchestratorError && error.statusCode === 429));
|
|
160
|
+
return error instanceof RateLimitedError;
|
|
235
161
|
}
|
|
236
162
|
function isValidationError(error) {
|
|
237
|
-
|
|
238
|
-
return false;
|
|
239
|
-
return error.statusCode === 400 || error.statusCode === 422;
|
|
163
|
+
return error instanceof ValidationError;
|
|
240
164
|
}
|
|
241
165
|
function isAuthError(error) {
|
|
242
|
-
|
|
243
|
-
return false;
|
|
244
|
-
return (error.statusCode === 401 || error instanceof AuthenticationRequiredError);
|
|
166
|
+
return error instanceof UnauthorizedError || error instanceof ForbiddenError;
|
|
245
167
|
}
|
|
246
168
|
function isRetryable(error) {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
169
|
+
return (error instanceof InternalServerError ||
|
|
170
|
+
error instanceof ExternalServiceTimeoutError ||
|
|
171
|
+
error instanceof RelayerMarketUnavailableError);
|
|
250
172
|
}
|
|
251
|
-
export { isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, OrchestratorError,
|
|
173
|
+
export { parseErrorEnvelope, isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, OrchestratorError, ValidationError, InsufficientLiquidityError, NotFoundError, UnauthorizedError, ForbiddenError, ConflictError, UnprocessableContentError, RateLimitedError, SettlementQuoteError, SettlementExecutionError, ExternalServiceTimeoutError, RelayerMarketUnavailableError, InternalServerError, UnsupportedChainError, UnsupportedTokenError, };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { AuthProvider } from '../auth/provider.js';
|
|
2
2
|
import { Orchestrator } from './client.js';
|
|
3
3
|
import { RHINESTONE_SPOKE_POOL_ADDRESS } from './consts.js';
|
|
4
|
-
import {
|
|
4
|
+
import { ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InternalServerError, isAuthError, isOrchestratorError, isRateLimited, isRetryable, isValidationError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError } from './error.js';
|
|
5
5
|
import { getAllSupportedChainsAndTokens, getSupportedTokens, getTokenAddress, getTokenDecimals, getTokenSymbol, getWethAddress, isTokenAddressSupported } from './registry.js';
|
|
6
|
-
import type { ApprovalRequired, AuxiliaryFunds, Execution,
|
|
6
|
+
import type { ApprovalRequired, AuxiliaryFunds, Cost, CostTokenEntry, EstimatedFillTime, Execution, FeeBreakdown, Fees, FeeToken, IntentInput, IntentOpStatus, IntentOptions, IntentSubmitRequest, IntentSubmitResponse, Portfolio, Price, Quote, QuoteResponse, SettlementLayer, SignatureMode, SignData, SignedAuthorization, SplitIntentsInput, SplitIntentsResult, SponsorSettings, SupportedChain, TokenConfig, TokenRequirements, TypedDataDefinition, UsdAmount, WrapRequired } from './types.js';
|
|
7
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
8
|
declare function getOrchestrator(authProvider: AuthProvider, orchestratorUrl?: string, headers?: Record<string, string>): Orchestrator;
|
|
9
|
-
export type { AuxiliaryFunds, Execution,
|
|
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,
|
|
9
|
+
export type { ApprovalRequired, AuxiliaryFunds, Cost, CostTokenEntry, EstimatedFillTime, Execution, FeeBreakdown, Fees, FeeToken, IntentInput, IntentOpStatus, IntentOptions, IntentSubmitRequest, IntentSubmitResponse, Portfolio, Price, Quote, QuoteResponse, SettlementLayer, SignatureMode, SignData, SignedAuthorization, SplitIntentsInput, SplitIntentsResult, SponsorSettings, SupportedChain, TokenConfig, TokenRequirements, TypedDataDefinition, UsdAmount, WrapRequired, };
|
|
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, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InternalServerError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError, getOrchestrator, getWethAddress, getTokenSymbol, getTokenAddress, getTokenDecimals, getSupportedTokens, getAllSupportedChainsAndTokens, isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, isTokenAddressSupported, };
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,aAAa,EACb,2BAA2B,EAC3B,cAAc,EACd,0BAA0B,EAC1B,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,6BAA6B,EAC7B,wBAAwB,EACxB,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EAChB,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,IAAI,EACJ,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,SAAS,EACT,KAAK,EACL,KAAK,EACL,aAAa,EACb,eAAe,EACf,aAAa,EACb,QAAQ,EACR,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,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,gBAAgB,EAChB,cAAc,EACd,IAAI,EACJ,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,SAAS,EACT,KAAK,EACL,KAAK,EACL,aAAa,EACb,eAAe,EACf,aAAa,EACb,QAAQ,EACR,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,YAAY,GACb,CAAA;AACD,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,6BAA6B,EAC7B,YAAY,EACZ,aAAa,EACb,2BAA2B,EAC3B,cAAc,EACd,0BAA0B,EAC1B,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,6BAA6B,EAC7B,wBAAwB,EACxB,oBAAoB,EACpB,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,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"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Orchestrator } from './client.js';
|
|
2
2
|
import { PROD_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS } from './consts.js';
|
|
3
|
-
import {
|
|
3
|
+
import { ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InternalServerError, isAuthError, isOrchestratorError, isRateLimited, isRetryable, isValidationError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError, } from './error.js';
|
|
4
4
|
import { getAllSupportedChainsAndTokens, getSupportedTokens, getTokenAddress, getTokenDecimals, getTokenSymbol, getWethAddress, isTokenAddressSupported, } from './registry.js';
|
|
5
5
|
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';
|
|
6
6
|
function getOrchestrator(authProvider, orchestratorUrl, headers) {
|
|
7
7
|
return new Orchestrator(orchestratorUrl ?? PROD_ORCHESTRATOR_URL, authProvider, headers);
|
|
8
8
|
}
|
|
9
|
-
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,
|
|
9
|
+
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, ConflictError, ExternalServiceTimeoutError, ForbiddenError, InsufficientLiquidityError, InternalServerError, NotFoundError, OrchestratorError, RateLimitedError, RelayerMarketUnavailableError, SettlementExecutionError, SettlementQuoteError, UnauthorizedError, UnprocessableContentError, UnsupportedChainError, UnsupportedTokenError, ValidationError, getOrchestrator, getWethAddress, getTokenSymbol, getTokenAddress, getTokenDecimals, getSupportedTokens, getAllSupportedChainsAndTokens, isOrchestratorError, isRetryable, isAuthError, isValidationError, isRateLimited, isTokenAddressSupported, };
|