@rhinestone/sdk 1.0.0-alpha.1 → 1.0.0-alpha.11

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 (102) hide show
  1. package/dist/src/accounts/error.d.ts.map +1 -1
  2. package/dist/src/accounts/error.js +2 -0
  3. package/dist/src/accounts/index.d.ts +15 -8
  4. package/dist/src/accounts/index.d.ts.map +1 -1
  5. package/dist/src/accounts/index.js +204 -164
  6. package/dist/src/accounts/index.test.js +2 -2
  7. package/dist/src/accounts/kernel.d.ts +7 -9
  8. package/dist/src/accounts/kernel.d.ts.map +1 -1
  9. package/dist/src/accounts/kernel.js +0 -9
  10. package/dist/src/accounts/kernel.test.js +6 -6
  11. package/dist/src/accounts/nexus.d.ts +14 -13
  12. package/dist/src/accounts/nexus.d.ts.map +1 -1
  13. package/dist/src/accounts/nexus.js +91 -88
  14. package/dist/src/accounts/nexus.test.js +10 -10
  15. package/dist/src/accounts/safe.d.ts +4 -6
  16. package/dist/src/accounts/safe.d.ts.map +1 -1
  17. package/dist/src/accounts/safe.js +20 -30
  18. package/dist/src/accounts/safe.test.js +6 -6
  19. package/dist/src/accounts/startale.d.ts +20 -0
  20. package/dist/src/accounts/startale.d.ts.map +1 -0
  21. package/dist/src/accounts/startale.js +100 -0
  22. package/dist/src/accounts/startale.test.d.ts +2 -0
  23. package/dist/src/accounts/startale.test.d.ts.map +1 -0
  24. package/dist/src/accounts/startale.test.js +97 -0
  25. package/dist/src/accounts/utils.d.ts +4 -3
  26. package/dist/src/accounts/utils.d.ts.map +1 -1
  27. package/dist/src/accounts/utils.js +44 -0
  28. package/dist/src/actions/index.d.ts +17 -7
  29. package/dist/src/actions/index.d.ts.map +1 -1
  30. package/dist/src/actions/index.js +108 -15
  31. package/dist/src/actions/index.test.js +35 -17
  32. package/dist/src/actions/smart-session.d.ts +2 -2
  33. package/dist/src/actions/smart-session.d.ts.map +1 -1
  34. package/dist/src/execution/compact.d.ts +6 -3
  35. package/dist/src/execution/compact.d.ts.map +1 -1
  36. package/dist/src/execution/compact.js +44 -1
  37. package/dist/src/execution/error.d.ts +2 -9
  38. package/dist/src/execution/error.d.ts.map +1 -1
  39. package/dist/src/execution/error.js +4 -13
  40. package/dist/src/execution/index.d.ts +2 -3
  41. package/dist/src/execution/index.d.ts.map +1 -1
  42. package/dist/src/execution/index.js +34 -49
  43. package/dist/src/execution/smart-session.d.ts +1 -1
  44. package/dist/src/execution/smart-session.d.ts.map +1 -1
  45. package/dist/src/execution/smart-session.js +12 -17
  46. package/dist/src/execution/utils.d.ts +13 -11
  47. package/dist/src/execution/utils.d.ts.map +1 -1
  48. package/dist/src/execution/utils.js +150 -84
  49. package/dist/src/index.d.ts +14 -14
  50. package/dist/src/index.d.ts.map +1 -1
  51. package/dist/src/index.js +24 -20
  52. package/dist/src/modules/index.d.ts +3 -7
  53. package/dist/src/modules/index.d.ts.map +1 -1
  54. package/dist/src/modules/index.js +1 -10
  55. package/dist/src/modules/index.test.js +2 -2
  56. package/dist/src/modules/omni-account.d.ts +1 -4
  57. package/dist/src/modules/omni-account.d.ts.map +1 -1
  58. package/dist/src/modules/omni-account.js +2 -8
  59. package/dist/src/modules/read.d.ts +5 -6
  60. package/dist/src/modules/read.d.ts.map +1 -1
  61. package/dist/src/modules/read.js +6 -37
  62. package/dist/src/modules/validators/core.d.ts +6 -7
  63. package/dist/src/modules/validators/core.d.ts.map +1 -1
  64. package/dist/src/modules/validators/core.js +83 -8
  65. package/dist/src/modules/validators/core.test.js +4 -4
  66. package/dist/src/modules/validators/smart-sessions.d.ts +3 -3
  67. package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
  68. package/dist/src/modules/validators/smart-sessions.js +7 -6
  69. package/dist/src/modules/validators/smart-sessions.test.js +4 -4
  70. package/dist/src/orchestrator/client.d.ts +1 -0
  71. package/dist/src/orchestrator/client.d.ts.map +1 -1
  72. package/dist/src/orchestrator/client.js +136 -94
  73. package/dist/src/orchestrator/consts.d.ts +3 -3
  74. package/dist/src/orchestrator/consts.d.ts.map +1 -1
  75. package/dist/src/orchestrator/consts.js +4 -4
  76. package/dist/src/orchestrator/index.d.ts +2 -2
  77. package/dist/src/orchestrator/index.d.ts.map +1 -1
  78. package/dist/src/orchestrator/index.js +1 -7
  79. package/dist/src/orchestrator/registry.d.ts +31 -12
  80. package/dist/src/orchestrator/registry.d.ts.map +1 -1
  81. package/dist/src/orchestrator/registry.js +57 -380
  82. package/dist/src/orchestrator/registry.json +365 -0
  83. package/dist/src/orchestrator/registry.test.d.ts.map +1 -0
  84. package/dist/src/orchestrator/registry.test.js +137 -0
  85. package/dist/src/orchestrator/types.d.ts +81 -14
  86. package/dist/src/orchestrator/types.d.ts.map +1 -1
  87. package/dist/src/orchestrator/utils.d.ts.map +1 -1
  88. package/dist/src/orchestrator/utils.js +2 -2
  89. package/dist/src/types.d.ts +42 -21
  90. package/dist/src/types.d.ts.map +1 -1
  91. package/dist/test/consts.d.ts +2 -2
  92. package/dist/test/consts.d.ts.map +1 -1
  93. package/package.json +1 -1
  94. package/dist/src/actions/registry.d.ts +0 -7
  95. package/dist/src/actions/registry.d.ts.map +0 -1
  96. package/dist/src/actions/registry.js +0 -7
  97. package/dist/src/actions/registry.test.d.ts.map +0 -1
  98. package/dist/src/actions/registry.test.js +0 -25
  99. package/dist/src/modules/registry.d.ts +0 -13
  100. package/dist/src/modules/registry.d.ts.map +0 -1
  101. package/dist/src/modules/registry.js +0 -67
  102. /package/dist/src/{actions → orchestrator}/registry.test.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.trustAttester = exports.encodeSmartSessionSignature = void 0;
