@rhinestone/sdk 1.0.0-alpha.4 → 1.0.0-alpha.6

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.
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WEBAUTHN_VALIDATOR_ADDRESS = exports.OWNABLE_VALIDATOR_ADDRESS = void 0;
3
+ exports.MULTI_FACTOR_VALIDATOR_ADDRESS = exports.WEBAUTHN_VALIDATOR_ADDRESS = exports.OWNABLE_VALIDATOR_ADDRESS = void 0;
4
4
  exports.getOwnerValidator = getOwnerValidator;
5
5
  exports.getOwnableValidator = getOwnableValidator;
6
6
  exports.getWebAuthnValidator = getWebAuthnValidator;
7
+ exports.getMultiFactorValidator = getMultiFactorValidator;
7
8
  exports.getSocialRecoveryValidator = getSocialRecoveryValidator;
8
9
  exports.getValidator = getValidator;
9
10
  exports.getMockSignature = getMockSignature;
@@ -14,6 +15,8 @@ exports.OWNABLE_VALIDATOR_ADDRESS = OWNABLE_VALIDATOR_ADDRESS;
14
15
  const WEBAUTHN_VALIDATOR_ADDRESS = '0x2f167e55d42584f65e2e30a748f41ee75a311414';
15
16
  exports.WEBAUTHN_VALIDATOR_ADDRESS = WEBAUTHN_VALIDATOR_ADDRESS;
16
17
  const SOCIAL_RECOVERY_VALIDATOR_ADDRESS = '0xA04D053b3C8021e8D5bF641816c42dAA75D8b597';
18
+ const MULTI_FACTOR_VALIDATOR_ADDRESS = '0xf6bDf42c9BE18cEcA5C06c42A43DAf7FBbe7896b';
19
+ exports.MULTI_FACTOR_VALIDATOR_ADDRESS = MULTI_FACTOR_VALIDATOR_ADDRESS;
17
20
  const ECDSA_MOCK_SIGNATURE = '0x81d4b4981670cb18f99f0b4a66446df1bf5b204d24cfcb659bf38ba27a4359b5711649ec2423c5e1247245eba2964679b6a1dbb85c992ae40b9b00c6935b02ff1b';
18
21
  const WEBAUTHN_MOCK_SIGNATURE = '0x00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000001635bc6d0f68ff895cae8a288ecf7542a6a9cd555df784b73e1e2ea7e9104b1db15e9015d280cb19527881c625fee43fd3a405d5b0d199a8c8e6589a7381209e40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97631d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f47b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a22746278584e465339585f3442797231634d77714b724947422d5f3330613051685a36793775634d30424f45222c226f726967696e223a22687474703a2f2f6c6f63616c686f73743a33303030222c2263726f73734f726967696e223a66616c73652c20226f746865725f6b6579735f63616e5f62655f61646465645f68657265223a22646f206e6f7420636f6d7061726520636c69656e74446174614a534f4e20616761696e737420612074656d706c6174652e205365652068747470733a2f2f676f6f2e676c2f796162506578227d000000000000000000000000';
19
22
  function getOwnerValidator(config) {
@@ -28,23 +31,52 @@ function getMockSignature(ownerSet) {
28
31
  }
29
32
  case 'passkey':
30
33
  return WEBAUTHN_MOCK_SIGNATURE;
34
+ case 'multi-factor': {
35
+ const mockValidators = ownerSet.validators.map((validator, index) => {
36
+ const validatorModule = getValidator(validator);
37
+ const signature = getMockSignature(validator);
38
+ return {
39
+ packedValidatorAndId: (0, viem_1.encodePacked)(['bytes12', 'address'], [
40
+ (0, viem_1.pad)((0, viem_1.toHex)(index), {
41
+ size: 12,
42
+ }),
43
+ validatorModule.address,
44
+ ]),
45
+ data: signature,
46
+ };
47
+ });
48
+ return (0, viem_1.encodeAbiParameters)([
49
+ {
50
+ components: [
51
+ {
52
+ internalType: 'bytes32',
53
+ name: 'packedValidatorAndId',
54
+ type: 'bytes32',
55
+ },
56
+ { internalType: 'bytes', name: 'data', type: 'bytes' },
57
+ ],
58
+ name: 'validators',
59
+ type: 'tuple[]',
60
+ },
61
+ ], [mockValidators]);
62
+ }
31
63
  }
32
64
  }
