@rhinestone/sdk 0.7.9 → 0.8.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.
Files changed (138) hide show
  1. package/dist/{src/accounts → accounts}/index.d.ts +2 -2
  2. package/dist/accounts/index.d.ts.map +1 -0
  3. package/dist/{src/accounts → accounts}/index.js +55 -45
  4. package/dist/accounts/nexus.d.ts.map +1 -0
  5. package/dist/{src/accounts → accounts}/nexus.js +48 -42
  6. package/dist/accounts/safe.d.ts.map +1 -0
  7. package/dist/{src/accounts → accounts}/safe.js +35 -29
  8. package/dist/accounts/utils.d.ts.map +1 -0
  9. package/dist/{src/accounts → accounts}/utils.js +23 -19
  10. package/dist/execution/index.d.ts.map +1 -0
  11. package/dist/{src/execution → execution}/index.js +69 -65
  12. package/dist/execution/smart-session.d.ts.map +1 -0
  13. package/dist/execution/smart-session.js +85 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/{src/index.js → index.js} +10 -8
  16. package/dist/modules/abi/smart-sessions.d.ts.map +1 -0
  17. package/dist/modules/common.d.ts.map +1 -0
  18. package/dist/modules/index.d.ts.map +1 -0
  19. package/dist/modules/omni-account.d.ts.map +1 -0
  20. package/dist/modules/validators/core.d.ts.map +1 -0
  21. package/dist/modules/validators/index.d.ts.map +1 -0
  22. package/dist/modules/validators/smart-sessions.d.ts.map +1 -0
  23. package/dist/orchestrator/client.d.ts.map +1 -0
  24. package/dist/orchestrator/consts.d.ts.map +1 -0
  25. package/dist/orchestrator/error.d.ts.map +1 -0
  26. package/dist/orchestrator/index.d.ts.map +1 -0
  27. package/dist/orchestrator/registry.d.ts.map +1 -0
  28. package/dist/orchestrator/types.d.ts.map +1 -0
  29. package/dist/orchestrator/utils.d.ts.map +1 -0
  30. package/dist/types.d.ts.map +1 -0
  31. package/package.json +13 -13
  32. package/dist/cjs/modules/abi/smart-sessions.d.ts.map +0 -1
  33. package/dist/cjs/modules/common.d.ts.map +0 -1
  34. package/dist/cjs/modules/index.d.ts.map +0 -1
  35. package/dist/cjs/modules/omni-account.d.ts.map +0 -1
  36. package/dist/cjs/modules/validators/core.d.ts.map +0 -1
  37. package/dist/cjs/modules/validators/index.d.ts.map +0 -1
  38. package/dist/cjs/modules/validators/smart-sessions.d.ts.map +0 -1
  39. package/dist/cjs/orchestrator/client.d.ts.map +0 -1
  40. package/dist/cjs/orchestrator/consts.d.ts.map +0 -1
  41. package/dist/cjs/orchestrator/error.d.ts.map +0 -1
  42. package/dist/cjs/orchestrator/index.d.ts.map +0 -1
  43. package/dist/cjs/orchestrator/registry.d.ts.map +0 -1
  44. package/dist/cjs/orchestrator/types.d.ts.map +0 -1
  45. package/dist/cjs/orchestrator/utils.d.ts.map +0 -1
  46. package/dist/cjs/types.d.ts.map +0 -1
  47. package/dist/src/accounts/index.d.ts.map +0 -1
  48. package/dist/src/accounts/nexus.d.ts.map +0 -1
  49. package/dist/src/accounts/safe.d.ts.map +0 -1
  50. package/dist/src/accounts/utils.d.ts.map +0 -1
  51. package/dist/src/execution/index.d.ts.map +0 -1
  52. package/dist/src/execution/smart-session.d.ts.map +0 -1
  53. package/dist/src/execution/smart-session.js +0 -81
  54. package/dist/src/index.d.ts.map +0 -1
  55. package/dist/src/modules/abi/smart-sessions.d.ts +0 -42
  56. package/dist/src/modules/abi/smart-sessions.d.ts.map +0 -1
  57. package/dist/src/modules/abi/smart-sessions.js +0 -128
  58. package/dist/src/modules/common.d.ts +0 -16
  59. package/dist/src/modules/common.d.ts.map +0 -1
  60. package/dist/src/modules/common.js +0 -5
  61. package/dist/src/modules/index.d.ts +0 -33
  62. package/dist/src/modules/index.d.ts.map +0 -1
  63. package/dist/src/modules/index.js +0 -146
  64. package/dist/src/modules/omni-account.d.ts +0 -9
  65. package/dist/src/modules/omni-account.d.ts.map +0 -1
  66. package/dist/src/modules/omni-account.js +0 -7
  67. package/dist/src/modules/validators/core.d.ts +0 -23
  68. package/dist/src/modules/validators/core.d.ts.map +0 -1
  69. package/dist/src/modules/validators/core.js +0 -112
  70. package/dist/src/modules/validators/index.d.ts +0 -4
  71. package/dist/src/modules/validators/index.d.ts.map +0 -1
  72. package/dist/src/modules/validators/index.js +0 -3
  73. package/dist/src/modules/validators/smart-sessions.d.ts +0 -29
  74. package/dist/src/modules/validators/smart-sessions.d.ts.map +0 -1
  75. package/dist/src/modules/validators/smart-sessions.js +0 -414
  76. package/dist/src/orchestrator/client.d.ts +0 -29
  77. package/dist/src/orchestrator/client.d.ts.map +0 -1
  78. package/dist/src/orchestrator/client.js +0 -243
  79. package/dist/src/orchestrator/consts.d.ts +0 -5
  80. package/dist/src/orchestrator/consts.d.ts.map +0 -1
  81. package/dist/src/orchestrator/consts.js +0 -4
  82. package/dist/src/orchestrator/error.d.ts +0 -18
  83. package/dist/src/orchestrator/error.d.ts.map +0 -1
  84. package/dist/src/orchestrator/error.js +0 -28
  85. package/dist/src/orchestrator/index.d.ts +0 -11
  86. package/dist/src/orchestrator/index.d.ts.map +0 -1
  87. package/dist/src/orchestrator/index.js +0 -10
  88. package/dist/src/orchestrator/registry.d.ts +0 -17
  89. package/dist/src/orchestrator/registry.d.ts.map +0 -1
  90. package/dist/src/orchestrator/registry.js +0 -344
  91. package/dist/src/orchestrator/types.d.ts +0 -222
  92. package/dist/src/orchestrator/types.d.ts.map +0 -1
  93. package/dist/src/orchestrator/types.js +0 -9
  94. package/dist/src/orchestrator/utils.d.ts +0 -29
  95. package/dist/src/orchestrator/utils.d.ts.map +0 -1
  96. package/dist/src/orchestrator/utils.js +0 -303
  97. package/dist/src/types.d.ts +0 -113
  98. package/dist/src/types.d.ts.map +0 -1
  99. package/dist/src/types.js +0 -1
  100. package/dist/test/modules/validators/smart-sessions.test.d.ts +0 -2
  101. package/dist/test/modules/validators/smart-sessions.test.d.ts.map +0 -1
  102. package/dist/test/modules/validators/smart-sessions.test.js +0 -20
  103. /package/dist/{src/accounts → accounts}/nexus.d.ts +0 -0
  104. /package/dist/{src/accounts → accounts}/safe.d.ts +0 -0
  105. /package/dist/{src/accounts → accounts}/utils.d.ts +0 -0
  106. /package/dist/{src/execution → execution}/index.d.ts +0 -0
  107. /package/dist/{src/execution → execution}/smart-session.d.ts +0 -0
  108. /package/dist/{src/index.d.ts → index.d.ts} +0 -0
  109. /package/dist/{cjs/modules → modules}/abi/smart-sessions.d.ts +0 -0
  110. /package/dist/{cjs/modules → modules}/abi/smart-sessions.js +0 -0
  111. /package/dist/{cjs/modules → modules}/common.d.ts +0 -0
  112. /package/dist/{cjs/modules → modules}/common.js +0 -0
  113. /package/dist/{cjs/modules → modules}/index.d.ts +0 -0
  114. /package/dist/{cjs/modules → modules}/index.js +0 -0
  115. /package/dist/{cjs/modules → modules}/omni-account.d.ts +0 -0
  116. /package/dist/{cjs/modules → modules}/omni-account.js +0 -0
  117. /package/dist/{cjs/modules → modules}/validators/core.d.ts +0 -0
  118. /package/dist/{cjs/modules → modules}/validators/core.js +0 -0
  119. /package/dist/{cjs/modules → modules}/validators/index.d.ts +0 -0
  120. /package/dist/{cjs/modules → modules}/validators/index.js +0 -0
  121. /package/dist/{cjs/modules → modules}/validators/smart-sessions.d.ts +0 -0
  122. /package/dist/{cjs/modules → modules}/validators/smart-sessions.js +0 -0
  123. /package/dist/{cjs/orchestrator → orchestrator}/client.d.ts +0 -0
  124. /package/dist/{cjs/orchestrator → orchestrator}/client.js +0 -0
  125. /package/dist/{cjs/orchestrator → orchestrator}/consts.d.ts +0 -0
  126. /package/dist/{cjs/orchestrator → orchestrator}/consts.js +0 -0
  127. /package/dist/{cjs/orchestrator → orchestrator}/error.d.ts +0 -0
  128. /package/dist/{cjs/orchestrator → orchestrator}/error.js +0 -0
  129. /package/dist/{cjs/orchestrator → orchestrator}/index.d.ts +0 -0
  130. /package/dist/{cjs/orchestrator → orchestrator}/index.js +0 -0
  131. /package/dist/{cjs/orchestrator → orchestrator}/registry.d.ts +0 -0
  132. /package/dist/{cjs/orchestrator → orchestrator}/registry.js +0 -0
  133. /package/dist/{cjs/orchestrator → orchestrator}/types.d.ts +0 -0
  134. /package/dist/{cjs/orchestrator → orchestrator}/types.js +0 -0
  135. /package/dist/{cjs/orchestrator → orchestrator}/utils.d.ts +0 -0
  136. /package/dist/{cjs/orchestrator → orchestrator}/utils.js +0 -0
  137. /package/dist/{cjs/types.d.ts → types.d.ts} +0 -0
  138. /package/dist/{cjs/types.js → types.js} +0 -0