3
+ exports.encodeSmartSessionSignature = void 0;
4
4
  exports.enableEcdsa = enableEcdsa;
5
5
  exports.enablePasskeys = enablePasskeys;
6
6
  exports.disableEcdsa = disableEcdsa;
@@ -10,11 +10,15 @@ exports.removeOwner = removeOwner;
10
10
  exports.changeThreshold = changeThreshold;
11
11
  exports.recover = recover;
12
12
  exports.setUpRecovery = setUpRecovery;
13
+ exports.enableMultiFactor = enableMultiFactor;
14
+ exports.disableMultiFactor = disableMultiFactor;
15
+ exports.changeMultiFactorThreshold = changeMultiFactorThreshold;
16
+ exports.setSubValidator = setSubValidator;
17
+ exports.removeSubValidator = removeSubValidator;
13
18
  const viem_1 = require("viem");
14
19
  const accounts_1 = require("../accounts");
20
+ const utils_1 = require("../accounts/utils");
15
21
  const core_1 = require("../modules/validators/core");
16
- const registry_1 = require("./registry");
17
- Object.defineProperty(exports, "trustAttester", { enumerable: true, get: function () { return registry_1.trustAttester; } });
18
22
  const smart_session_1 = require("./smart-session");
19
23
  Object.defineProperty(exports, "encodeSmartSessionSignature", { enumerable: true, get: function () { return smart_session_1.encodeSmartSessionSignature; } });
