@0xsequence/wallet-primitives 3.0.0-beta.17 → 3.0.0-beta.19

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 (46) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-lint.log +4 -0
  3. package/.turbo/turbo-typecheck.log +4 -0
  4. package/CHANGELOG.md +12 -0
  5. package/dist/attestation.d.ts +15 -3
  6. package/dist/attestation.d.ts.map +1 -1
  7. package/dist/attestation.js +1 -1
  8. package/dist/attestation.js.map +1 -1
  9. package/dist/config.d.ts +40 -10
  10. package/dist/config.d.ts.map +1 -1
  11. package/dist/config.js +7 -7
  12. package/dist/config.js.map +1 -1
  13. package/dist/extensions/recovery.d.ts +4 -4
  14. package/dist/extensions/recovery.d.ts.map +1 -1
  15. package/dist/extensions/recovery.js +1 -1
  16. package/dist/extensions/recovery.js.map +1 -1
  17. package/dist/network.d.ts +5 -1
  18. package/dist/network.d.ts.map +1 -1
  19. package/dist/network.js +147 -1
  20. package/dist/network.js.map +1 -1
  21. package/dist/payload.d.ts.map +1 -1
  22. package/dist/payload.js.map +1 -1
  23. package/dist/signature.d.ts.map +1 -1
  24. package/dist/signature.js +8 -6
  25. package/dist/signature.js.map +1 -1
  26. package/dist/utils.d.ts.map +1 -1
  27. package/dist/utils.js +1 -1
  28. package/dist/utils.js.map +1 -1
  29. package/eslint.config.js +12 -0
  30. package/package.json +6 -4
  31. package/src/attestation.ts +16 -4
  32. package/src/config.ts +62 -20
  33. package/src/extensions/recovery.ts +6 -7
  34. package/src/network.ts +154 -2
  35. package/src/payload.ts +1 -1
  36. package/src/signature.ts +10 -8
  37. package/src/utils.ts +2 -2
  38. package/test/address.test.ts +9 -9
  39. package/test/attestation.test.ts +1 -1
  40. package/test/config.test.ts +1 -1
  41. package/test/passkeys.test.ts +3 -10
  42. package/test/payload.test.ts +2 -7
  43. package/test/precondition.test.ts +6 -8
  44. package/test/signature.test.ts +11 -17
  45. package/test/utils.test.ts +4 -4
  46. package/eslint.config.mjs +0 -4
