@charterlabs/rhinestone-sdk 0.2.9 → 0.3.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.
Files changed (122) hide show
  1. package/dist/src/accounts/error.d.ts +8 -1
  2. package/dist/src/accounts/error.d.ts.map +1 -1
  3. package/dist/src/accounts/error.js +10 -1
  4. package/dist/src/accounts/index.d.ts +11 -11
  5. package/dist/src/accounts/index.d.ts.map +1 -1
  6. package/dist/src/accounts/index.js +71 -53
  7. package/dist/src/accounts/kernel.d.ts +3 -5
  8. package/dist/src/accounts/kernel.d.ts.map +1 -1
  9. package/dist/src/accounts/kernel.js +10 -18
  10. package/dist/src/accounts/kernel.test.js +10 -3
  11. package/dist/src/accounts/nexus.d.ts +5 -7
  12. package/dist/src/accounts/nexus.d.ts.map +1 -1
  13. package/dist/src/accounts/nexus.js +112 -59
  14. package/dist/src/accounts/nexus.test.js +10 -3
  15. package/dist/src/accounts/passport.d.ts +4 -7
  16. package/dist/src/accounts/passport.d.ts.map +1 -1
  17. package/dist/src/accounts/passport.js +0 -91
  18. package/dist/src/accounts/safe.d.ts +9 -4
  19. package/dist/src/accounts/safe.d.ts.map +1 -1
  20. package/dist/src/accounts/safe.js +110 -39
  21. package/dist/src/accounts/safe.test.js +10 -3
  22. package/dist/src/accounts/signing/common.d.ts +3 -3
  23. package/dist/src/accounts/signing/common.d.ts.map +1 -1
  24. package/dist/src/accounts/signing/common.js +36 -3
  25. package/dist/src/accounts/signing/message.js +2 -2
  26. package/dist/src/accounts/signing/typedData.d.ts.map +1 -1
  27. package/dist/src/accounts/signing/typedData.js +3 -3
  28. package/dist/src/accounts/startale.d.ts +2 -4
  29. package/dist/src/accounts/startale.d.ts.map +1 -1
  30. package/dist/src/accounts/startale.js +2 -5
  31. package/dist/src/accounts/utils.d.ts.map +1 -1
  32. package/dist/src/accounts/utils.js +10 -3
  33. package/dist/src/accounts/walletClient.d.ts.map +1 -1
  34. package/dist/src/accounts/walletClient.js +6 -0
  35. package/dist/src/actions/compact.d.ts +3 -2
  36. package/dist/src/actions/compact.d.ts.map +1 -1
  37. package/dist/src/actions/compact.js +1 -0
  38. package/dist/src/actions/deployment.d.ts +19 -0
  39. package/dist/src/actions/deployment.d.ts.map +1 -0
  40. package/dist/src/actions/deployment.js +78 -0
  41. package/dist/src/actions/index.d.ts +4 -11
  42. package/dist/src/actions/index.d.ts.map +1 -1
  43. package/dist/src/actions/index.js +12 -0
  44. package/dist/src/actions/smart-sessions.d.ts +7 -8
  45. package/dist/src/actions/smart-sessions.d.ts.map +1 -1
  46. package/dist/src/actions/smart-sessions.js +7 -4
  47. package/dist/src/errors/index.d.ts +2 -2
  48. package/dist/src/errors/index.d.ts.map +1 -1
  49. package/dist/src/errors/index.js +2 -1
  50. package/dist/src/execution/compact.d.ts +12 -17
  51. package/dist/src/execution/compact.d.ts.map +1 -1
  52. package/dist/src/execution/compact.js +10 -16
  53. package/dist/src/execution/index.d.ts +6 -6
  54. package/dist/src/execution/index.d.ts.map +1 -1
  55. package/dist/src/execution/index.js +16 -27
  56. package/dist/src/execution/permit2.d.ts +12 -17
  57. package/dist/src/execution/permit2.d.ts.map +1 -1
  58. package/dist/src/execution/permit2.js +10 -16
  59. package/dist/src/execution/singleChainOps.d.ts +15 -3
  60. package/dist/src/execution/singleChainOps.d.ts.map +1 -1
  61. package/dist/src/execution/singleChainOps.js +17 -3
  62. package/dist/src/execution/utils.d.ts +32 -10
  63. package/dist/src/execution/utils.d.ts.map +1 -1
  64. package/dist/src/execution/utils.js +121 -108
  65. package/dist/src/index.d.ts +23 -7
  66. package/dist/src/index.d.ts.map +1 -1
  67. package/dist/src/index.js +36 -6
  68. package/dist/src/modules/abi/smart-session-emissary.d.ts +696 -0
  69. package/dist/src/modules/abi/smart-session-emissary.d.ts.map +1 -0
  70. package/dist/src/modules/abi/smart-session-emissary.js +565 -0
  71. package/dist/src/modules/chain-abstraction.d.ts +5 -0
  72. package/dist/src/modules/chain-abstraction.d.ts.map +1 -0
  73. package/dist/src/modules/chain-abstraction.js +7 -0
  74. package/dist/src/modules/common.d.ts +10 -2
  75. package/dist/src/modules/common.d.ts.map +1 -1
  76. package/dist/src/modules/common.js +10 -0
  77. package/dist/src/modules/index.d.ts +3 -9
  78. package/dist/src/modules/index.d.ts.map +1 -1
  79. package/dist/src/modules/index.js +24 -8
  80. package/dist/src/modules/index.test.js +3 -9
  81. package/dist/src/modules/legacy.d.ts +10 -0
  82. package/dist/src/modules/legacy.d.ts.map +1 -0
  83. package/dist/src/modules/legacy.js +65 -0
  84. package/dist/src/modules/validators/core.d.ts.map +1 -1
  85. package/dist/src/modules/validators/core.js +2 -0
  86. package/dist/src/modules/validators/index.d.ts +2 -2
  87. package/dist/src/modules/validators/index.d.ts.map +1 -1
  88. package/dist/src/modules/validators/index.js +1 -6
  89. package/dist/src/modules/validators/smart-sessions.d.ts +105 -20
  90. package/dist/src/modules/validators/smart-sessions.d.ts.map +1 -1
  91. package/dist/src/modules/validators/smart-sessions.js +199 -435
  92. package/dist/src/orchestrator/client.d.ts +7 -3
  93. package/dist/src/orchestrator/client.d.ts.map +1 -1
  94. package/dist/src/orchestrator/client.js +3 -13
  95. package/dist/src/orchestrator/index.d.ts +2 -2
  96. package/dist/src/orchestrator/index.d.ts.map +1 -1
  97. package/dist/src/orchestrator/index.js +2 -1
  98. package/dist/src/orchestrator/registry.d.ts +2 -1
  99. package/dist/src/orchestrator/registry.d.ts.map +1 -1
  100. package/dist/src/orchestrator/registry.js +28 -8
  101. package/dist/src/orchestrator/registry.test.js +13 -0
  102. package/dist/src/orchestrator/types.d.ts +11 -12
  103. package/dist/src/orchestrator/types.d.ts.map +1 -1
  104. package/dist/src/orchestrator/types.js +1 -7
  105. package/dist/src/types.d.ts +47 -25
  106. package/dist/src/types.d.ts.map +1 -1
  107. package/dist/src/utils/index.d.ts +24 -1
  108. package/dist/src/utils/index.d.ts.map +1 -1
  109. package/dist/src/utils/index.js +58 -0
  110. package/dist/test/utils/utils.d.ts +5 -0
  111. package/dist/test/utils/utils.d.ts.map +1 -0
  112. package/dist/test/utils/utils.js +20 -0
  113. package/package.json +33 -3
  114. package/dist/src/execution/smart-session.d.ts +0 -13
  115. package/dist/src/execution/smart-session.d.ts.map +0 -1
  116. package/dist/src/execution/smart-session.js +0 -178
  117. package/dist/src/modules/omni-account.d.ts +0 -8
  118. package/dist/src/modules/omni-account.d.ts.map +0 -1
  119. package/dist/src/modules/omni-account.js +0 -13
  120. package/dist/src/modules/validators/smart-sessions.test.d.ts +0 -2
  121. package/dist/src/modules/validators/smart-sessions.test.d.ts.map +0 -1
  122. package/dist/src/modules/validators/smart-sessions.test.js +0 -222