20
24
  function setUpRecovery({ rhinestoneAccount, guardians, threshold = 1, }) {
@@ -22,21 +26,21 @@ function setUpRecovery({ rhinestoneAccount, guardians, threshold = 1, }) {
22
26
  const calls = (0, accounts_1.getModuleInstallationCalls)(rhinestoneAccount.config, module);
23
27
  return calls;
24
28
  }
25
- async function recover(address, newOwners, chain) {
29
+ async function recover(address, newOwners, chain, provider) {
26
30
  switch (newOwners.type) {
27
31
  case 'ecdsa': {
28
- return recoverEcdsaOwnership(address, newOwners, chain);
32
+ return recoverEcdsaOwnership(address, newOwners, chain, provider);
29
33
  }
30
34
  case 'passkey': {
31
35
  throw new Error('Passkey ownership recovery is not yet supported');
32
36
  }
37
+ case 'multi-factor': {
38
+ throw new Error('Multi-factor ownership recovery is not yet supported');
39
+ }
33
40
  }
34
41
  }
35
42
  function enableEcdsa({ rhinestoneAccount, owners, threshold = 1, }) {
36
- const module = (0, core_1.getOwnableValidator)({
37
- threshold,
38
- owners,
39
- });
43
+ const module = (0, core_1.getOwnableValidator)(threshold, owners);
40
44
  const calls = (0, accounts_1.getModuleInstallationCalls)(rhinestoneAccount.config, module);
41
45
  return calls;
42
46
  }
@@ -46,10 +50,7 @@ function enablePasskeys({ rhinestoneAccount, pubKey, authenticatorId, }) {
46
50
  return calls;
47
51
  }
48
52
  function disableEcdsa({ rhinestoneAccount, }) {
49
- const module = (0, core_1.getOwnableValidator)({
50
- threshold: 1,
51
- owners: [],
52
- });
53
+ const module = (0, core_1.getOwnableValidator)(1, []);
53
54
  const calls = (0, accounts_1.getModuleUninstallationCalls)(rhinestoneAccount.config, module);
54
55
  return calls;
55
56
  }
@@ -65,6 +66,7 @@ function disablePasskeys({ rhinestoneAccount, }) {
65
66
  function addOwner(owner) {
66
67
  return {
67
68
  to: core_1.OWNABLE_VALIDATOR_ADDRESS,
69
+ value: 0n,
68
70
  data: (0, viem_1.encodeFunctionData)({
69
71
  abi: [
70
72
  {
@@ -83,6 +85,7 @@ function addOwner(owner) {
83
85
  function removeOwner(prevOwner, ownerToRemove) {
84
86
  return {
85
87
  to: core_1.OWNABLE_VALIDATOR_ADDRESS,
88
+ value: 0n,
86
89
  data: (0, viem_1.encodeFunctionData)({
87
90
  abi: [
88
91
  {
@@ -104,6 +107,7 @@ function removeOwner(prevOwner, ownerToRemove) {
104
107
  function changeThreshold(newThreshold) {
105
108
  return {
106
109
  to: core_1.OWNABLE_VALIDATOR_ADDRESS,
110
+ value: 0n,
107
111
  data: (0, viem_1.encodeFunctionData)({
108
112
  abi: [
109
113
  {
@@ -121,10 +125,10 @@ function changeThreshold(newThreshold) {
121
125
  }),
122
126
  };
123
127
  }
124
- async function recoverEcdsaOwnership(address, newOwners, chain) {
128
+ async function recoverEcdsaOwnership(address, newOwners, chain, provider) {
125
129
  const publicClient = (0, viem_1.createPublicClient)({
126
130
  chain,
127
- transport: (0, viem_1.http)(),
131
+ transport: (0, utils_1.createTransport)(chain, provider),
128
132
  });
129
133
  // Read the existing config
130
134
  const results = await publicClient.multicall({
@@ -211,3 +215,92 @@ async function recoverEcdsaOwnership(address, newOwners, chain) {
211
215
  }
212
216
  return calls;
213
217
  }
218
+ function enableMultiFactor({ rhinestoneAccount, validators, threshold = 1, }) {
219
+ const module = (0, core_1.getMultiFactorValidator)(threshold, validators);
220
+ const calls = (0, accounts_1.getModuleInstallationCalls)(rhinestoneAccount.config, module);
221
+ return calls;
222
+ }
223
+ function disableMultiFactor({ rhinestoneAccount, }) {
224
+ const module = (0, core_1.getMultiFactorValidator)(1, []);
225
+ const calls = (0, accounts_1.getModuleUninstallationCalls)(rhinestoneAccount.config, module);
226
+ return calls;
227
+ }
228
+ function changeMultiFactorThreshold(newThreshold) {
229
+ return {
230
+ to: core_1.MULTI_FACTOR_VALIDATOR_ADDRESS,
231
+ value: 0n,
232
+ data: (0, viem_1.encodeFunctionData)({
233
+ abi: [
234
+ {
235
+ inputs: [{ internalType: 'uint8', name: 'threshold', type: 'uint8' }],
236
+ name: 'setThreshold',
237
+ outputs: [],
238
+ stateMutability: 'nonpayable',
239
+ type: 'function',
240
+ },
241
+ ],
242
+ functionName: 'setThreshold',
243
+ args: [newThreshold],
244
+ }),
245
+ };
246
+ }
247
+ function setSubValidator(id, validator) {
248
+ const validatorId = (0, viem_1.padHex)((0, viem_1.toHex)(id), { size: 12 });
249
+ const validatorModule = (0, core_1.getValidator)(validator);
250
+ return {
251
+ to: core_1.MULTI_FACTOR_VALIDATOR_ADDRESS,
252
+ value: 0n,
253
+ data: (0, viem_1.encodeFunctionData)({
254
+ abi: [
255
+ {
256
+ type: 'function',
257
+ name: 'setValidator',
258
+ inputs: [
259
+ {
260
+ type: 'address',
261
+ name: 'validatorAddress',
262
+ },
263
+ {
264
+ type: 'bytes12',
265
+ name: 'validatorId',
266
+ },
267
+ {
268
+ type: 'bytes',
269
+ name: 'newValidatorData',
270
+ },
271
+ ],
272
+ },
273
+ ],
274
+ functionName: 'setValidator',
275
+ args: [validatorModule.address, validatorId, validatorModule.initData],
276
+ }),
277
+ };
278
+ }
279
+ function removeSubValidator(id, validator) {
280
+ const validatorId = (0, viem_1.padHex)((0, viem_1.toHex)(id), { size: 12 });
281
+ const validatorModule = (0, core_1.getValidator)(validator);
282
+ return {
283
+ to: core_1.MULTI_FACTOR_VALIDATOR_ADDRESS,
284
+ value: 0n,
285
+ data: (0, viem_1.encodeFunctionData)({
286
+ abi: [
287
+ {
288
+ type: 'function',
289
+ name: 'removeValidator',
290
+ inputs: [
291
+ {
292
+ type: 'address',
293
+ name: 'validatorAddress',
294
+ },
295
+ {
296
+ type: 'bytes12',
297
+ name: 'validatorId',
298
+ },
299
+ ],
300
+ },
301
+ ],
302
+ functionName: 'removeValidator',
303
+ args: [validatorModule.address, validatorId],
304
+ }),
305
+ };
306
+ }
@@ -10,7 +10,7 @@ const MOCK_OWNER_A = '0xd1aefebdceefc094f1805b241fa5e6db63a9181a';
10
10
  const MOCK_OWNER_B = '0xeddfcb50d18f6d3d51c4f7cbca5ed6bdebc59817';
11
11
  const MOCK_OWNER_C = '0xb31e76f19defe76edc4b7eceeb4b0a2d6ddaca39';
12
12
  const MOCK_ACCOUNT_ADDRESS = '0x1234567890123456789012345678901234567890';
13
- const accountAddress = '0x814013f4a1a818ad241b6c7c67a53f26ab0f0a16';
13
+ const accountAddress = '0x464aae2512ead54fffad07fdf1f13d513050678b';
14
14
  // Mock viem
15
15
  vitest_1.vi.mock('viem', async (importOriginal) => {
16
16
  const actual = await importOriginal();
@@ -36,7 +36,8 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
36
36
  })).toEqual([
37
37
  {
38
38
  to: accountAddress,
39
- data: '0x9517e29f00000000000000000000000000000000000000000000000000000000000000010000000000000000000000002483da3a338895199e5e538530213157e931bf0600000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d1aefebdceefc094f1805b241fa5e6db63a9181a',
39
+ value: 0n,
40
+ data: '0x9517e29f00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000e9e6e96bcaa3c113187cdb7e38aed900000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d1aefebdceefc094f1805b241fa5e6db63a9181a',
40
41
  },
41
42
  ]);
42
43
  });
@@ -47,7 +48,8 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
47
48
  })).toEqual([
48
49
  {
49
50
  to: accountAddress,
50
- data: '0x9517e29f00000000000000000000000000000000000000000000000000000000000000010000000000000000000000002483da3a338895199e5e538530213157e931bf06000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d1aefebdceefc094f1805b241fa5e6db63a9181a000000000000000000000000eddfcb50d18f6d3d51c4f7cbca5ed6bdebc59817',
51
+ value: 0n,
52
+ data: '0x9517e29f00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000e9e6e96bcaa3c113187cdb7e38aed9000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d1aefebdceefc094f1805b241fa5e6db63a9181a000000000000000000000000eddfcb50d18f6d3d51c4f7cbca5ed6bdebc59817',
51
53
  },
52
54
  ]);
53
55
  });
@@ -59,7 +61,8 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
59
61
  })).toEqual([
60
62
  {
61
63
  to: accountAddress,
62
- data: '0x9517e29f00000000000000000000000000000000000000000000000000000000000000010000000000000000000000002483da3a338895199e5e538530213157e931bf06000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000003000000000000000000000000b31e76f19defe76edc4b7eceeb4b0a2d6ddaca39000000000000000000000000d1aefebdceefc094f1805b241fa5e6db63a9181a000000000000000000000000eddfcb50d18f6d3d51c4f7cbca5ed6bdebc59817',
64
+ value: 0n,
65
+ data: '0x9517e29f00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000e9e6e96bcaa3c113187cdb7e38aed9000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000003000000000000000000000000b31e76f19defe76edc4b7eceeb4b0a2d6ddaca39000000000000000000000000d1aefebdceefc094f1805b241fa5e6db63a9181a000000000000000000000000eddfcb50d18f6d3d51c4f7cbca5ed6bdebc59817',
63
66
  },
64
67
  ]);
65
68
  });
@@ -80,7 +83,8 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
80
83
  })).toEqual([
81
84
  {
82
85
  to: accountAddress,
83
- data: '0x9517e29f00000000000000000000000000000000000000000000000000000000000000010000000000000000000000002f167e55d42584f65e2e30a748f41ee75a31141400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000060580a9af0569ad3905b26a703201b358aa0904236642ebe79b22a19d00d3737637d46f725a5427ae45a9569259bf67e1e16b187d7b3ad1ed70138c4f0409677d19c9a01073b202db2ed56e604ad11db557d8c3ad75181619597f21b830f2da82a',
86
+ value: 0n,
87
+ data: '0x9517e29f00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000578c4cb0e472a5462da43c495c3f3300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000060580a9af0569ad3905b26a703201b358aa0904236642ebe79b22a19d00d3737637d46f725a5427ae45a9569259bf67e1e16b187d7b3ad1ed70138c4f0409677d19c9a01073b202db2ed56e604ad11db557d8c3ad75181619597f21b830f2da82a',
84
88
  },
85
89
  ]);
86
90
  });
@@ -99,7 +103,8 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
99
103
  })).toEqual([
100
104
  {
101
105
  to: accountAddress,
102
- data: '0xa71763a800000000000000000000000000000000000000000000000000000000000000010000000000000000000000002483da3a338895199e5e538530213157e931bf0600000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
106
+ value: 0n,
107
+ data: '0xa71763a800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000e9e6e96bcaa3c113187cdb7e38aed900000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
103
108
  },
104
109
  ]);
105
110
  });