@@ -1,243 +0,0 @@
1
- import axios from 'axios';
2
- import { concat } from 'viem';
3
- import { OrchestratorError } from './error.js';
4
- import { convertBigIntFields, parseCompactResponse, parseOrderCost, parseOrderCostResult, parsePendingBundleEvent, } from './utils.js';
5
- export class Orchestrator {
6
- serverUrl;
7
- apiKey;
8
- constructor(serverUrl, apiKey) {
9
- this.serverUrl = serverUrl;
10
- this.apiKey = apiKey;
11
- }
12
- async getPortfolio(userAddress, filter) {
13
- try {
14
- const response = await axios.get(`${this.serverUrl}/accounts/${userAddress}/portfolio`, {
15
- params: {
16
- chainIds: filter?.chainIds,
17
- tokens: filter?.tokens
18
- ? Object.entries(filter.tokens)
19
- .map(([chainId, tokens]) => tokens.map((token) => `${chainId}:${token}`))
20
- .reduce(concat, [])
21
- : undefined,
22
- },
23
- headers: {
24
- 'x-api-key': this.apiKey,
25
- },
26
- });
27
- return response.data.portfolio.map((balance) => {
28
- return {
29
- ...balance,
30
- balance: BigInt(balance.balance),
31
- tokenChainBalance: balance.tokenChainBalance.map((chainBalance) => {
32
- return {
33
- ...chainBalance,
34
- balance: BigInt(chainBalance.balance),
35
- };
36
- }),
37
- };
38
- });
39
- }
40
- catch (error) {
41
- this.parseError(error);
42
- throw new Error('Failed to get portfolio');
43
- }
44
- }
45
- async getMaxTokenAmount(userAddress, targetChainId, targetTokenAddress, targetGasUnits) {
46
- const intentCost = await this.getIntentCost({
47
- targetChainId,
48
- targetGasUnits,
49
- tokenTransfers: [
50
- {
51
- tokenAddress: targetTokenAddress,
52
- },
53
- ],
54
- }, userAddress);
55
- if (!intentCost.hasFulfilledAll) {
56
- return 0n;
57
- }
58
- const tokenReceived = intentCost.tokensReceived.find((token) => token.tokenAddress.toLowerCase() === targetTokenAddress.toLowerCase());
59
- if (!tokenReceived) {
60
- return 0n;
61
- }
62
- const tokenAmount = tokenReceived.targetAmount;
63
- if (tokenAmount < 0n) {
64
- throw new Error(`Balance not available. Make sure the account is deployed`);
65
- }
66
- return tokenReceived.targetAmount;
67
- }
68
- async getIntentCost(intent, userAddress) {
69
- try {
70
- const response = await axios.post(`${this.serverUrl}/accounts/${userAddress}/bundles/cost`, {
71
- ...convertBigIntFields(intent),
72
- }, {
73
- headers: {
74
- 'x-api-key': this.apiKey,
75
- },
76
- });
77
- return parseOrderCostResult(response.data);
78
- }
79
- catch (error) {
80
- this.parseError(error);
81
- throw new Error(error);
82
- }
83
- }
84
- async getOrderPath(intent, userAddress) {
85
- try {
86
- const response = await axios.post(`${this.serverUrl}/accounts/${userAddress}/bundles/path`, {
87
- ...convertBigIntFields(intent),
88
- }, {
89
- headers: {
90
- 'x-api-key': this.apiKey,
91
- },
92
- });
93
- return response.data.orderBundles.map((orderPath) => {
94
- return {
95
- orderBundle: parseCompactResponse(orderPath.orderBundle),
96
- injectedExecutions: orderPath.injectedExecutions.map((exec) => {
97
- return {
98
- ...exec,
99
- value: BigInt(exec.value),
100
- };
101
- }),
102
- intentCost: parseOrderCost(orderPath.intentCost),
103
- };
104
- });
105
- }
106
- catch (error) {
107
- this.parseError(error);
108
- throw new Error(error);
109
- }
110
- }
111
- async postSignedOrderBundle(signedOrderBundles) {
112
- try {
113
- const bundles = signedOrderBundles.map((signedOrderBundle) => {
114
- return {
115
- signedOrderBundle: convertBigIntFields(signedOrderBundle.signedOrderBundle),
116
- initCode: signedOrderBundle.initCode,
117
- userOp: signedOrderBundle.userOp
118
- ? convertBigIntFields(signedOrderBundle.userOp)
119
- : undefined,
120
- };
121
- });
122
- const response = await axios.post(`${this.serverUrl}/bundles`, {
123
- bundles,
124
- }, {
125
- headers: {
126
- 'x-api-key': this.apiKey,
127
- },
128
- });
129
- return response.data.bundleResults.map((bundleResult) => {
130
- return {
131
- ...bundleResult,
132
- bundleId: BigInt(bundleResult.bundleId),
133
- };
134
- });
135
- }
136
- catch (error) {
137
- this.parseError(error);
138
- throw new Error('Failed to post order bundle');
139
- }
140
- }
141
- async getBundleStatus(bundleId) {
142
- try {
143
- const response = await axios.get(`${this.serverUrl}/bundles/${bundleId.toString()}`, {
144
- headers: {
145
- 'x-api-key': this.apiKey,
146
- },
147
- });
148
- response.data.claims = response.data.claims.map((claim) => {
149
- return {
150
- ...claim,
151
- depositId: BigInt(claim.depositId),
152
- };
153
- });
154
- return response.data;
155
- }
156
- catch (error) {
157
- this.parseError(error);
158
- throw new Error('Failed to get bundle status');
159
- }
160
- }
161
- async getPendingBundles(count = 20, offset = 0) {
162
- try {
163
- const response = await axios.get(`${this.serverUrl}/bundles/events`, {
164
- params: {
165
- count,
166
- offset,
167
- },
168
- headers: {
169
- 'x-api-key': this.apiKey,
170
- },
171
- });
172
- const { events: pendingBundles, nextOffset } = response.data;
173
- return {
174
- pendingBundles: pendingBundles.map(parsePendingBundleEvent),
175
- nextOffset,
176
- };
177
- }
178
- catch (error) {
179
- this.parseError(error);
180
- throw new Error('Failed to get pending bundles');
181
- }
182
- }
183
- parseError(error) {
184
- if (error.response) {
185
- let errorType;
186
- if (error.response.status) {
187
- switch (error.response.status) {
188
- case 400:
189
- errorType = 'Bad Request';
190
- break;
191
- case 401:
192
- errorType = 'Unauthorized';
193
- break;
194
- case 403:
195
- errorType = 'Forbidden';
196
- break;
197
- case 404:
198
- errorType = 'Not Found';
199
- break;
200
- case 409:
201
- errorType = 'Conflict';
202
- break;
203
- case 422:
204
- errorType = 'Unprocessable Entity';
205
- break;
206
- case 500:
207
- errorType = 'Internal Server Error';
208
- break;
209
- default:
210
- errorType = 'Unknown';
211
- }
212
- }
213
- let context = {};
214
- if (error.response.data) {
215
- const { errors, traceId } = error.response.data;
216
- for (const err of errors) {
217
- let errorMessage = `Rhinestone Error: ${err.message}`;
218
- if (errorType) {
219
- errorMessage += ` (${errorType})`;
220
- }
221
- if (traceId) {
222
- errorMessage += ` [Trace ID: ${traceId}]`;
223
- context.traceId = traceId;
224
- }
225
- console.error(errorMessage);
226
- if (err.context) {
227
- console.error(`Context: ${JSON.stringify(err.context, undefined, 4)}`);
228
- }
229
- context = { ...context, ...err.context };
230
- }
231
- }
232
- else {
233
- console.error(error);
234
- }
235
- throw new OrchestratorError({
236
- message: error.response.data.errors[0].message,
237
- context,
238
- errorType,
239
- traceId: context.traceId,
240
- });
241
- }
242
- }
243
- }
@@ -1,5 +0,0 @@
1
- declare const PROD_ORCHESTRATOR_URL = "https://orchestrator.rhinestone.wtf";
2
- declare const DEV_ORCHESTRATOR_URL = "https://dev.orchestrator.rhinestone.wtf";
3
- declare const RHINESTONE_SPOKE_POOL_ADDRESS = "0x000000000060f6e853447881951574cdd0663530";
4
- export { PROD_ORCHESTRATOR_URL, DEV_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS, };
5
- //# sourceMappingURL=consts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../orchestrator/consts.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,qBAAqB,wCAAwC,CAAA;AACnE,QAAA,MAAM,oBAAoB,4CAA4C,CAAA;AACtE,QAAA,MAAM,6BAA6B,+CACW,CAAA;AAE9C,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,6BAA6B,GAC9B,CAAA"}
@@ -1,4 +0,0 @@
1
- const PROD_ORCHESTRATOR_URL = 'https://orchestrator.rhinestone.wtf';
2
- const DEV_ORCHESTRATOR_URL = 'https://dev.orchestrator.rhinestone.wtf';
3
- const RHINESTONE_SPOKE_POOL_ADDRESS = '0x000000000060f6e853447881951574cdd0663530';
4
- export { PROD_ORCHESTRATOR_URL, DEV_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS, };
@@ -1,18 +0,0 @@
1
- export declare class OrchestratorError extends Error {
2
- private readonly _message;
3
- private readonly _context;
4
- private readonly _errorType;
5
- private readonly _traceId;
6
- constructor(params?: {
7
- message?: string;
8
- context?: any;
9
- errorType?: string;
10
- traceId?: string;
11
- });
12
- get message(): string;
13
- get context(): any;
14
- get errorType(): string;
15
- get traceId(): string;
16
- }
17
- export declare function isOrchestratorError(error: Error): error is OrchestratorError;
18
- //# sourceMappingURL=error.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../orchestrator/error.ts"],"names":[],"mappings":"AAAA,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,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;gBAErB,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;IAQD,IAAI,OAAO,WAEV;IAED,IAAI,OAAO,QAEV;IAED,IAAI,SAAS,WAEZ;IAED,IAAI,OAAO,WAEV;CACF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,iBAAiB,CAE5E"}
@@ -1,28 +0,0 @@
1
- export class OrchestratorError extends Error {
2
- _message;
3
- _context;
4
- _errorType;
5
- _traceId;
6
- constructor(params) {
7
- super();
8
- this._message = params?.message || 'OrchestratorError ';
9
- this._context = params?.context || {};
10
- this._errorType = params?.errorType || 'Unknown';
11
- this._traceId = params?.traceId || '';
12
- }
13
- get message() {
14
- return this._message;
15
- }
16
- get context() {
17
- return this._context;
18
- }
19
- get errorType() {
20
- return this._errorType;
21
- }
22
- get traceId() {
23
- return this._traceId;
24
- }
25
- }
26
- export function isOrchestratorError(error) {
27
- return error instanceof OrchestratorError;
28
- }
@@ -1,11 +0,0 @@
1
- import { Orchestrator } from './client';
2
- import { RHINESTONE_SPOKE_POOL_ADDRESS } from './consts';
3
- import { isOrchestratorError, OrchestratorError } from './error';
4
- import { getHookAddress, getRhinestoneSpokePoolAddress, getSameChainModuleAddress, getSupportedTokens, getTargetModuleAddress, getTokenAddress, getTokenBalanceSlot, getTokenRootBalanceSlot, getTokenSymbol, getWethAddress, isTokenAddressSupported } from './registry';
5
- import type { BundleResult, Execution, MetaIntent, MultiChainCompact, OrderCost, OrderCostResult, OrderFeeInput, OrderPath, PostOrderBundleResult, SignedMultiChainCompact, UserTokenBalance } from './types';
6
- import { BUNDLE_STATUS_COMPLETED, BUNDLE_STATUS_EXPIRED, BUNDLE_STATUS_FAILED, BUNDLE_STATUS_FILLED, BUNDLE_STATUS_PARTIALLY_COMPLETED, BUNDLE_STATUS_PENDING, BUNDLE_STATUS_PRECONFIRMED, BUNDLE_STATUS_UNKNOWN } from './types';
7
- import { applyInjectedExecutions, BundleStatusEnum, getEmptyUserOp, getOrderBundleHash } from './utils';
8
- declare function getOrchestrator(apiKey: string, orchestratorUrl?: string): Orchestrator;
9
- export type { Execution, BundleResult, MetaIntent, MultiChainCompact, OrderPath, SignedMultiChainCompact, PostOrderBundleResult, OrderCost, OrderCostResult, OrderFeeInput, UserTokenBalance, };
10
- export { BundleStatusEnum as BundleStatus, BUNDLE_STATUS_PENDING, BUNDLE_STATUS_EXPIRED, BUNDLE_STATUS_PARTIALLY_COMPLETED, BUNDLE_STATUS_COMPLETED, BUNDLE_STATUS_FILLED, BUNDLE_STATUS_FAILED, BUNDLE_STATUS_PRECONFIRMED, BUNDLE_STATUS_UNKNOWN, RHINESTONE_SPOKE_POOL_ADDRESS, Orchestrator, OrchestratorError, getOrchestrator, getOrderBundleHash, getEmptyUserOp, getWethAddress, getTokenBalanceSlot, getTokenRootBalanceSlot, getTokenSymbol, getHookAddress, getSameChainModuleAddress, getTargetModuleAddress, getRhinestoneSpokePoolAddress, getTokenAddress, getSupportedTokens, isOrchestratorError, isTokenAddressSupported, applyInjectedExecutions, };
11
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAChE,OAAO,EACL,cAAc,EACd,6BAA6B,EAC7B,yBAAyB,EACzB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,uBAAuB,EACxB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,aAAa,EACb,SAAS,EACT,qBAAqB,EACrB,uBAAuB,EACvB,gBAAgB,EACjB,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;AAChB,OAAO,EACL,uBAAuB,EACvB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAEhB,iBAAS,eAAe,CACtB,MAAM,EAAE,MAAM,EACd,eAAe,CAAC,EAAE,MAAM,GACvB,YAAY,CAEd;AAED,YAAY,EACV,SAAS,EACT,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,SAAS,EACT,uBAAuB,EACvB,qBAAqB,EACrB,SAAS,EACT,eAAe,EACf,aAAa,EACb,gBAAgB,GACjB,CAAA;AACD,OAAO,EACL,gBAAgB,IAAI,YAAY,EAChC,qBAAqB,EACrB,qBAAqB,EACrB,iCAAiC,EACjC,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,EACrB,6BAA6B,EAC7B,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,6BAA6B,EAC7B,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,GACxB,CAAA"}
@@ -1,10 +0,0 @@
1
- import { Orchestrator } from './client.js';
2
- import { PROD_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS } from './consts.js';
3
- import { isOrchestratorError, OrchestratorError } from './error.js';
4
- import { getHookAddress, getRhinestoneSpokePoolAddress, getSameChainModuleAddress, getSupportedTokens, getTargetModuleAddress, getTokenAddress, getTokenBalanceSlot, getTokenRootBalanceSlot, getTokenSymbol, getWethAddress, isTokenAddressSupported, } from './registry.js';
5
- import { BUNDLE_STATUS_COMPLETED, BUNDLE_STATUS_EXPIRED, BUNDLE_STATUS_FAILED, BUNDLE_STATUS_FILLED, BUNDLE_STATUS_PARTIALLY_COMPLETED, BUNDLE_STATUS_PENDING, BUNDLE_STATUS_PRECONFIRMED, BUNDLE_STATUS_UNKNOWN, } from './types.js';
6
- import { applyInjectedExecutions, BundleStatusEnum, getEmptyUserOp, getOrderBundleHash, } from './utils.js';
7
- function getOrchestrator(apiKey, orchestratorUrl) {
8
- return new Orchestrator(orchestratorUrl ?? PROD_ORCHESTRATOR_URL, apiKey);
9
- }
10
- export { BundleStatusEnum as BundleStatus, BUNDLE_STATUS_PENDING, BUNDLE_STATUS_EXPIRED, BUNDLE_STATUS_PARTIALLY_COMPLETED, BUNDLE_STATUS_COMPLETED, BUNDLE_STATUS_FILLED, BUNDLE_STATUS_FAILED, BUNDLE_STATUS_PRECONFIRMED, BUNDLE_STATUS_UNKNOWN, RHINESTONE_SPOKE_POOL_ADDRESS, Orchestrator, OrchestratorError, getOrchestrator, getOrderBundleHash, getEmptyUserOp, getWethAddress, getTokenBalanceSlot, getTokenRootBalanceSlot, getTokenSymbol, getHookAddress, getSameChainModuleAddress, getTargetModuleAddress, getRhinestoneSpokePoolAddress, getTokenAddress, getSupportedTokens, isOrchestratorError, isTokenAddressSupported, applyInjectedExecutions, };
@@ -1,17 +0,0 @@
1
- import { type Address, type Chain, type Hex } from 'viem';
2
- import { TokenConfig } from './types';
3
- declare function getWethAddress(chain: Chain): "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" | "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14" | "0x4200000000000000000000000000000000000006" | "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" | "0x980B62Da83eFf3D4576C647993b0c1D7faf17c73" | "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619" | "0x52eF3d68BaB452a294342DC3e5f464d7f610f72E";
4
- declare function getTokenRootBalanceSlot(chain: Chain, tokenAddress: Address): bigint | null;
5
- declare function getTokenBalanceSlot(tokenSymbol: string, chainId: number, accountAddress: Address): Hex;
6
- declare function getHookAddress(_chainId?: number): Address;
7
- declare function getSameChainModuleAddress(_chainId?: number): Address;
8
- declare function getTargetModuleAddress(_chainId?: number): Address;
9
- declare function getRhinestoneSpokePoolAddress(_chainId?: number): Address;
10
- declare function getTokenSymbol(tokenAddress: Address, chainId: number): string;
11
- declare function getTokenAddress(tokenSymbol: string, chainId: number): Address;
12
- declare function getChainById(chainId: number): Chain | undefined;
13
- declare function isTestnet(chainId: number): boolean;
14
- declare function isTokenAddressSupported(address: Address, chainId: number): boolean;
15
- declare function getSupportedTokens(chainId: number): TokenConfig[];
16
- export { getTokenSymbol, getTokenAddress, getTokenRootBalanceSlot, getTokenBalanceSlot, getWethAddress, getHookAddress, getSameChainModuleAddress, getTargetModuleAddress, getRhinestoneSpokePoolAddress, getChainById, getSupportedTokens, isTestnet, isTokenAddressSupported, };
17
- //# sourceMappingURL=registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../orchestrator/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,KAAK,EAEV,KAAK,GAAG,EAGT,MAAM,MAAM,CAAA;AAcb,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAErC,iBAAS,cAAc,CAAC,KAAK,EAAE,KAAK,0UAoCnC;AAwCD,iBAAS,uBAAuB,CAC9B,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,OAAO,GACpB,MAAM,GAAG,IAAI,CAqJf;AAED,iBAAS,mBAAmB,CAC1B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,OAAO,GACtB,GAAG,CAgBL;AAED,iBAAS,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAElD;AAED,iBAAS,yBAAyB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED,iBAAS,sBAAsB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,iBAAS,6BAA6B,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAEjE;AAED,iBAAS,cAAc,CAAC,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAWtE;AAED,iBAAS,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAetE;AAED,iBAAS,YAAY,CAAC,OAAO,EAAE,MAAM,qBAkBpC;AAED,iBAAS,SAAS,CAAC,OAAO,EAAE,MAAM,WAMjC;AAED,iBAAS,uBAAuB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAW3E;AAED,iBAAS,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,EAAE,CAkB1D;AAkBD,OAAO,EACL,cAAc,EACd,eAAe,EACf,uBAAuB,EACvB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,yBAAyB,EACzB,sBAAsB,EACtB,6BAA6B,EAC7B,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,uBAAuB,GACxB,CAAA"}