package/src/config.ts CHANGED
@@ -2,7 +2,6 @@ import { Address, Bytes, Hash, Hex } from 'ox'
2
2
  import {
3
3
  isRawConfig,
4
4
  isRawNestedLeaf,
5
- isRawNode,
6
5
  isRawSignerLeaf,
7
6
  isSignedSapientSignerLeaf,
8
7
  isSignedSignerLeaf,
@@ -55,6 +54,49 @@ export type Leaf = SignerLeaf | SapientSignerLeaf | SubdigestLeaf | AnyAddressSu
55
54
 
56
55
  export type Topology = Node | Leaf
57
56
 
57
+ /** Encoded topology types for JSON serialization */
58
+ type EncodedSignerLeaf = {
59
+ type: 'signer'
60
+ address: Address.Address
61
+ weight: string
62
+ }
63
+
64
+ type EncodedSapientSignerLeaf = {
65
+ type: 'sapient-signer'
66
+ address: Address.Address
67
+ weight: string
68
+ imageHash: Hex.Hex
69
+ }
70
+
71
+ type EncodedSubdigestLeaf = {
72
+ type: 'subdigest'
73
+ digest: Hex.Hex
74
+ }
75
+
76
+ type EncodedAnyAddressSubdigestLeaf = {
77
+ type: 'any-address-subdigest'
78
+ digest: Hex.Hex
79
+ }
80
+
81
+ type EncodedNestedLeaf = {
82
+ type: 'nested'
83
+ tree: EncodedTopology
84
+ weight: string
85
+ threshold: string
86
+ }
87
+
88
+ type EncodedNodeLeaf = Hex.Hex
89
+
90
+ export type EncodedLeaf =
91
+ | EncodedSignerLeaf
92
+ | EncodedSapientSignerLeaf
93
+ | EncodedSubdigestLeaf
94
+ | EncodedAnyAddressSubdigestLeaf
95
+ | EncodedNestedLeaf
96
+ | EncodedNodeLeaf
97
+ export type EncodedNode = [EncodedTopology, EncodedTopology]
98
+ export type EncodedTopology = EncodedNode | EncodedLeaf
99
+
58
100
  export type Config = {
59
101
  threshold: bigint
60
102
  checkpoint: bigint
@@ -62,39 +104,39 @@ export type Config = {
62
104
  checkpointer?: Address.Address
63
105
  }
64
106
 
65
- export function isSignerLeaf(cand: any): cand is SignerLeaf {
66
- return typeof cand === 'object' && cand !== null && cand.type === 'signer'
107
+ export function isSignerLeaf(cand: unknown): cand is SignerLeaf {
108
+ return typeof cand === 'object' && cand !== null && 'type' in cand && cand.type === 'signer'
67
109
  }
68
110
 
69
- export function isSapientSignerLeaf(cand: any): cand is SapientSignerLeaf {
70
- return typeof cand === 'object' && cand !== null && cand.type === 'sapient-signer'
111
+ export function isSapientSignerLeaf(cand: unknown): cand is SapientSignerLeaf {
112
+ return typeof cand === 'object' && cand !== null && 'type' in cand && cand.type === 'sapient-signer'
71
113
  }
72
114
 
73
- export function isSubdigestLeaf(cand: any): cand is SubdigestLeaf {
74
- return typeof cand === 'object' && cand !== null && cand.type === 'subdigest'
115
+ export function isSubdigestLeaf(cand: unknown): cand is SubdigestLeaf {
116
+ return typeof cand === 'object' && cand !== null && 'type' in cand && cand.type === 'subdigest'
75
117
  }
76
118
 
77
- export function isAnyAddressSubdigestLeaf(cand: any): cand is AnyAddressSubdigestLeaf {
78
- return typeof cand === 'object' && cand !== null && cand.type === 'any-address-subdigest'
119
+ export function isAnyAddressSubdigestLeaf(cand: unknown): cand is AnyAddressSubdigestLeaf {
120
+ return typeof cand === 'object' && cand !== null && 'type' in cand && cand.type === 'any-address-subdigest'
79
121
  }
80
122
 
81
- export function isNodeLeaf(cand: any): cand is NodeLeaf {
82
- return Hex.validate(cand) && cand.length === 66
123
+ export function isNodeLeaf(cand: unknown): cand is NodeLeaf {
124
+ return typeof cand === 'string' && Hex.validate(cand) && cand.length === 66
83
125
  }
84
126
 
85
- export function isNestedLeaf(cand: any): cand is NestedLeaf {
86
- return typeof cand === 'object' && cand !== null && cand.type === 'nested'
127
+ export function isNestedLeaf(cand: unknown): cand is NestedLeaf {
128
+ return typeof cand === 'object' && cand !== null && 'type' in cand && cand.type === 'nested'
87
129
  }
88
130
 
89
- export function isNode(cand: any): cand is Node {
131
+ export function isNode(cand: unknown): cand is Node {
90
132
  return Array.isArray(cand) && cand.length === 2 && isTopology(cand[0]) && isTopology(cand[1])
91
133
  }
92
134
 
93
- export function isConfig(cand: any): cand is Config {
94
- return typeof cand === 'object' && 'threshold' in cand && 'checkpoint' in cand && 'topology' in cand
135
+ export function isConfig(cand: unknown): cand is Config {
136
+ return typeof cand === 'object' && cand !== null && 'threshold' in cand && 'checkpoint' in cand && 'topology' in cand
95
137
  }
96
138
 
97
- export function isLeaf(cand: Topology): cand is Leaf {
139
+ export function isLeaf(cand: unknown): cand is Leaf {
98
140
  return (
99
141
  isSignerLeaf(cand) ||
100
142
  isSapientSignerLeaf(cand) ||
@@ -105,7 +147,7 @@ export function isLeaf(cand: Topology): cand is Leaf {
105
147
  )
106
148
  }
107
149
 
108
- export function isTopology(cand: any): cand is Topology {
150
+ export function isTopology(cand: unknown): cand is Topology {
109
151
  return isNode(cand) || isLeaf(cand)
110
152
  }
111
153
 
@@ -310,7 +352,7 @@ export function configFromJson(json: string): Config {
310
352
  }
311
353
  }
312
354
 
313
- function encodeTopology(top: Topology): any {
355
+ function encodeTopology(top: Topology): EncodedTopology {
314
356
  if (isNode(top)) {
315
357
  return [encodeTopology(top[0]), encodeTopology(top[1])]
316
358
  } else if (isSignerLeaf(top)) {
@@ -350,7 +392,7 @@ function encodeTopology(top: Topology): any {
350
392
  throw new Error('Invalid topology')
351
393
  }
352
394
 
353
- function decodeTopology(obj: any): Topology {
395
+ function decodeTopology(obj: EncodedTopology): Topology {
354
396
  if (Array.isArray(obj)) {
355
397
  if (obj.length !== 2) {
356
398
  throw new Error('Invalid node structure in JSON')
@@ -1,7 +1,6 @@
1
1
  import { Abi, AbiFunction, Address, Bytes, Hex, Provider } from 'ox'
2
2
  import * as GenericTree from '../generic-tree.js'
3
3
  import { Signature } from '../index.js'
4
- import * as Network from '../network.js'
5
4
  import * as Payload from '../payload.js'
6
5
  import { packRSY } from '../utils.js'
7
6
 
@@ -56,21 +55,21 @@ export type Tree = Branch | GenericTree.Node | RecoveryLeaf
56
55
  /**
57
56
  * Type guard to check if a value is a RecoveryLeaf
58
57
  */
59
- export function isRecoveryLeaf(cand: any): cand is RecoveryLeaf {
60
- return typeof cand === 'object' && cand !== null && cand.type === 'leaf'
58
+ export function isRecoveryLeaf(cand: unknown): cand is RecoveryLeaf {
59
+ return typeof cand === 'object' && cand !== null && 'type' in cand && cand.type === 'leaf'
61
60
  }
62
61
 
63
62
  /**
64
63
  * Type guard to check if a value is a Node (pair of subtrees)
65
64
  */
66
- export function isBranch(cand: any): cand is Branch {
65
+ export function isBranch(cand: unknown): cand is Branch {
67
66
  return Array.isArray(cand) && cand.length === 2 && isTree(cand[0]) && isTree(cand[1])
68
67
  }
69
68
 
70
69
  /**
71
70
  * Type guard to check if a value is a Topology
72
71
  */
73
- export function isTree(cand: any): cand is Tree {
72
+ export function isTree(cand: unknown): cand is Tree {
74
73
  return isRecoveryLeaf(cand) || GenericTree.isNode(cand) || isBranch(cand)
75
74
  }
76
75
 
@@ -437,10 +436,10 @@ export function fromGenericTree(tree: GenericTree.Tree): Tree {
437
436
  */
438
437
  export function encodeCalldata(
439
438
  wallet: Address.Address,
440
- payload: Payload.Recovery<any>,
439
+ payload: Payload.Recovery<Payload.MayRecoveryPayload>,
441
440
  signer: Address.Address,
442
441
  signature: Signature.SignatureOfSignerLeaf,
443
- ) {
442
+ ): Hex.Hex {
444
443
  let signatureBytes: Hex.Hex
445
444
 
446
445
  if (signature.type === 'erc1271') {
package/src/network.ts CHANGED
@@ -1,3 +1,8 @@
1
+ import { Address } from 'ox'
2
+
3
+ const DEFAULT_MULTICALL3_ADDRESS: Address.Address = '0xcA11bde05977b3631167028862bE2a173976CA11'
4
+ const SEQUENCE_MULTICALL3_ADDRESS: Address.Address = '0xae96419a81516f063744206d4b5E36f3168280f8'
5
+
1
6
  export enum NetworkType {
2
7
  MAINNET = 'mainnet',
3
8
  TESTNET = 'testnet',
@@ -21,8 +26,11 @@ export interface Network {
21
26
  name: string
22
27
  decimals: number
23
28
  }
24
- ensAddress?: string
25
29
  deprecated?: true
30
+ contracts?: {
31
+ multicall3?: Address.Address
32
+ ensUniversalResolver?: Address.Address
33
+ }
26
34
  }
27
35
 
28
36
  export const ChainId = {
@@ -160,7 +168,10 @@ export const ALL: Network[] = [
160
168
  name: 'Ether',
161
169
  decimals: 18,
162
170
  },
163
- ensAddress: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
171
+ contracts: {
172
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
173
+ ensUniversalResolver: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e',
174
+ },
164
175
  },
165
176
  {
166
177
  chainId: ChainId.SEPOLIA,
@@ -178,6 +189,9 @@ export const ALL: Network[] = [
178
189
  name: 'Sepolia Ether',
179
190
  decimals: 18,
180
191
  },
192
+ contracts: {
193
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
194
+ },
181
195
  },
182
196
  {
183
197
  chainId: ChainId.POLYGON,
@@ -195,6 +209,9 @@ export const ALL: Network[] = [
195
209
  name: 'POL',
196
210
  decimals: 18,
197
211
  },
212
+ contracts: {
213
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
214
+ },
198
215
  },
199
216
  {
200
217
  chainId: ChainId.POLYGON_AMOY,
@@ -212,6 +229,9 @@ export const ALL: Network[] = [
212
229
  name: 'Amoy POL',
213
230
  decimals: 18,
214
231
  },
232
+ contracts: {
233
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
234
+ },
215
235
  },
216
236
  {
217
237
  chainId: ChainId.POLYGON_ZKEVM,
@@ -229,6 +249,9 @@ export const ALL: Network[] = [
229
249
  name: 'Ether',
230
250
  decimals: 18,
231
251
  },
252
+ contracts: {
253
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
254
+ },
232
255
  },
233
256
  {
234
257
  chainId: ChainId.BSC,
@@ -246,6 +269,9 @@ export const ALL: Network[] = [
246
269
  name: 'BNB',
247
270
  decimals: 18,
248
271
  },
272
+ contracts: {
273
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
274
+ },
249
275
  },
250
276
  {
251
277
  chainId: ChainId.BSC_TESTNET,
@@ -263,6 +289,9 @@ export const ALL: Network[] = [
263
289
  name: 'Testnet BNB',
264
290
  decimals: 18,
265
291
  },
292
+ contracts: {
293
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
294
+ },
266
295
  },
267
296
  {
268
297
  chainId: ChainId.OPTIMISM,
@@ -280,6 +309,9 @@ export const ALL: Network[] = [
280
309
  name: 'Ether',
281
310
  decimals: 18,
282
311
  },
312
+ contracts: {
313
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
314
+ },
283
315
  },
284
316
  {
285
317
  chainId: ChainId.OPTIMISM_SEPOLIA,
@@ -297,6 +329,9 @@ export const ALL: Network[] = [
297
329
  name: 'Sepolia Ether',
298
330
  decimals: 18,
299
331
  },
332
+ contracts: {
333
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
334
+ },
300
335
  },
301
336
  {
302
337
  chainId: ChainId.ARBITRUM,
@@ -314,6 +349,9 @@ export const ALL: Network[] = [
314
349
  name: 'Ether',
315
350
  decimals: 18,
316
351
  },
352
+ contracts: {
353
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
354
+ },
317
355
  },
318
356
  {
319
357
  chainId: ChainId.ARBITRUM_SEPOLIA,
@@ -331,6 +369,9 @@ export const ALL: Network[] = [
331
369
  name: 'Sepolia Ether',
332
370
  decimals: 18,
333
371
  },
372
+ contracts: {
373
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
374
+ },
334
375
  },
335
376
  {
336
377
  chainId: ChainId.ARBITRUM_NOVA,
@@ -348,6 +389,9 @@ export const ALL: Network[] = [
348
389
  name: 'Ether',
349
390
  decimals: 18,
350
391
  },
392
+ contracts: {
393
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
394
+ },
351
395
  },
352
396
  {
353
397
  chainId: ChainId.AVALANCHE,
@@ -365,6 +409,9 @@ export const ALL: Network[] = [
365
409
  name: 'AVAX',
366
410
  decimals: 18,
367
411
  },
412
+ contracts: {
413
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
414
+ },
368
415
  },
369
416
  {
370
417
  chainId: ChainId.AVALANCHE_TESTNET,
@@ -382,6 +429,9 @@ export const ALL: Network[] = [
382
429
  name: 'Testnet AVAX',
383
430
  decimals: 18,
384
431
  },
432
+ contracts: {
433
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
434
+ },
385
435
  },
386
436
  {
387
437
  chainId: ChainId.GNOSIS,
@@ -399,6 +449,9 @@ export const ALL: Network[] = [
399
449
  name: 'XDAI',
400
450
  decimals: 18,
401
451
  },
452
+ contracts: {
453
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
454
+ },
402
455
  },
403
456
  {
404
457
  chainId: ChainId.BASE,
@@ -416,6 +469,9 @@ export const ALL: Network[] = [
416
469
  name: 'Ether',
417
470
  decimals: 18,
418
471
  },
472
+ contracts: {
473
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
474
+ },
419
475
  },
420
476
  {
421
477
  chainId: ChainId.BASE_SEPOLIA,
@@ -433,6 +489,9 @@ export const ALL: Network[] = [
433
489
  name: 'Sepolia Ether',
434
490
  decimals: 18,
435
491
  },
492
+ contracts: {
493
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
494
+ },
436
495
  },
437
496
  {
438
497
  chainId: ChainId.HOMEVERSE,
@@ -450,6 +509,9 @@ export const ALL: Network[] = [
450
509
  name: 'OAS',
451
510
  decimals: 18,
452
511
  },
512
+ contracts: {
513
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
514
+ },
453
515
  },
454
516
  {
455
517
  chainId: ChainId.HOMEVERSE_TESTNET,
@@ -467,6 +529,9 @@ export const ALL: Network[] = [
467
529
  name: 'Testnet OAS',
468
530
  decimals: 18,
469
531
  },
532
+ contracts: {
533
+ multicall3: SEQUENCE_MULTICALL3_ADDRESS,
534
+ },
470
535
  },
471
536
  {
472
537
  chainId: ChainId.XAI,
@@ -484,6 +549,9 @@ export const ALL: Network[] = [
484
549
  name: 'XAI',
485
550
  decimals: 18,
486
551
  },
552
+ contracts: {
553
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
554
+ },
487
555
  },
488
556
  {
489
557
  chainId: ChainId.XAI_SEPOLIA,
@@ -501,6 +569,9 @@ export const ALL: Network[] = [
501
569
  name: 'Sepolia XAI',
502
570
  decimals: 18,
503
571
  },
572
+ contracts: {
573
+ multicall3: SEQUENCE_MULTICALL3_ADDRESS,
574
+ },
504
575
  },
505
576
  {
506
577
  chainId: ChainId.B3,
@@ -518,6 +589,9 @@ export const ALL: Network[] = [
518
589
  name: 'Ether',
519
590
  decimals: 18,
520
591
  },
592
+ contracts: {
593
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
594
+ },
521
595
  },
522
596
  {
523
597
  chainId: ChainId.B3_SEPOLIA,
@@ -535,6 +609,9 @@ export const ALL: Network[] = [
535
609
  name: 'Ether',
536
610
  decimals: 18,
537
611
  },
612
+ contracts: {
613
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
614
+ },
538
615
  },
539
616
  {
540
617
  chainId: ChainId.APECHAIN,
@@ -552,6 +629,9 @@ export const ALL: Network[] = [
552
629
  name: 'ApeCoin',
553
630
  decimals: 18,
554
631
  },
632
+ contracts: {
633
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
634
+ },
555
635
  },
556
636
  {
557
637
  chainId: ChainId.APECHAIN_TESTNET,
@@ -569,6 +649,9 @@ export const ALL: Network[] = [
569
649
  name: 'ApeCoin',
570
650
  decimals: 18,
571
651
  },
652
+ contracts: {
653
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
654
+ },
572
655
  },
573
656
  {
574
657
  chainId: ChainId.BLAST,
@@ -586,6 +669,9 @@ export const ALL: Network[] = [
586
669
  name: 'Ether',
587
670
  decimals: 18,
588
671
  },
672
+ contracts: {
673
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
674
+ },
589
675
  },
590
676
  {
591
677
  chainId: ChainId.BLAST_SEPOLIA,
@@ -603,6 +689,9 @@ export const ALL: Network[] = [
603
689
  name: 'Ether',
604
690
  decimals: 18,
605
691
  },
692
+ contracts: {
693
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
694
+ },
606
695
  },
607
696
  {
608
697
  chainId: ChainId.TELOS,
@@ -620,6 +709,9 @@ export const ALL: Network[] = [
620
709
  name: 'TLOS',
621
710
  decimals: 18,
622
711
  },
712
+ contracts: {
713
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
714
+ },
623
715
  },
624
716
  {
625
717
  chainId: ChainId.TELOS_TESTNET,
@@ -637,6 +729,9 @@ export const ALL: Network[] = [
637
729
  name: 'TLOS',
638
730
  decimals: 18,
639
731
  },
732
+ contracts: {
733
+ multicall3: SEQUENCE_MULTICALL3_ADDRESS,
734
+ },
640
735
  },
641
736
  {
642
737
  chainId: ChainId.SKALE_NEBULA,
@@ -654,6 +749,9 @@ export const ALL: Network[] = [
654
749
  name: 'SKALE Fuel',
655
750
  decimals: 18,
656
751
  },
752
+ contracts: {
753
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
754
+ },
657
755
  },
658
756
  {
659
757
  chainId: ChainId.SKALE_NEBULA_TESTNET,
@@ -671,6 +769,9 @@ export const ALL: Network[] = [
671
769
  name: 'SKALE Fuel',
672
770
  decimals: 18,
673
771
  },
772
+ contracts: {
773
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
774
+ },
674
775
  },
675
776
  {
676
777
  chainId: ChainId.SONEIUM,
@@ -688,6 +789,9 @@ export const ALL: Network[] = [
688
789
  name: 'Ether',
689
790
  decimals: 18,
690
791
  },
792
+ contracts: {
793
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
794
+ },
691
795
  },
692
796
  {
693
797
  chainId: ChainId.SONEIUM_MINATO,
@@ -705,6 +809,9 @@ export const ALL: Network[] = [
705
809
  name: 'Ether',
706
810
  decimals: 18,
707
811
  },
812
+ contracts: {
813
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
814
+ },
708
815
  },
709
816
  {
710
817
  chainId: ChainId.TOY_TESTNET,
@@ -722,6 +829,9 @@ export const ALL: Network[] = [
722
829
  name: 'TOY',
723
830
  decimals: 18,
724
831
  },
832
+ contracts: {
833
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
834
+ },
725
835
  },
726
836
  {
727
837
  chainId: ChainId.IMMUTABLE_ZKEVM,
@@ -739,6 +849,9 @@ export const ALL: Network[] = [
739
849
  name: 'IMX',
740
850
  decimals: 18,
741
851
  },
852
+ contracts: {
853
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
854
+ },
742
855
  },
743
856
  {
744
857
  chainId: ChainId.IMMUTABLE_ZKEVM_TESTNET,
@@ -756,6 +869,9 @@ export const ALL: Network[] = [
756
869
  name: 'IMX',
757
870
  decimals: 18,
758
871
  },
872
+ contracts: {
873
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
874
+ },
759
875
  },
760
876
  {
761
877
  chainId: ChainId.MOONBEAM,
@@ -773,6 +889,9 @@ export const ALL: Network[] = [
773
889
  name: 'GLMR',
774
890
  decimals: 18,
775
891
  },
892
+ contracts: {
893
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
894
+ },
776
895
  },
777
896
  {
778
897
  chainId: ChainId.MOONBASE_ALPHA,
@@ -790,6 +909,9 @@ export const ALL: Network[] = [
790
909
  name: 'GLMR',
791
910
  decimals: 18,
792
911
  },
912
+ contracts: {
913
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
914
+ },
793
915
  },
794
916
  {
795
917
  chainId: ChainId.ETHERLINK,
@@ -807,6 +929,9 @@ export const ALL: Network[] = [
807
929
  name: 'Tez',
808
930
  decimals: 18,
809
931
  },
932
+ contracts: {
933
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
934
+ },
810
935
  },
811
936
  {
812
937
  chainId: ChainId.ETHERLINK_SHADOWNET_TESTNET,
@@ -824,6 +949,9 @@ export const ALL: Network[] = [
824
949
  name: 'Tez',
825
950
  decimals: 18,
826
951
  },
952
+ contracts: {
953
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
954
+ },
827
955
  },
828
956
  {
829
957
  chainId: ChainId.MONAD,
@@ -841,6 +969,9 @@ export const ALL: Network[] = [
841
969
  name: 'MON',
842
970
  decimals: 18,
843
971
  },
972
+ contracts: {
973
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
974
+ },
844
975
  },
845
976
  {
846
977
  chainId: ChainId.MONAD_TESTNET,
@@ -858,6 +989,9 @@ export const ALL: Network[] = [
858
989
  name: 'MON',
859
990
  decimals: 18,
860
991
  },
992
+ contracts: {
993
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
994
+ },
861
995
  },
862
996
 
863
997
  {
@@ -876,6 +1010,9 @@ export const ALL: Network[] = [
876
1010
  name: 'SOMI',
877
1011
  decimals: 18,
878
1012
  },
1013
+ contracts: {
1014
+ multicall3: SEQUENCE_MULTICALL3_ADDRESS,
1015
+ },
879
1016
  },
880
1017
 
881
1018
  {
@@ -894,6 +1031,9 @@ export const ALL: Network[] = [
894
1031
  name: 'STT',
895
1032
  decimals: 18,
896
1033
  },
1034
+ contracts: {
1035
+ multicall3: SEQUENCE_MULTICALL3_ADDRESS,
1036
+ },
897
1037
  },
898
1038
 
899
1039
  {
@@ -912,6 +1052,9 @@ export const ALL: Network[] = [
912
1052
  name: 'TCENT',
913
1053
  decimals: 18,
914
1054
  },
1055
+ contracts: {
1056
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
1057
+ },
915
1058
  },
916
1059
 
917
1060
  {
@@ -930,6 +1073,9 @@ export const ALL: Network[] = [
930
1073
  name: 'ETH',
931
1074
  decimals: 18,
932
1075
  },
1076
+ contracts: {
1077
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
1078
+ },
933
1079
  },
934
1080
 
935
1081
  {
@@ -948,6 +1094,9 @@ export const ALL: Network[] = [
948
1094
  name: 'SAND',
949
1095
  decimals: 18,
950
1096
  },
1097
+ contracts: {
1098
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
1099
+ },
951
1100
  },
952
1101
 
953
1102
  {
@@ -966,6 +1115,9 @@ export const ALL: Network[] = [
966
1115
  name: 'USDC',
967
1116
  decimals: 6,
968
1117
  },
1118
+ contracts: {
1119
+ multicall3: DEFAULT_MULTICALL3_ADDRESS,
1120
+ },
969
1121
  },
970
1122
 
971
1123
  {
package/src/payload.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { AbiFunction, AbiParameters, Address, Bytes, Hash, Hex } from 'ox'
2
2
  import { getSignPayload } from 'ox/TypedData'
3
3
  import { EXECUTE_USER_OP, RECOVER_SAPIENT_SIGNATURE } from './constants.js'
4
- import { Attestation, Network } from './index.js'
4
+ import { Attestation } from './index.js'
5
5
  import { minBytesFor } from './utils.js'
6
6
  import { UserOperation } from 'ox/erc4337'
7
7