@@ -118,7 +123,8 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
118
123
  })).toEqual([
119
124
  {
120
125
  to: accountAddress,
121
- data: '0xa71763a800000000000000000000000000000000000000000000000000000000000000010000000000000000000000002f167e55d42584f65e2e30a748f41ee75a31141400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
126
+ value: 0n,
127
+ data: '0xa71763a800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000578c4cb0e472a5462da43c495c3f3300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000',
122
128
  },
123
129
  ]);
124
130
  });
@@ -126,7 +132,8 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
126
132
  (0, vitest_1.describe)('Add Owner', () => {
127
133
  (0, vitest_1.test)('', () => {
128
134
  (0, vitest_1.expect)((0, _1.addOwner)(MOCK_OWNER_A)).toEqual({
129
- to: '0x2483DA3A338895199E5e538530213157e931Bf06',
135
+ to: '0x0000000000E9E6E96Bcaa3c113187CdB7E38AED9',
136
+ value: 0n,
130
137
  data: '0x7065cb48000000000000000000000000d1aefebdceefc094f1805b241fa5e6db63a9181a',
131
138
  });
132
139
  });
@@ -134,7 +141,8 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
134
141
  (0, vitest_1.describe)('Remove Owner', () => {
135
142
  (0, vitest_1.test)('', () => {
136
143
  (0, vitest_1.expect)((0, _1.removeOwner)(MOCK_OWNER_A, MOCK_OWNER_B)).toEqual({
137
- to: '0x2483DA3A338895199E5e538530213157e931Bf06',
144
+ to: '0x0000000000E9E6E96Bcaa3c113187CdB7E38AED9',
145
+ value: 0n,
138
146
  data: '0xfbe5ce0a000000000000000000000000d1aefebdceefc094f1805b241fa5e6db63a9181a000000000000000000000000eddfcb50d18f6d3d51c4f7cbca5ed6bdebc59817',
139
147
  });
140
148
  });
@@ -142,7 +150,8 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
142
150
  (0, vitest_1.describe)('Set Threshold', () => {
143
151
  (0, vitest_1.test)('', () => {
144
152
  (0, vitest_1.expect)((0, _1.changeThreshold)(1)).toEqual({
145
- to: '0x2483DA3A338895199E5e538530213157e931Bf06',
153
+ to: '0x0000000000E9E6E96Bcaa3c113187CdB7E38AED9',
154
+ value: 0n,
146
155
  data: '0x960bfe040000000000000000000000000000000000000000000000000000000000000001',
147
156
  });
148
157
  });
@@ -163,6 +172,7 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
163
172
  })).toEqual([
164
173
  {
165
174
  to: accountAddress,
175
+ value: 0n,
166
176
  data: '0x9517e29f0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a04d053b3c8021e8d5bf641816c42daa75d8b597000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000010000000000000000000000006092086a3dc0020cd604a68fcf5d430007d51bb7',
167
177
  },
168
178
  ]);
@@ -175,6 +185,7 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
175
185
  })).toEqual([
176
186
  {
177
187
  to: accountAddress,
188
+ value: 0n,
178
189
  data: '0x9517e29f0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a04d053b3c8021e8d5bf641816c42daa75d8b597000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000030000000000000000000000006092086a3dc0020cd604a68fcf5d430007d51bb7000000000000000000000000c27b7578151c5ef713c62c65db09763d57ac3596000000000000000000000000c5587d912c862252599b61926adaef316ba06da0',
179
190
  },
180
191
  ]);