@@ -0,0 +1,565 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const abi = [
4
+ {
5
+ type: 'constructor',
6
+ inputs: [
7
+ { name: 'intentExecutor', type: 'address', internalType: 'address' },
8
+ { name: 'lens', type: 'address', internalType: 'address' },
9
+ ],
10
+ stateMutability: 'nonpayable',
11
+ },
12
+ { type: 'fallback', stateMutability: 'nonpayable' },
13
+ {
14
+ type: 'function',
15
+ name: 'DOMAIN_SEPARATOR',
16
+ inputs: [],
17
+ outputs: [{ name: '', type: 'bytes32', internalType: 'bytes32' }],
18
+ stateMutability: 'view',
19
+ },
20
+ {
21
+ type: 'function',
22
+ name: 'INTENT_EXECUTOR',
23
+ inputs: [],
24
+ outputs: [{ name: '', type: 'address', internalType: 'address' }],
25
+ stateMutability: 'view',
26
+ },
27
+ {
28
+ type: 'function',
29
+ name: 'LENS',
30
+ inputs: [],
31
+ outputs: [{ name: '', type: 'address', internalType: 'address' }],
32
+ stateMutability: 'view',
33
+ },
34
+ {
35
+ type: 'function',
36
+ name: 'eip712Domain',
37
+ inputs: [],
38
+ outputs: [
39
+ { name: 'fields', type: 'bytes1', internalType: 'bytes1' },
40
+ { name: 'name', type: 'string', internalType: 'string' },
41
+ { name: 'version', type: 'string', internalType: 'string' },
42
+ { name: 'chainId', type: 'uint256', internalType: 'uint256' },
43
+ { name: 'verifyingContract', type: 'address', internalType: 'address' },
44
+ { name: 'salt', type: 'bytes32', internalType: 'bytes32' },
45
+ { name: 'extensions', type: 'uint256[]', internalType: 'uint256[]' },
46
+ ],
47
+ stateMutability: 'view',
48
+ },
49
+ {
50
+ type: 'function',
51
+ name: 'getConfig',
52
+ inputs: [
53
+ { name: 'account', type: 'address', internalType: 'address' },
54
+ { name: 'configId', type: 'uint8', internalType: 'uint8' },
55
+ { name: 'validator', type: 'address', internalType: 'address' },
56
+ { name: 'lockTag', type: 'bytes12', internalType: 'bytes12' },
57
+ ],
58
+ outputs: [{ name: 'config', type: 'bytes', internalType: 'bytes' }],
59
+ stateMutability: 'view',
60
+ },
61
+ {
62
+ type: 'function',
63
+ name: 'isValidSignatureWithSender',
64
+ inputs: [
65
+ { name: 'sender', type: 'address', internalType: 'address' },
66
+ { name: 'hash', type: 'bytes32', internalType: 'bytes32' },
67
+ { name: 'signature', type: 'bytes', internalType: 'bytes' },
68
+ ],
69
+ outputs: [{ name: 'result', type: 'bytes4', internalType: 'bytes4' }],
70
+ stateMutability: 'view',
71
+ },
72
+ {
73
+ type: 'function',
74
+ name: 'removeConfig',
75
+ inputs: [
76
+ { name: 'account', type: 'address', internalType: 'address' },
77
+ {
78
+ name: 'config',
79
+ type: 'tuple',
80
+ internalType: 'struct SmartSessionEmissaryConfig',
81
+ components: [
82
+ { name: 'scope', type: 'uint8', internalType: 'enum Scope' },
83
+ {
84
+ name: 'resetPeriod',
85
+ type: 'uint8',
86
+ internalType: 'enum ResetPeriod',
87
+ },
88
+ { name: 'allocator', type: 'address', internalType: 'address' },
89
+ {
90
+ name: 'permissionId',
91
+ type: 'bytes32',
92
+ internalType: 'PermissionId',
93
+ },
94
+ ],
95
+ },
96
+ {
97
+ name: 'disableData',
98
+ type: 'tuple',
99
+ internalType: 'struct SmartSessionEmissaryDisable',
100
+ components: [
101
+ { name: 'allocatorSig', type: 'bytes', internalType: 'bytes' },
102
+ { name: 'userSig', type: 'bytes', internalType: 'bytes' },
103
+ { name: 'expires', type: 'uint256', internalType: 'uint256' },
104
+ {
105
+ name: 'session',
106
+ type: 'tuple',
107
+ internalType: 'struct DisableSession',
108
+ components: [
109
+ {
110
+ name: 'chainDigestIndex',
111
+ type: 'uint8',
112
+ internalType: 'uint8',
113
+ },
114
+ {
115
+ name: 'hashesAndChainIds',
116
+ type: 'tuple[]',
117
+ internalType: 'struct ChainDigest[]',
118
+ components: [
119
+ { name: 'chainId', type: 'uint64', internalType: 'uint64' },
120
+ {
121
+ name: 'sessionDigest',
122
+ type: 'bytes32',
123
+ internalType: 'bytes32',
124
+ },
125
+ ],
126
+ },
127
+ ],
128
+ },
129
+ ],
130
+ },
131
+ ],
132
+ outputs: [],
133
+ stateMutability: 'nonpayable',
134
+ },
135
+ {
136
+ type: 'function',
137
+ name: 'setConfig',
138
+ inputs: [
139
+ { name: 'account', type: 'address', internalType: 'address' },
140
+ {
141
+ name: 'config',
142
+ type: 'tuple',
143
+ internalType: 'struct SmartSessionEmissaryConfig',
144
+ components: [
145
+ { name: 'scope', type: 'uint8', internalType: 'enum Scope' },
146
+ {
147
+ name: 'resetPeriod',
148
+ type: 'uint8',
149
+ internalType: 'enum ResetPeriod',
150
+ },
151
+ { name: 'allocator', type: 'address', internalType: 'address' },
152
+ {
153
+ name: 'permissionId',
154
+ type: 'bytes32',
155
+ internalType: 'PermissionId',
156
+ },
157
+ ],
158
+ },
159
+ {
160
+ name: 'enableData',
161
+ type: 'tuple',
162
+ internalType: 'struct SmartSessionEmissaryEnable',
163
+ components: [
164
+ { name: 'allocatorSig', type: 'bytes', internalType: 'bytes' },
165
+ { name: 'userSig', type: 'bytes', internalType: 'bytes' },
166
+ { name: 'expires', type: 'uint256', internalType: 'uint256' },
167
+ {
168
+ name: 'session',
169
+ type: 'tuple',
170
+ internalType: 'struct EnableSession',
171
+ components: [
172
+ {
173
+ name: 'chainDigestIndex',
174
+ type: 'uint8',
175
+ internalType: 'uint8',
176
+ },
177
+ {
178
+ name: 'hashesAndChainIds',
179
+ type: 'tuple[]',
180
+ internalType: 'struct ChainDigest[]',
181
+ components: [
182
+ { name: 'chainId', type: 'uint64', internalType: 'uint64' },
183
+ {
184
+ name: 'sessionDigest',
185
+ type: 'bytes32',
186
+ internalType: 'bytes32',
187
+ },
188
+ ],
189
+ },
190
+ {
191
+ name: 'sessionToEnable',
192
+ type: 'tuple',
193
+ internalType: 'struct Session',
194
+ components: [
195
+ {
196
+ name: 'sessionValidator',
197
+ type: 'address',
198
+ internalType: 'contract ISessionValidator',
199
+ },
200
+ {
201
+ name: 'sessionValidatorInitData',
202
+ type: 'bytes',
203
+ internalType: 'bytes',
204
+ },
205
+ { name: 'salt', type: 'bytes32', internalType: 'bytes32' },
206
+ {
207
+ name: 'actions',
208
+ type: 'tuple[]',
209
+ internalType: 'struct ActionData[]',
210
+ components: [
211
+ {
212
+ name: 'actionTargetSelector',
213
+ type: 'bytes4',
214
+ internalType: 'bytes4',
215
+ },
216
+ {
217
+ name: 'actionTarget',
218
+ type: 'address',
219
+ internalType: 'address',
220
+ },
221
+ {
222
+ name: 'actionPolicies',
223
+ type: 'tuple[]',
224
+ internalType: 'struct PolicyData[]',
225
+ components: [
226
+ {
227
+ name: 'policy',
228
+ type: 'address',
229
+ internalType: 'address',
230
+ },
231
+ {
232
+ name: 'initData',
233
+ type: 'bytes',
234
+ internalType: 'bytes',
235
+ },
236
+ ],
237
+ },
238
+ ],
239
+ },
240
+ {
241
+ name: 'claimPolicies',
242
+ type: 'tuple[]',
243
+ internalType: 'struct PolicyData[]',
244
+ components: [
245
+ {
246
+ name: 'policy',
247
+ type: 'address',
248
+ internalType: 'address',
249
+ },
250
+ {
251
+ name: 'initData',
252
+ type: 'bytes',
253
+ internalType: 'bytes',
254
+ },
255
+ ],
256
+ },
257
+ {
258
+ name: 'erc7739Policies',
259
+ type: 'tuple',
260
+ internalType: 'struct ERC7739Data',
261
+ components: [
262
+ {
263
+ name: 'allowedERC7739Content',
264
+ type: 'tuple[]',
265
+ internalType: 'struct ERC7739Context[]',
266
+ components: [
267
+ {
268
+ name: 'appDomainSeparator',
269
+ type: 'bytes32',
270
+ internalType: 'bytes32',
271
+ },
272
+ {
273
+ name: 'contentNames',
274
+ type: 'string[]',
275
+ internalType: 'string[]',
276
+ },
277
+ ],
278
+ },
279
+ {
280
+ name: 'erc1271Policies',
281
+ type: 'tuple[]',
282
+ internalType: 'struct PolicyData[]',
283
+ components: [
284
+ {
285
+ name: 'policy',
286
+ type: 'address',
287
+ internalType: 'address',
288
+ },
289
+ {
290
+ name: 'initData',
291
+ type: 'bytes',
292
+ internalType: 'bytes',
293
+ },
294
+ ],
295
+ },
296
+ ],
297
+ },
298
+ ],
299
+ },
300
+ ],
301
+ },
302
+ ],
303
+ },
304
+ ],
305
+ outputs: [],
306
+ stateMutability: 'nonpayable',
307
+ },
308
+ {
309
+ type: 'function',
310
+ name: 'verifyClaim',
311
+ inputs: [
312
+ { name: 'sponsor', type: 'address', internalType: 'address' },
313
+ { name: 'digest', type: 'bytes32', internalType: 'bytes32' },
314
+ { name: '', type: 'bytes32', internalType: 'bytes32' },
315
+ { name: 'emissaryData', type: 'bytes', internalType: 'bytes' },
316
+ { name: 'lockTag', type: 'bytes12', internalType: 'bytes12' },
317
+ ],
318
+ outputs: [{ name: '', type: 'bytes4', internalType: 'bytes4' }],
319
+ stateMutability: 'view',
320
+ },
321
+ {
322
+ type: 'function',
323
+ name: 'verifyExecution',
324
+ inputs: [
325
+ { name: 'sponsor', type: 'address', internalType: 'address' },
326
+ { name: 'digest', type: 'bytes32', internalType: 'bytes32' },
327
+ { name: 'emissaryData', type: 'bytes', internalType: 'bytes' },
328
+ {
329
+ name: 'executions',
330
+ type: 'tuple',
331
+ internalType: 'struct Types.Operation',
332
+ components: [{ name: 'data', type: 'bytes', internalType: 'bytes' }],
333
+ },
334
+ ],
335
+ outputs: [{ name: '', type: 'bytes4', internalType: 'bytes4' }],
336
+ stateMutability: 'nonpayable',
337
+ },
338
+ {
339
+ type: 'event',
340
+ name: 'EmissaryConfigUpdated',
341
+ inputs: [
342
+ {
343
+ name: 'account',
344
+ type: 'address',
345
+ indexed: true,
346
+ internalType: 'address',
347
+ },
348
+ {
349
+ name: 'validator',
350
+ type: 'address',
351
+ indexed: true,
352
+ internalType: 'contract IStatelessValidator',
353
+ },
354
+ {
355
+ name: 'lockTag',
356
+ type: 'bytes12',
357
+ indexed: true,
358
+ internalType: 'bytes12',
359
+ },
360
+ ],
361
+ anonymous: false,
362
+ },
363
+ {
364
+ type: 'event',
365
+ name: 'PolicyEnabled',
366
+ inputs: [
367
+ {
368
+ name: 'permissionId',
369
+ type: 'bytes32',
370
+ indexed: false,
371
+ internalType: 'PermissionId',
372
+ },
373
+ {
374
+ name: 'policyType',
375
+ type: 'uint8',
376
+ indexed: false,
377
+ internalType: 'enum PolicyType',
378
+ },
379
+ {
380
+ name: 'policy',
381
+ type: 'address',
382
+ indexed: false,
383
+ internalType: 'address',
384
+ },
385
+ {
386
+ name: 'smartAccount',
387
+ type: 'address',
388
+ indexed: false,
389
+ internalType: 'address',
390
+ },
391
+ ],
392
+ anonymous: false,
393
+ },
394
+ {
395
+ type: 'event',
396
+ name: 'SessionValidatorDisabled',
397
+ inputs: [
398
+ {
399
+ name: 'permissionId',
400
+ type: 'bytes32',
401
+ indexed: false,
402
+ internalType: 'PermissionId',
403
+ },
404
+ {
405
+ name: 'sessionValidator',
406
+ type: 'address',
407
+ indexed: false,
408
+ internalType: 'address',
409
+ },
410
+ {
411
+ name: 'smartAccount',
412
+ type: 'address',
413
+ indexed: false,
414
+ internalType: 'address',
415
+ },
416
+ ],
417
+ anonymous: false,
418
+ },
419
+ {
420
+ type: 'event',
421
+ name: 'SessionValidatorEnabled',
422
+ inputs: [
423
+ {
424
+ name: 'permissionId',
425
+ type: 'bytes32',
426
+ indexed: false,
427
+ internalType: 'PermissionId',
428
+ },
429
+ {
430
+ name: 'sessionValidator',
431
+ type: 'address',
432
+ indexed: false,
433
+ internalType: 'address',
434
+ },
435
+ {
436
+ name: 'smartAccount',
437
+ type: 'address',
438
+ indexed: false,
439
+ internalType: 'address',
440
+ },
441
+ ],
442
+ anonymous: false,
443
+ },
444
+ {
445
+ type: 'event',
446
+ name: 'SmartSessionEmissaryConfigUpdated',
447
+ inputs: [
448
+ {
449
+ name: 'account',
450
+ type: 'address',
451
+ indexed: true,
452
+ internalType: 'address',
453
+ },
454
+ {
455
+ name: 'permissionId',
456
+ type: 'bytes32',
457
+ indexed: false,
458
+ internalType: 'PermissionId',
459
+ },
460
+ {
461
+ name: 'lockTag',
462
+ type: 'bytes12',
463
+ indexed: true,
464
+ internalType: 'bytes12',
465
+ },
466
+ { name: 'enabled', type: 'bool', indexed: false, internalType: 'bool' },
467
+ ],
468
+ anonymous: false,
469
+ },
470
+ {
471
+ type: 'error',
472
+ name: 'ChainIdMismatch',
473
+ inputs: [
474
+ { name: 'providedChainId', type: 'uint64', internalType: 'uint64' },
475
+ ],
476
+ },
477
+ { type: 'error', name: 'ForbiddenValidationData', inputs: [] },
478
+ {
479
+ type: 'error',
480
+ name: 'HashMismatch',
481
+ inputs: [
482
+ { name: 'providedHash', type: 'bytes32', internalType: 'bytes32' },
483
+ { name: 'computedHash', type: 'bytes32', internalType: 'bytes32' },
484
+ ],
485
+ },
486
+ { type: 'error', name: 'IncorrectType', inputs: [] },
487
+ { type: 'error', name: 'InvalidActionId', inputs: [] },
488
+ { type: 'error', name: 'InvalidAllocatorSignature', inputs: [] },
489
+ { type: 'error', name: 'InvalidAllocatorSignature', inputs: [] },
490
+ { type: 'error', name: 'InvalidDataLength', inputs: [] },
491
+ { type: 'error', name: 'InvalidEmissaryDisableData', inputs: [] },
492
+ { type: 'error', name: 'InvalidEmissaryEnableData', inputs: [] },
493
+ {
494
+ type: 'error',
495
+ name: 'InvalidISessionValidator',
496
+ inputs: [
497
+ {
498
+ name: 'sessionValidator',
499
+ type: 'address',
500
+ internalType: 'contract ISessionValidator',
501
+ },
502
+ ],
503
+ },
504
+ { type: 'error', name: 'InvalidNonce', inputs: [] },
505
+ {
506
+ type: 'error',
507
+ name: 'InvalidPermissionId',
508
+ inputs: [
509
+ { name: 'permissionId', type: 'bytes32', internalType: 'PermissionId' },
510
+ ],
511
+ },
512
+ {
513
+ type: 'error',
514
+ name: 'InvalidPermissionId',
515
+ inputs: [
516
+ { name: 'permissionId', type: 'bytes32', internalType: 'PermissionId' },
517
+ ],
518
+ },
519
+ { type: 'error', name: 'InvalidSelfCall', inputs: [] },
520
+ {
521
+ type: 'error',
522
+ name: 'InvalidSession',
523
+ inputs: [
524
+ { name: 'permissionId', type: 'bytes32', internalType: 'PermissionId' },
525
+ ],
526
+ },
527
+ { type: 'error', name: 'InvalidSignature', inputs: [] },
528
+ { type: 'error', name: 'InvalidTarget', inputs: [] },
529
+ { type: 'error', name: 'InvalidUserSignature', inputs: [] },
530
+ { type: 'error', name: 'InvalidUserSignature', inputs: [] },
531
+ { type: 'error', name: 'NoExecutionsInBatch', inputs: [] },
532
+ {
533
+ type: 'error',
534
+ name: 'NoPoliciesSet',
535
+ inputs: [
536
+ { name: 'permissionId', type: 'bytes32', internalType: 'PermissionId' },
537
+ ],
538
+ },
539
+ { type: 'error', name: 'NotSet', inputs: [] },
540
+ {
541
+ type: 'error',
542
+ name: 'PolicyViolation',
543
+ inputs: [
544
+ { name: 'permissionId', type: 'bytes32', internalType: 'PermissionId' },
545
+ { name: 'policy', type: 'address', internalType: 'address' },
546
+ ],
547
+ },
548
+ { type: 'error', name: 'Reentrancy', inputs: [] },
549
+ {
550
+ type: 'error',
551
+ name: 'SignerNotFound',
552
+ inputs: [
553
+ { name: 'permissionId', type: 'bytes32', internalType: 'PermissionId' },
554
+ { name: 'account', type: 'address', internalType: 'address' },
555
+ ],
556
+ },
557
+ { type: 'error', name: 'UnauthorizedSource', inputs: [] },
558
+ { type: 'error', name: 'UnsafeFallbackNotAllowed', inputs: [] },
559
+ {
560
+ type: 'error',
561
+ name: 'UnsupportedPolicy',
562
+ inputs: [{ name: 'policy', type: 'address', internalType: 'address' }],
563
+ },
564
+ ];
565
+ exports.default = abi;
@@ -0,0 +1,5 @@
1
+ import type { Address } from 'viem';
2
+ declare const INTENT_EXECUTOR_ADDRESS: Address;
3
+ declare const INTENT_EXECUTOR_ADDRESS_DEV: Address;
4
+ export { INTENT_EXECUTOR_ADDRESS, INTENT_EXECUTOR_ADDRESS_DEV };
5
+ //# sourceMappingURL=chain-abstraction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chain-abstraction.d.ts","sourceRoot":"","sources":["../../../modules/chain-abstraction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,QAAA,MAAM,uBAAuB,EAAE,OACe,CAAA;AAC9C,QAAA,MAAM,2BAA2B,EAAE,OACW,CAAA;AAE9C,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,CAAA"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INTENT_EXECUTOR_ADDRESS_DEV = exports.INTENT_EXECUTOR_ADDRESS = void 0;
4
+ const INTENT_EXECUTOR_ADDRESS = '0x00000000005aD9ce1f5035FD62CA96CEf16AdAAF';
5
+ exports.INTENT_EXECUTOR_ADDRESS = INTENT_EXECUTOR_ADDRESS;
6
+ const INTENT_EXECUTOR_ADDRESS_DEV = '0xbf9b5b917a83f8adac17b0752846d41d8d7b7e17';
7
+ exports.INTENT_EXECUTOR_ADDRESS_DEV = INTENT_EXECUTOR_ADDRESS_DEV;
@@ -1,4 +1,11 @@
1
1
  import type { Address, Hex } from 'viem';