33
65
  function getValidator(owners) {
34
66
  switch (owners.type) {
35
67
  case 'ecdsa':
36
- return getOwnableValidator({
37
- threshold: owners.threshold ?? 1,
38
- owners: owners.accounts.map((account) => account.address),
39
- });
68
+ return getOwnableValidator(owners.threshold ?? 1, owners.accounts.map((account) => account.address));
40
69
  case 'passkey':
41
70
  return getWebAuthnValidator({
42
71
  pubKey: owners.account.publicKey,
43
72
  authenticatorId: owners.account.id,
44
73
  });
74
+ case 'multi-factor': {
75
+ return getMultiFactorValidator(owners.threshold ?? 1, owners.validators);
76
+ }
45
77
  }
46
78
  }
47
- function getOwnableValidator({ threshold, owners, }) {
79
+ function getOwnableValidator(threshold, owners) {
48
80
  return {
49
81
  address: OWNABLE_VALIDATOR_ADDRESS,
50
82
  initData: (0, viem_1.encodeAbiParameters)([
@@ -110,6 +142,49 @@ function getWebAuthnValidator(webAuthnCredential) {
110
142
  type: common_1.MODULE_TYPE_ID_VALIDATOR,
111
143
  };
112
144
  }
145
+ function getMultiFactorValidator(threshold, validators) {
146
+ return {
147
+ address: MULTI_FACTOR_VALIDATOR_ADDRESS,
148
+ initData: (0, viem_1.encodePacked)(['uint8', 'bytes'], [
149
+ threshold,
150
+ (0, viem_1.encodeAbiParameters)([
151
+ {
152
+ components: [
153
+ {
154
+ internalType: 'bytes32',
155
+ name: 'packedValidatorAndId',
156
+ type: 'bytes32',
157
+ },
158
+ { internalType: 'bytes', name: 'data', type: 'bytes' },
159
+ ],
160
+ name: 'validators',
161
+ type: 'tuple[]',
162
+ },
163
+ ], [
164
+ validators
165
+ .map((validator, index) => {
166
+ if (validator === null) {
167
+ return null;
168
+ }
169
+ const validatorModule = getValidator(validator);
170
+ return {
171
+ packedValidatorAndId: (0, viem_1.concat)([
172
+ (0, viem_1.pad)((0, viem_1.toHex)(index), {
173
+ size: 12,
174
+ }),
175
+ validatorModule.address,
176
+ ]),
177
+ data: validatorModule.initData,
178
+ };
179
+ })
180
+ .filter((validator) => validator !== null),
181
+ ]),
182
+ ]),
183
+ deInitData: '0x',
184
+ additionalContext: '0x',
185
+ type: common_1.MODULE_TYPE_ID_VALIDATOR,
186
+ };
187
+ }
113
188
  function getSocialRecoveryValidator(guardians, threshold = 1) {
114
189
  const guardianAddresses = guardians.map((guardian) => guardian.address);
115
190
  guardianAddresses.sort();
@@ -16,5 +16,6 @@ export declare class Orchestrator {
16
16
  submitIntent(signedIntentOp: SignedIntentOp): Promise<IntentResult>;
17
17
  getIntentOpStatus(intentId: bigint): Promise<IntentOpStatus>;
18
18
  private parseError;
19
+ private parseErrorMessage;
19
20
  }
20
21
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../orchestrator/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,OAAO,EAAuB,MAAM,MAAM,CAAA;AAexD,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,EACX,SAAS,EAET,cAAc,EACf,MAAM,SAAS,CAAA;AAGhB,qBAAa,YAAY;IACvB,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,MAAM,CAAQ;gBAEV,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAKvC,YAAY,CAChB,WAAW,EAAE,OAAO,EACpB,MAAM,CAAC,EAAE;QACP,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,MAAM,CAAC,EAAE;YACP,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,EAAE,CAAA;SAC7B,CAAA;KACF,GACA,OAAO,CAAC,SAAS,CAAC;IAmDf,iBAAiB,CACrB,WAAW,EAAE,OAAO,EACpB,kBAAkB,EAAE,MAAM,EAC1B,uBAAuB,EAAE,OAAO,EAChC,mBAAmB,EAAE,MAAM,GAC1B,OAAO,CAAC,MAAM,CAAC;IAyCZ,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,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IAqBnE,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAkBlE,OAAO,CAAC,UAAU;IA0ElB,OAAO,CAAC,iBAAiB;CAmD1B"}
@@ -186,7 +186,15 @@ class Orchestrator {
186
186
  }
187
187
  let context = {};
188
188
  if (error.response.data) {
189
- const { errors, traceId } = error.response.data;
189
+ const { errors, traceId, message } = error.response.data;
190
+ if (message) {
191
+ const mainErrorParams = {
192
+ context: { traceId },
193
+ errorType,
194
+ traceId,
195
+ };
196
+ this.parseErrorMessage(message, mainErrorParams);
197
+ }
190
198
  for (const err of errors) {
191
199
  let errorMessage = `Rhinestone Error: ${err.message}`;
192
200
  if (errorType) {
@@ -207,60 +215,7 @@ class Orchestrator {
207
215
  errorType,
208
216
  traceId,
209
217
  };
210
- if (message === 'Insufficient balance') {
211
- throw new error_1.InsufficientBalanceError(finalErrorParams);
212
- }
213
- else if (message === 'Unsupported chain id') {
214
- throw new error_1.UnsupportedChainIdError(finalErrorParams);
215
- }
216
- else if (message.startsWith('Unsupported chain ')) {
217
- const chainIdMatch = message.match(/Unsupported chain (\d+)/);
218
- if (chainIdMatch) {
219
- const chainId = parseInt(chainIdMatch[1], 10);
220
- throw new error_1.UnsupportedChainError(chainId, finalErrorParams);
221
- }
222
- throw new error_1.UnsupportedChainIdError(finalErrorParams);
223
- }
224
- else if (message.includes('Unsupported token') &&
225
- message.includes('for chain')) {
226
- const tokenMatch = message.match(/Unsupported token (\w+) for chain (\d+)/);
227
- if (tokenMatch) {
228
- const tokenSymbol = tokenMatch[1];
229
- const chainId = parseInt(tokenMatch[2], 10);
230
- throw new error_1.UnsupportedTokenError(tokenSymbol, chainId, finalErrorParams);
231
- }
232
- throw new error_1.OrchestratorError({ message, ...finalErrorParams });
233
- }
234
- else if (message.includes('not supported on chain')) {
235
- const tokenMatch = message.match(/Token (.+) not supported on chain (\d+)/);
236
- if (tokenMatch) {
237
- const tokenAddress = tokenMatch[1];
238
- const chainId = parseInt(tokenMatch[2], 10);
239
- throw new error_1.TokenNotSupportedError(tokenAddress, chainId, finalErrorParams);
240
- }
241
- throw new error_1.OrchestratorError({ message, ...finalErrorParams });
242
- }
243
- else if (message === 'Authentication is required') {
244
- throw new error_1.AuthenticationRequiredError(finalErrorParams);
245
- }
246
- else if (message === 'Invalid API key') {
247
- throw new error_1.InvalidApiKeyError(finalErrorParams);
248
- }
249
- else if (message === 'Invalid bundle signature') {
250
- throw new error_1.InvalidIntentSignatureError(finalErrorParams);
251
- }
252
- else if (message === 'Only one target token amount can be unset') {
253
- throw new error_1.OnlyOneTargetTokenAmountCanBeUnsetError(finalErrorParams);
254
- }
255
- else if (message === 'No Path Found') {
256
- throw new error_1.NoPathFoundError(finalErrorParams);
257
- }
258
- else if (message === 'Order bundle not found') {
259
- throw new error_1.IntentNotFoundError(finalErrorParams);
260
- }
261
- else {
262
- throw new error_1.OrchestratorError({ message, ...finalErrorParams });
263
- }
218
+ this.parseErrorMessage(message, finalErrorParams);
264
219
  }
265
220
  }
266
221
  else {
@@ -268,5 +223,61 @@ class Orchestrator {
268
223
  }
269
224
  }
270
225
  }
226
+ parseErrorMessage(message, errorParams) {
227
+ if (message === 'Insufficient balance') {
228
+ throw new error_1.InsufficientBalanceError(errorParams);
229
+ }
230
+ else if (message === 'Unsupported chain id') {
231
+ throw new error_1.UnsupportedChainIdError(errorParams);
232
+ }
233
+ else if (message.startsWith('Unsupported chain ')) {
234
+ const chainIdMatch = message.match(/Unsupported chain (\d+)/);
235
+ if (chainIdMatch) {
236
+ const chainId = parseInt(chainIdMatch[1], 10);
237
+ throw new error_1.UnsupportedChainError(chainId, errorParams);
238
+ }
239
+ throw new error_1.UnsupportedChainIdError(errorParams);
240
+ }
241
+ else if (message.includes('Unsupported token') &&
242
+ message.includes('for chain')) {
243
+ const tokenMatch = message.match(/Unsupported token (\w+) for chain (\d+)/);
244
+ if (tokenMatch) {
245
+ const tokenSymbol = tokenMatch[1];
246
+ const chainId = parseInt(tokenMatch[2], 10);
247
+ throw new error_1.UnsupportedTokenError(tokenSymbol, chainId, errorParams);
248
+ }
249
+ throw new error_1.OrchestratorError({ message, ...errorParams });
250
+ }
251
+ else if (message.includes('not supported on chain')) {
252
+ const tokenMatch = message.match(/Token (.+) not supported on chain (\d+)/);
253
+ if (tokenMatch) {
254
+ const tokenAddress = tokenMatch[1];
255
+ const chainId = parseInt(tokenMatch[2], 10);
256
+ throw new error_1.TokenNotSupportedError(tokenAddress, chainId, errorParams);
257
+ }
258
+ throw new error_1.OrchestratorError({ message, ...errorParams });
259
+ }
260
+ else if (message === 'Authentication is required') {
261
+ throw new error_1.AuthenticationRequiredError(errorParams);
262
+ }
263
+ else if (message === 'Invalid API key') {
264
+ throw new error_1.InvalidApiKeyError(errorParams);
265
+ }
266
+ else if (message === 'Invalid bundle signature') {
267
+ throw new error_1.InvalidIntentSignatureError(errorParams);
268
+ }
269
+ else if (message === 'Only one target token amount can be unset') {
270
+ throw new error_1.OnlyOneTargetTokenAmountCanBeUnsetError(errorParams);
271
+ }
272
+ else if (message === 'No Path Found') {
273
+ throw new error_1.NoPathFoundError(errorParams);
274
+ }
275
+ else if (message === 'Order bundle not found') {
276
+ throw new error_1.IntentNotFoundError(errorParams);
277
+ }
278
+ else {
279
+ throw new error_1.OrchestratorError({ message, ...errorParams });
280
+ }
281
+ }
271
282
  }
272
283
  exports.Orchestrator = Orchestrator;
@@ -1,5 +1,5 @@
1
- declare const PROD_ORCHESTRATOR_URL = "https://dev.v1.orchestrator.rhinestone.dev";
2
- declare const DEV_ORCHESTRATOR_URL = "https://dev.v1.orchestrator.rhinestone.dev";
1
+ declare const PROD_ORCHESTRATOR_URL = "https://v1.orchestrator.rhinestone.dev";
2
+ declare const STAGING_ORCHESTRATOR_URL = "https://staging.v1.orchestrator.rhinestone.dev";
3
3
  declare const RHINESTONE_SPOKE_POOL_ADDRESS = "0x000000000060f6e853447881951574cdd0663530";
4
- export { PROD_ORCHESTRATOR_URL, DEV_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS, };
4
+ export { PROD_ORCHESTRATOR_URL, STAGING_ORCHESTRATOR_URL, RHINESTONE_SPOKE_POOL_ADDRESS, };
5
5
  //# 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,+CAA+C,CAAA;AAC1E,QAAA,MAAM,oBAAoB,+CAA+C,CAAA;AACzE,QAAA,MAAM,6BAA6B,+CACW,CAAA;AAE9C,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,6BAA6B,GAC9B,CAAA"}
1
+ {"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../../orchestrator/consts.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,qBAAqB,2CAA2C,CAAA;AACtE,QAAA,MAAM,wBAAwB,mDACoB,CAAA;AAClD,QAAA,MAAM,6BAA6B,+CACW,CAAA;AAE9C,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,6BAA6B,GAC9B,CAAA"}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RHINESTONE_SPOKE_POOL_ADDRESS = exports.DEV_ORCHESTRATOR_URL = exports.PROD_ORCHESTRATOR_URL = void 0;
4
- const PROD_ORCHESTRATOR_URL = 'https://dev.v1.orchestrator.rhinestone.dev';
3
+ exports.RHINESTONE_SPOKE_POOL_ADDRESS = exports.STAGING_ORCHESTRATOR_URL = exports.PROD_ORCHESTRATOR_URL = void 0;
4
+ const PROD_ORCHESTRATOR_URL = 'https://v1.orchestrator.rhinestone.dev';
5
5
  exports.PROD_ORCHESTRATOR_URL = PROD_ORCHESTRATOR_URL;
6
- const DEV_ORCHESTRATOR_URL = 'https://dev.v1.orchestrator.rhinestone.dev';
7
- exports.DEV_ORCHESTRATOR_URL = DEV_ORCHESTRATOR_URL;
6
+ const STAGING_ORCHESTRATOR_URL = 'https://staging.v1.orchestrator.rhinestone.dev';
7
+ exports.STAGING_ORCHESTRATOR_URL = STAGING_ORCHESTRATOR_URL;
8
8
  const RHINESTONE_SPOKE_POOL_ADDRESS = '0x000000000060f6e853447881951574cdd0663530';
9
9
  exports.RHINESTONE_SPOKE_POOL_ADDRESS = RHINESTONE_SPOKE_POOL_ADDRESS;
@@ -14,6 +14,11 @@ interface WebauthnValidatorConfig {
14
14
  type: 'passkey';
15
15
  account: WebAuthnAccount;
16
16
  }
17
+ interface MultiFactorValidatorConfig {
18
+ type: 'multi-factor';
19
+ validators: (OwnableValidatorConfig | WebauthnValidatorConfig)[];
20
+ threshold?: number;
21
+ }
17
22
  interface ProviderConfig {
18
23
  type: 'alchemy';
19
24
  apiKey: string;
@@ -26,7 +31,7 @@ interface PaymasterConfig {
26
31
  type: 'pimlico' | 'biconomy';
27
32
  apiKey: string;
28
33
  }
29
- type OwnerSet = OwnableValidatorConfig | WebauthnValidatorConfig;
34
+ type OwnerSet = OwnableValidatorConfig | WebauthnValidatorConfig | MultiFactorValidatorConfig;
30
35
  interface SudoPolicy {
31
36
  type: 'sudo';
32
37
  }
@@ -83,7 +88,6 @@ interface RhinestoneAccountConfig {
83
88
  account?: AccountProviderConfig;
84
89
  owners: OwnerSet;
85
90
  rhinestoneApiKey: string;
86
- deployerAccount?: Account;
87
91
  sessions?: Session[];
88
92
  recovery?: Recovery;
89
93
  eoa?: Account;
@@ -114,6 +118,18 @@ type OwnerSignerSet = {
114
118
  type: 'owner';
115
119
  kind: 'passkey';
116
120
  account: WebAuthnAccount;
121
+ } | {
122
+ type: 'owner';
123
+ kind: 'multi-factor';
124
+ validators: ({
125
+ type: 'ecdsa';
126
+ id: number | Hex;
127
+ accounts: Account[];
128
+ } | {
129
+ type: 'passkey';
130
+ id: number | Hex;
131
+ account: WebAuthnAccount;
132
+ })[];
117
133
  };
118
134
  interface SessionSignerSet {
119
135
  type: 'session';
@@ -135,9 +151,9 @@ interface SameChainTransaction extends BaseTransaction {
135
151
  chain: Chain;
136
152
  }
137
153
  interface CrossChainTransaction extends BaseTransaction {
138
- sourceChain?: Chain;
154
+ sourceChains?: Chain[];
139
155
  targetChain: Chain;
140
156
  }
141
157
  type Transaction = SameChainTransaction | CrossChainTransaction;
142
- export type { AccountType, RhinestoneAccountConfig, AccountProviderConfig, ProviderConfig, BundlerConfig, PaymasterConfig, Transaction, TokenSymbol, CallInput, Call, TokenRequest, OwnerSet, OwnableValidatorConfig, WebauthnValidatorConfig, SignerSet, Session, Recovery, Policy, UniversalActionPolicyParamCondition, };
158
+ export type { AccountType, RhinestoneAccountConfig, AccountProviderConfig, ProviderConfig, BundlerConfig, PaymasterConfig, Transaction, TokenSymbol, CallInput, Call, TokenRequest, OwnerSet, OwnableValidatorConfig, WebauthnValidatorConfig, MultiFactorValidatorConfig, SignerSet, Session, Recovery, Policy, UniversalActionPolicyParamCondition, };
143
159
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AAE5E,KAAK,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;AAE9C,UAAU,qBAAqB;IAC7B,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,UAAU,sBAAsB;IAC9B,IAAI,EAAE,OAAO,CAAA;IACb,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,uBAAuB;IAC/B,IAAI,EAAE,SAAS,CAAA;IACf,OAAO,EAAE,eAAe,CAAA;CACz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AW,EACX,WAAW,EACX,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,SAAS,EACT,OAAO,EACP,QAAQ,EACR,MAAM,EACN,mCAAmC,GACpC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhinestone/sdk",
3
- "version": "1.0.0-alpha.4",
3
+ "version": "1.0.0-alpha.6",
4
4
  "description": "End-to-end chain abstraction and modularity toolkit",
5
5
  "author": {
6
6
  "name": "Rhinestone",