@@ -205,11 +216,13 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
205
216
  (0, vitest_1.expect)(mockPublicClient.multicall).toHaveBeenCalledTimes(1);
206
217
  (0, vitest_1.expect)(result).toEqual([
207
218
  {
208
- to: '0x2483DA3A338895199E5e538530213157e931Bf06',
219
+ to: '0x0000000000E9E6E96Bcaa3c113187CdB7E38AED9',
220
+ value: 0n,
209
221
  data: '0x7065cb480000000000000000000000006092086a3dc0020cd604a68fcf5d430007d51bb7',
210
222
  },
211
223
  {
212
- to: '0x2483DA3A338895199E5e538530213157e931Bf06',
224
+ to: '0x0000000000E9E6E96Bcaa3c113187CdB7E38AED9',
225
+ value: 0n,
213
226
  data: '0xfbe5ce0a0000000000000000000000006092086a3dc0020cd604a68fcf5d430007d51bb7000000000000000000000000f6c02c78ded62973b43bfa523b247da099486936',
214
227
  },
215
228
  ]);
@@ -236,11 +249,13 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
236
249
  (0, vitest_1.expect)(mockPublicClient.multicall).toHaveBeenCalledTimes(1);
237
250
  (0, vitest_1.expect)(result).toEqual([
238
251
  {
239
- to: '0x2483DA3A338895199E5e538530213157e931Bf06',
252
+ to: '0x0000000000E9E6E96Bcaa3c113187CdB7E38AED9',
253
+ value: 0n,
240
254
  data: '0x7065cb48000000000000000000000000c5587d912c862252599b61926adaef316ba06da0',
241
255
  },
242
256
  {
243
- to: '0x2483DA3A338895199E5e538530213157e931Bf06',
257
+ to: '0x0000000000E9E6E96Bcaa3c113187CdB7E38AED9',
258
+ value: 0n,
244
259
  data: '0xfbe5ce0a000000000000000000000000c5587d912c862252599b61926adaef316ba06da0000000000000000000000000f6c02c78ded62973b43bfa523b247da099486936',
245
260
  },
246
261
  ]);