2
+ import type { ModuleInput } from '../types';
3
+ interface ModeleSetup {
4
+ validators: Module[];
5
+ executors: Module[];
6
+ fallbacks: Module[];
7
+ hooks: Module[];
8
+ }
2
9
  type ModuleTypeId = typeof MODULE_TYPE_ID_VALIDATOR | typeof MODULE_TYPE_ID_EXECUTOR | typeof MODULE_TYPE_ID_FALLBACK | typeof MODULE_TYPE_ID_HOOK;
3
10
  type ModuleType = typeof MODULE_TYPE_VALIDATOR | typeof MODULE_TYPE_EXECUTOR | typeof MODULE_TYPE_FALLBACK | typeof MODULE_TYPE_HOOK;
4
11
  interface Module {
@@ -17,6 +24,7 @@ declare const MODULE_TYPE_EXECUTOR = "executor";
17
24
  declare const MODULE_TYPE_FALLBACK = "fallback";
18
25
  declare const MODULE_TYPE_HOOK = "hook";
19
26
  declare function toModuleTypeId(type: ModuleType): ModuleTypeId;
20
- export { MODULE_TYPE_ID_VALIDATOR, MODULE_TYPE_ID_EXECUTOR, MODULE_TYPE_ID_FALLBACK, MODULE_TYPE_ID_HOOK, MODULE_TYPE_VALIDATOR, MODULE_TYPE_EXECUTOR, MODULE_TYPE_FALLBACK, MODULE_TYPE_HOOK, toModuleTypeId, };
21
- export type { Module, ModuleType, ModuleTypeId };
27
+ declare function getModule(module: ModuleInput): Module;
28
+ export { MODULE_TYPE_ID_VALIDATOR, MODULE_TYPE_ID_EXECUTOR, MODULE_TYPE_ID_FALLBACK, MODULE_TYPE_ID_HOOK, MODULE_TYPE_VALIDATOR, MODULE_TYPE_EXECUTOR, MODULE_TYPE_FALLBACK, MODULE_TYPE_HOOK, toModuleTypeId, getModule, };
29
+ export type { Module, ModeleSetup, ModuleType, ModuleTypeId };
22
30
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../modules/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAExC,KAAK,YAAY,GACb,OAAO,wBAAwB,GAC/B,OAAO,uBAAuB,GAC9B,OAAO,uBAAuB,GAC9B,OAAO,mBAAmB,CAAA;AAE9B,KAAK,UAAU,GACX,OAAO,qBAAqB,GAC5B,OAAO,oBAAoB,GAC3B,OAAO,oBAAoB,GAC3B,OAAO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CAAA;AAE9B,KAAK,UAAU,GACX,OAAO,qBAAqB,GAC5B,OAAO,oBAAoB,GAC3B,OAAO,oBAAoB,GAC3B,OAAO,gBAAgB,CAAA;AAE3B,UAAU,MAAM;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,GAAG,CAAA;IACb,UAAU,EAAE,GAAG,CAAA;IACf,iBAAiB,EAAE,GAAG,CAAA;IACtB,IAAI,EAAE,YAAY,CAAA;CACnB;AAED,QAAA,MAAM,wBAAwB,KAAK,CAAA;AACnC,QAAA,MAAM,uBAAuB,KAAK,CAAA;AAClC,QAAA,MAAM,uBAAuB,KAAK,CAAA;AAClC,QAAA,MAAM,mBAAmB,KAAK,CAAA;AAE9B,QAAA,MAAM,qBAAqB,cAAc,CAAA;AACzC,QAAA,MAAM,oBAAoB,aAAa,CAAA;AACvC,QAAA,MAAM,oBAAoB,aAAa,CAAA;AACvC,QAAA,MAAM,gBAAgB,SAAS,CAAA;AAE/B,iBAAS,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,YAAY,CAWtD;AAED,iBAAS,SAAS,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAQ9C;AAED,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,SAAS,GACV,CAAA;AACD,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,CAAA"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MODULE_TYPE_HOOK = exports.MODULE_TYPE_FALLBACK = exports.MODULE_TYPE_EXECUTOR = exports.MODULE_TYPE_VALIDATOR = exports.MODULE_TYPE_ID_HOOK = exports.MODULE_TYPE_ID_FALLBACK = exports.MODULE_TYPE_ID_EXECUTOR = exports.MODULE_TYPE_ID_VALIDATOR = void 0;
4
4
  exports.toModuleTypeId = toModuleTypeId;
5
+ exports.getModule = getModule;
5
6
  const MODULE_TYPE_ID_VALIDATOR = 1n;
6
7
  exports.MODULE_TYPE_ID_VALIDATOR = MODULE_TYPE_ID_VALIDATOR;
7
8
  const MODULE_TYPE_ID_EXECUTOR = 2n;
@@ -30,3 +31,12 @@ function toModuleTypeId(type) {
30
31
  return MODULE_TYPE_ID_HOOK;
31
32
  }
32
33
  }