@@ -267,15 +282,18 @@ vitest_1.vi.mock('viem', async (importOriginal) => {
267
282
  (0, vitest_1.expect)(mockPublicClient.multicall).toHaveBeenCalledTimes(1);
268
283
  (0, vitest_1.expect)(result).toEqual([
269
284
  {
270
- to: '0x2483DA3A338895199E5e538530213157e931Bf06',
285
+ to: '0x0000000000E9E6E96Bcaa3c113187CdB7E38AED9',
286
+ value: 0n,
271
287
  data: '0x7065cb48000000000000000000000000c5587d912c862252599b61926adaef316ba06da0',
272
288
  },
273
289
  {
274
- to: '0x2483DA3A338895199E5e538530213157e931Bf06',
290
+ to: '0x0000000000E9E6E96Bcaa3c113187CdB7E38AED9',
291
+ value: 0n,
275
292
  data: '0xfbe5ce0a000000000000000000000000c5587d912c862252599b61926adaef316ba06da0000000000000000000000000f6c02c78ded62973b43bfa523b247da099486936',
276
293
  },
277
294
  {
278
- to: '0x2483DA3A338895199E5e538530213157e931Bf06',
295
+ to: '0x0000000000E9E6E96Bcaa3c113187CdB7E38AED9',
296
+ value: 0n,
279
297
  data: '0xfbe5ce0a0000000000000000000000006092086a3dc0020cd604a68fcf5d430007d51bb7000000000000000000000000c27b7578151c5ef713c62c65db09763d57ac3596',
280
298
  },
281
299
  ]);
@@ -1,5 +1,5 @@
1
- import { Hex } from 'viem';
2
- import { SessionDetails } from '../execution/smart-session';
1
+ import type { Hex } from 'viem';
2
+ import type { SessionDetails } from '../execution/smart-session';
3
3
  declare function encodeSmartSessionSignature(sessionDetails: SessionDetails, sessionSignature: Hex): `0x${string}`;
4
4
  export { encodeSmartSessionSignature };
5
5
  //# sourceMappingURL=smart-session.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"smart-session.d.ts","sourceRoot":"","sources":["../../../actions/smart-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAG3D,iBAAS,2BAA2B,CAClC,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,GAAG,iBAQtB;AAED,OAAO,EAAE,2BAA2B,EAAE,CAAA"}
1
+ {"version":3,"file":"smart-session.d.ts","sourceRoot":"","sources":["../../../actions/smart-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAGhE,iBAAS,2BAA2B,CAClC,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,GAAG,iBAQtB;AAED,OAAO,EAAE,2BAA2B,EAAE,CAAA"}
@@ -1,5 +1,8 @@
1
- import { Address } from 'viem';
2
- import { Call } from '../types';
1
+ import { type Address } from 'viem';
2
+ import type { Call } from '../types';
3
+ declare const COMPACT_ADDRESS = "0xa2E6C7Ba8613E1534dCB990e7e4962216C0a5d58";
3
4
  declare function getDepositEtherCall(account: Address, value: bigint): Call;
4
- export { getDepositEtherCall };
5
+ declare function getDepositErc20Call(account: Address, tokenAddress: Address, amount: bigint): Call;
6
+ declare function getApproveErc20Call(tokenAddress: Address, amount: bigint): Call;
7
+ export { COMPACT_ADDRESS, getDepositEtherCall, getDepositErc20Call, getApproveErc20Call, };
5
8
  //# sourceMappingURL=compact.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compact.d.ts","sourceRoot":"","sources":["../../../execution/compact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA2B,MAAM,MAAM,CAAA;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAmB/B,iBAAS,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAqBlE;AAoCD,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
1
+ {"version":3,"file":"compact.d.ts","sourceRoot":"","sources":["../../../execution/compact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAA0C,MAAM,MAAM,CAAA;AAC3E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAcpC,QAAA,MAAM,eAAe,+CAA+C,CAAA;AAKpE,iBAAS,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAqBlE;AAED,iBAAS,mBAAmB,CAC1B,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,OAAO,EACrB,MAAM,EAAE,MAAM,GACb,IAAI,CA2BN;AAED,iBAAS,mBAAmB,CAAC,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAUxE;AAoCD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,GACpB,CAAA"}
@@ -1,8 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.COMPACT_ADDRESS = void 0;
3
4
  exports.getDepositEtherCall = getDepositEtherCall;
5
+ exports.getDepositErc20Call = getDepositErc20Call;
6
+ exports.getApproveErc20Call = getApproveErc20Call;
4
7
  const viem_1 = require("viem");
5
8
  const COMPACT_ADDRESS = '0xa2E6C7Ba8613E1534dCB990e7e4962216C0a5d58';
9
+ exports.COMPACT_ADDRESS = COMPACT_ADDRESS;
6
10
  const ALLOCATOR_ADDRESS = '0x9Ef7519F90C9B6828650Ff4913d663BB1f688507';
7
11
  const DEFAULT_RESET_PERIOD = 3;
8
12
  const DEFAULT_SCOPE = 0;
@@ -28,6 +32,45 @@ function getDepositEtherCall(account, value) {
28
32
  value,
29
33
  };
30
34
  }
35
+ function getDepositErc20Call(account, tokenAddress, amount) {
36
+ return {
37
+ to: COMPACT_ADDRESS,
38
+ value: 0n,
39
+ data: (0, viem_1.encodeFunctionData)({
40
+ abi: [
41
+ {
42
+ type: 'function',
43
+ name: 'depositERC20',
44
+ inputs: [
45
+ {
46
+ name: 'token',
47
+ type: 'address',
48
+ internalType: 'address',
49
+ },
50
+ { name: 'lockTag', type: 'bytes12', internalType: 'bytes12' },
51
+ { name: 'amount', type: 'uint256', internalType: 'uint256' },
52
+ { name: 'recipient', type: 'address', internalType: 'address' },
53
+ ],
54
+ outputs: [{ name: 'id', type: 'uint256', internalType: 'uint256' }],
55
+ stateMutability: 'nonpayable',
56
+ },
57
+ ],
58
+ functionName: 'depositERC20',
59
+ args: [tokenAddress, lockTag(), amount, account],
60
+ }),
61
+ };
62
+ }
63
+ function getApproveErc20Call(tokenAddress, amount) {
64
+ return {
65
+ to: tokenAddress,
66
+ value: 0n,
67
+ data: (0, viem_1.encodeFunctionData)({
68
+ abi: viem_1.erc20Abi,
69
+ functionName: 'approve',
70
+ args: [COMPACT_ADDRESS, amount],
71
+ }),
72
+ };
73
+ }
31
74
  function toCompactFlag(allocator) {
32
75
  const addrBytes = Buffer.from(allocator.slice(2), 'hex');
33
76
  let leadingZeroNibbles = 0;
@@ -49,7 +92,7 @@ function toCompactFlag(allocator) {
49
92
  }
50
93
  function usingAllocatorId(allocator = ALLOCATOR_ADDRESS) {
51
94
  const compactFlag = BigInt(toCompactFlag(allocator));
52
- const last88Bits = BigInt('0x' + allocator.slice(-22)); // Extract last 88 bits (11 bytes * 2 hex chars per byte)
95
+ const last88Bits = BigInt(`0x${allocator.slice(-22)}`); // Extract last 88 bits (11 bytes * 2 hex chars per byte)
53
96
  return (compactFlag << 88n) | last88Bits;
54
97
  }
55
98
  function lockTag() {
@@ -14,14 +14,7 @@ declare class ExecutionError extends Error {
14
14
  get errorType(): string;
15
15
  get traceId(): string;
16
16
  }
17
- declare class SourceChainRequiredForSmartSessionsError extends ExecutionError {
18
- constructor(params?: {
19
- context?: any;
20
- errorType?: string;
21
- traceId?: string;
22
- });
23
- }
24
- declare class SourceTargetChainMismatchError extends ExecutionError {
17
+ declare class SourceChainsNotAvailableForUserOpFlowError extends ExecutionError {
25
18
  constructor(params?: {
26
19
  context?: any;
27
20
  errorType?: string;
@@ -57,5 +50,5 @@ declare class IntentFailedError extends ExecutionError {
57
50
  });
58
51
  }
59
52
  declare function isExecutionError(error: Error): error is ExecutionError;
60
- export { isExecutionError, ExecutionError, SourceChainRequiredForSmartSessionsError, SourceTargetChainMismatchError, UserOperationRequiredForSmartSessionsError, OrderPathRequiredForIntentsError, SessionChainRequiredError, IntentFailedError, };
53
+ export { isExecutionError, ExecutionError, SourceChainsNotAvailableForUserOpFlowError, UserOperationRequiredForSmartSessionsError, OrderPathRequiredForIntentsError, SessionChainRequiredError, IntentFailedError, };
61
54
  //# sourceMappingURL=error.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../execution/error.ts"],"names":[],"mappings":"AAAA,cAAM,cAAe,SAAQ,KAAK;IAChC,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,cAAM,wCAAyC,SAAQ,cAAc;gBACvD,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,OAAO,CAAC,EAAE,MAAM,CAAA;KACjB;CAMF;AAED,cAAM,8BAA+B,SAAQ,cAAc;gBAC7C,MAAM,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,GAAG,CAAA;QACb,SAAS,CAAC,EAAE,MAAM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AAG,KAAK,IAAI,cAAc,CAE/D;AAED,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,0CAA0C,EAC1C,0CAA0C,EAC1C,gCAAgC,EAChC,yBAAyB,EACzB,iBAAiB,GAClB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IntentFailedError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.UserOperationRequiredForSmartSessionsError = exports.SourceTargetChainMismatchError = exports.SourceChainRequiredForSmartSessionsError = exports.ExecutionError = void 0;
3
+ exports.IntentFailedError = exports.SessionChainRequiredError = exports.OrderPathRequiredForIntentsError = exports.UserOperationRequiredForSmartSessionsError = exports.SourceChainsNotAvailableForUserOpFlowError = exports.ExecutionError = void 0;
4
4
  exports.isExecutionError = isExecutionError;
5
5
  class ExecutionError extends Error {
6
6
  _message;
@@ -28,24 +28,15 @@ class ExecutionError extends Error {
28
28
  }
29
29
  }
30
30
  exports.ExecutionError = ExecutionError;
31
- class SourceChainRequiredForSmartSessionsError extends ExecutionError {
31
+ class SourceChainsNotAvailableForUserOpFlowError extends ExecutionError {
32
32
  constructor(params) {
33
33
  super({
34
- message: 'Specifying source chain is required when using smart sessions',
34
+ message: "Can't specify the source chains when using user operations",
35
35
  ...params,
36
36
  });
37
37
  }
38
38
  }
39
- exports.SourceChainRequiredForSmartSessionsError = SourceChainRequiredForSmartSessionsError;
40
- class SourceTargetChainMismatchError extends ExecutionError {
41
- constructor(params) {
42
- super({
43
- message: 'Source and target chain must be the same when using user operations',
44
- ...params,
45
- });
46
- }
47
- }
48
- exports.SourceTargetChainMismatchError = SourceTargetChainMismatchError;
39
+ exports.SourceChainsNotAvailableForUserOpFlowError = SourceChainsNotAvailableForUserOpFlowError;
49
40
  class UserOperationRequiredForSmartSessionsError extends ExecutionError {
50
41
  constructor(params) {
51
42
  super({
@@ -1,7 +1,7 @@
1
1
  import { type Address, type Chain } from 'viem';
2
2
  import type { IntentOpStatus } from '../orchestrator';
3
3
  import type { RhinestoneAccountConfig, Transaction } from '../types';
4
- import { ExecutionError, IntentFailedError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SourceChainRequiredForSmartSessionsError, SourceTargetChainMismatchError, UserOperationRequiredForSmartSessionsError } from './error';
4
+ import { ExecutionError, IntentFailedError, isExecutionError, OrderPathRequiredForIntentsError, SessionChainRequiredError, SourceChainsNotAvailableForUserOpFlowError, UserOperationRequiredForSmartSessionsError } from './error';
5
5
  import type { IntentData, TransactionResult } from './utils';
6
6
  declare function sendTransaction(config: RhinestoneAccountConfig, transaction: Transaction): Promise<TransactionResult>;
7
7
  declare function waitForExecution(config: RhinestoneAccountConfig, result: TransactionResult, acceptsPreconfirmations: boolean): Promise<IntentOpStatus | {
@@ -19,7 +19,6 @@ declare function waitForExecution(config: RhinestoneAccountConfig, result: Trans
19
19
  }>;
20
20
  declare function getMaxSpendableAmount(config: RhinestoneAccountConfig, chain: Chain, tokenAddress: Address, gasUnits: bigint): Promise<bigint>;
21
21
  declare function getPortfolio(config: RhinestoneAccountConfig, onTestnets: boolean): Promise<import("../orchestrator").Portfolio>;
22
- declare function depositEther(config: RhinestoneAccountConfig, chain: Chain, value: bigint): Promise<TransactionResult>;
23
- export { sendTransaction, waitForExecution, getMaxSpendableAmount, getPortfolio, depositEther, isExecutionError, IntentFailedError, ExecutionError, SourceChainRequiredForSmartSessionsError, SourceTargetChainMismatchError, UserOperationRequiredForSmartSessionsError, OrderPathRequiredForIntentsError, SessionChainRequiredError, };
22
+ export { sendTransaction, waitForExecution, getMaxSpendableAmount, getPortfolio, isExecutionError, IntentFailedError, ExecutionError, SourceChainsNotAvailableForUserOpFlowError, UserOperationRequiredForSmartSessionsError, OrderPathRequiredForIntentsError, SessionChainRequiredError, };
24
23
  export type { IntentData, TransactionResult };
25
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../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