34
+ function getModule(module) {
35
+ return {
36
+ type: toModuleTypeId(module.type),
37
+ address: module.address,
38
+ initData: module.initData ?? '0x',
39
+ deInitData: module.deInitData ?? '0x',
40
+ additionalContext: module.additionalContext ?? '0x',
41
+ };
42
+ }
@@ -1,17 +1,11 @@
1
1
  import { type Chain } from 'viem';
2
2
  import type { RhinestoneAccountConfig, RhinestoneConfig } from '../types';
3
- import { type Module } from './common';
4
- import { HOOK_ADDRESS } from './omni-account';
3
+ import { type ModeleSetup, type Module } from './common';
5
4
  import { getOwners, getValidators } from './read';
6
5
  import { getOwnerValidator } from './validators';
7
- interface ModeleSetup {
8
- validators: Module[];
9
- executors: Module[];
10
- fallbacks: Module[];
11
- hooks: Module[];
12
- }
6
+ import { getSessionDetails } from './validators/smart-sessions';
13
7
  declare function getSetup(config: RhinestoneAccountConfig): ModeleSetup;
14
8
  declare function getIntentExecutor(config: RhinestoneConfig): Module;
15
9
  declare function isRip7212SupportedNetwork(chain: Chain): boolean;
16
- export { HOOK_ADDRESS, getSetup, getOwnerValidator, getOwners, getIntentExecutor, getValidators, isRip7212SupportedNetwork, };
10
+ export { getSetup, getOwnerValidator, getOwners, getIntentExecutor, getValidators, isRip7212SupportedNetwork, getSessionDetails, };
17
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../modules/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,KAAK,EAAuB,MAAM,MAAM,CAAA;AAWpE,OAAO,KAAK,EAAE,u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