@account-kit/wallet-client 0.1.0-alpha.7 → 0.1.0-alpha.9

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 (91) hide show
  1. package/dist/esm/capabilities/index.d.ts +3 -0
  2. package/dist/esm/capabilities/index.js +2 -0
  3. package/dist/esm/capabilities/index.js.map +1 -1
  4. package/dist/esm/capabilities/multiDimensionalNonce.d.ts +3 -0
  5. package/dist/esm/capabilities/multiDimensionalNonce.js +7 -0
  6. package/dist/esm/capabilities/multiDimensionalNonce.js.map +1 -0
  7. package/dist/esm/client/actions/prepareCalls.d.ts +1 -1
  8. package/dist/esm/client/actions/prepareCalls.js +1 -1
  9. package/dist/esm/client/actions/prepareCalls.js.map +1 -1
  10. package/dist/esm/client/actions/signPreparedCalls.js +26 -37
  11. package/dist/esm/client/actions/signPreparedCalls.js.map +1 -1
  12. package/dist/esm/client/actions/signSignatureRequest.d.ts +3 -2
  13. package/dist/esm/client/actions/signSignatureRequest.js.map +1 -1
  14. package/dist/esm/exports/internal.d.ts +1 -0
  15. package/dist/esm/exports/internal.js +1 -0
  16. package/dist/esm/exports/internal.js.map +1 -1
  17. package/dist/esm/isomorphic/actions/createSession.js +20 -5
  18. package/dist/esm/isomorphic/actions/createSession.js.map +1 -1
  19. package/dist/esm/isomorphic/actions/prepareCalls.js +39 -17
  20. package/dist/esm/isomorphic/actions/prepareCalls.js.map +1 -1
  21. package/dist/esm/isomorphic/actions/sendPreparedCalls.js +62 -8
  22. package/dist/esm/isomorphic/actions/sendPreparedCalls.js.map +1 -1
  23. package/dist/esm/isomorphic/client.d.ts +9 -0
  24. package/dist/esm/isomorphic/utils/7702.d.ts +6 -1
  25. package/dist/esm/isomorphic/utils/7702.js +26 -12
  26. package/dist/esm/isomorphic/utils/7702.js.map +1 -1
  27. package/dist/esm/isomorphic/utils/createAccount.d.ts +1 -0
  28. package/dist/esm/isomorphic/utils/createAccount.js +96 -34
  29. package/dist/esm/isomorphic/utils/createAccount.js.map +1 -1
  30. package/dist/esm/isomorphic/utils/supportsFeature.d.ts +4 -0
  31. package/dist/esm/isomorphic/utils/supportsFeature.js +21 -0
  32. package/dist/esm/isomorphic/utils/supportsFeature.js.map +1 -0
  33. package/dist/esm/rpc/request.d.ts +54 -0
  34. package/dist/esm/rpc/request.js +1 -0
  35. package/dist/esm/rpc/request.js.map +1 -1
  36. package/dist/esm/rpc/schema.d.ts +54 -0
  37. package/dist/esm/schemas.d.ts +35 -1
  38. package/dist/esm/schemas.js +56 -1
  39. package/dist/esm/schemas.js.map +1 -1
  40. package/dist/esm/types.d.ts +3 -0
  41. package/dist/esm/types.js.map +1 -1
  42. package/dist/esm/utils.d.ts +1 -0
  43. package/dist/esm/utils.js.map +1 -1
  44. package/dist/types/capabilities/index.d.ts +3 -0
  45. package/dist/types/capabilities/index.d.ts.map +1 -1
  46. package/dist/types/capabilities/multiDimensionalNonce.d.ts +4 -0
  47. package/dist/types/capabilities/multiDimensionalNonce.d.ts.map +1 -0
  48. package/dist/types/client/actions/prepareCalls.d.ts +1 -1
  49. package/dist/types/client/actions/signPreparedCalls.d.ts.map +1 -1
  50. package/dist/types/client/actions/signSignatureRequest.d.ts +3 -2
  51. package/dist/types/client/actions/signSignatureRequest.d.ts.map +1 -1
  52. package/dist/types/exports/internal.d.ts +1 -0
  53. package/dist/types/exports/internal.d.ts.map +1 -1
  54. package/dist/types/isomorphic/actions/createSession.d.ts.map +1 -1
  55. package/dist/types/isomorphic/actions/prepareCalls.d.ts.map +1 -1
  56. package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts.map +1 -1
  57. package/dist/types/isomorphic/client.d.ts +9 -0
  58. package/dist/types/isomorphic/client.d.ts.map +1 -1
  59. package/dist/types/isomorphic/utils/7702.d.ts +6 -1
  60. package/dist/types/isomorphic/utils/7702.d.ts.map +1 -1
  61. package/dist/types/isomorphic/utils/createAccount.d.ts +1 -0
  62. package/dist/types/isomorphic/utils/createAccount.d.ts.map +1 -1
  63. package/dist/types/isomorphic/utils/supportsFeature.d.ts +5 -0
  64. package/dist/types/isomorphic/utils/supportsFeature.d.ts.map +1 -0
  65. package/dist/types/rpc/request.d.ts +54 -0
  66. package/dist/types/rpc/request.d.ts.map +1 -1
  67. package/dist/types/rpc/schema.d.ts +54 -0
  68. package/dist/types/rpc/schema.d.ts.map +1 -1
  69. package/dist/types/schemas.d.ts +35 -1
  70. package/dist/types/schemas.d.ts.map +1 -1
  71. package/dist/types/types.d.ts +3 -0
  72. package/dist/types/types.d.ts.map +1 -1
  73. package/dist/types/utils.d.ts +1 -0
  74. package/dist/types/utils.d.ts.map +1 -1
  75. package/package.json +5 -5
  76. package/src/capabilities/index.ts +2 -0
  77. package/src/capabilities/multiDimensionalNonce.ts +7 -0
  78. package/src/client/actions/prepareCalls.ts +1 -1
  79. package/src/client/actions/signPreparedCalls.ts +42 -43
  80. package/src/client/actions/signSignatureRequest.ts +4 -2
  81. package/src/exports/internal.ts +1 -0
  82. package/src/isomorphic/actions/createSession.ts +25 -4
  83. package/src/isomorphic/actions/prepareCalls.ts +48 -21
  84. package/src/isomorphic/actions/sendPreparedCalls.ts +69 -9
  85. package/src/isomorphic/utils/7702.ts +41 -14
  86. package/src/isomorphic/utils/createAccount.ts +115 -35
  87. package/src/isomorphic/utils/supportsFeature.ts +34 -0
  88. package/src/rpc/request.ts +1 -0
  89. package/src/schemas.ts +94 -3
  90. package/src/types.ts +4 -0
  91. package/src/utils.ts +2 -0
@@ -262,6 +262,9 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
262
262
  account: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
263
263
  delegation: import("@sinclair/typebox").TUnion<(import("@sinclair/typebox").TLiteral<"0x69007702764179f14F51cdce752f4f775d74E139"> | import("@sinclair/typebox").TLiteral<"ModularAccountV2">)[]>;
264
264
  }>, import("@sinclair/typebox").TLiteral<true>]>>;
265
+ nonceOverride: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
266
+ nonceKey: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
267
+ }>>;
265
268
  }>>;
266
269
  }>]>;
267
270
  }>;
@@ -287,6 +290,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
287
290
  data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
288
291
  raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
289
292
  }>]>;
293
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
290
294
  }>, import("@sinclair/typebox").TObject<{
291
295
  type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
292
296
  data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
@@ -322,6 +326,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
322
326
  [x: string]: unknown;
323
327
  };
324
328
  }>;
329
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
325
330
  }>]>;
326
331
  }>, import("@sinclair/typebox").TObject<{
327
332
  type: import("@sinclair/typebox").TLiteral<"user-operation-v070">;
@@ -347,6 +352,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
347
352
  data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
348
353
  raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
349
354
  }>]>;
355
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
350
356
  }>, import("@sinclair/typebox").TObject<{
351
357
  type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
352
358
  data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
@@ -382,6 +388,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
382
388
  [x: string]: unknown;
383
389
  };
384
390
  }>;
391
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
385
392
  }>]>;
386
393
  }>, import("@sinclair/typebox").TObject<{
387
394
  type: import("@sinclair/typebox").TLiteral<"authorization">;
@@ -392,6 +399,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
392
399
  chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
393
400
  signatureRequest: import("@sinclair/typebox").TObject<{
394
401
  type: import("@sinclair/typebox").TLiteral<"eip7702Auth">;
402
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
395
403
  }>;
396
404
  }>]>>;
397
405
  }>, import("@sinclair/typebox").TObject<{
@@ -414,6 +422,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
414
422
  data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
415
423
  raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
416
424
  }>]>;
425
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
417
426
  }>, import("@sinclair/typebox").TObject<{
418
427
  type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
419
428
  data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
@@ -449,6 +458,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
449
458
  [x: string]: unknown;
450
459
  };
451
460
  }>;
461
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
452
462
  }>]>;
453
463
  }>, import("@sinclair/typebox").TObject<{
454
464
  type: import("@sinclair/typebox").TLiteral<"user-operation-v070">;
@@ -474,6 +484,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
474
484
  data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
475
485
  raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
476
486
  }>]>;
487
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
477
488
  }>, import("@sinclair/typebox").TObject<{
478
489
  type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
479
490
  data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
@@ -509,6 +520,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
509
520
  [x: string]: unknown;
510
521
  };
511
522
  }>;
523
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
512
524
  }>]>;
513
525
  }>]>;
514
526
  }>;
@@ -521,6 +533,26 @@ export declare const wallet_requestAccount: import("@sinclair/typebox").TObject<
521
533
  creationHint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
522
534
  accountType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"sma-b">>;
523
535
  salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
536
+ }>, import("@sinclair/typebox").TObject<{
537
+ accountType: import("@sinclair/typebox").TLiteral<"la-v2">;
538
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
539
+ }>, import("@sinclair/typebox").TObject<{
540
+ accountType: import("@sinclair/typebox").TLiteral<"la-v2-multi-owner">;
541
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
542
+ initialOwners: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>>;
543
+ }>, import("@sinclair/typebox").TObject<{
544
+ accountType: import("@sinclair/typebox").TLiteral<"la-v1.0.1">;
545
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
546
+ }>, import("@sinclair/typebox").TObject<{
547
+ accountType: import("@sinclair/typebox").TLiteral<"la-v1.0.2">;
548
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
549
+ }>, import("@sinclair/typebox").TObject<{
550
+ accountType: import("@sinclair/typebox").TLiteral<"la-v1.1.0">;
551
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
552
+ }>, import("@sinclair/typebox").TObject<{
553
+ accountType: import("@sinclair/typebox").TLiteral<"ma-v1-multi-owner">;
554
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
555
+ initialOwners: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>>;
524
556
  }>, import("@sinclair/typebox").TObject<{
525
557
  accountType: import("@sinclair/typebox").TLiteral<"7702">;
526
558
  }>]>>;
@@ -550,6 +582,26 @@ export declare const wallet_createAccount: import("@sinclair/typebox").TObject<{
550
582
  creationOptions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
551
583
  accountType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"sma-b">>;
552
584
  salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
585
+ }>, import("@sinclair/typebox").TObject<{
586
+ accountType: import("@sinclair/typebox").TLiteral<"la-v2">;
587
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
588
+ }>, import("@sinclair/typebox").TObject<{
589
+ accountType: import("@sinclair/typebox").TLiteral<"la-v2-multi-owner">;
590
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
591
+ initialOwners: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>>;
592
+ }>, import("@sinclair/typebox").TObject<{
593
+ accountType: import("@sinclair/typebox").TLiteral<"la-v1.0.1">;
594
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
595
+ }>, import("@sinclair/typebox").TObject<{
596
+ accountType: import("@sinclair/typebox").TLiteral<"la-v1.0.2">;
597
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
598
+ }>, import("@sinclair/typebox").TObject<{
599
+ accountType: import("@sinclair/typebox").TLiteral<"la-v1.1.0">;
600
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
601
+ }>, import("@sinclair/typebox").TObject<{
602
+ accountType: import("@sinclair/typebox").TLiteral<"ma-v1-multi-owner">;
603
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
604
+ initialOwners: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>>;
553
605
  }>, import("@sinclair/typebox").TObject<{
554
606
  accountType: import("@sinclair/typebox").TLiteral<"7702">;
555
607
  }>]>>;
@@ -637,6 +689,7 @@ export declare const wallet_createSession: import("@sinclair/typebox").TObject<{
637
689
  }>;
638
690
  ReturnType: import("@sinclair/typebox").TObject<{
639
691
  sessionId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
692
+ chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
640
693
  signatureRequest: import("@sinclair/typebox").TObject<{
641
694
  type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
642
695
  data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
@@ -672,6 +725,7 @@ export declare const wallet_createSession: import("@sinclair/typebox").TObject<{
672
725
  [x: string]: unknown;
673
726
  };
674
727
  }>;
728
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
675
729
  }>;
676
730
  }>;
677
731
  }>;
@@ -150,6 +150,7 @@ export const wallet_createSession = Type.Object({
150
150
  }),
151
151
  ReturnType: Type.Object({
152
152
  sessionId: TypeHex(),
153
+ chainId: TypeHex(),
153
154
  signatureRequest: TypeTypedDataSignatureRequest,
154
155
  }),
155
156
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/rpc/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,aAAa,EACb,iCAAiC,EACjC,iCAAiC,EACjC,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,EACvB,WAAW,EACX,0BAA0B,EAC1B,mBAAmB,EACnB,OAAO,EACP,sBAAsB,EACtB,6BAA6B,EAC7B,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,MAAM,CACjD;IACE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC;QACnB,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,0BAA0B,CAAC;QAChD,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;YACjB,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,CAAC,KAAK,CAAC;oBACT,aAAa;oBACb,iCAAiC;oBACjC,iCAAiC;iBAClC,CAAC;gBACF,IAAI,CAAC,MAAM,CAAC;oBACV,YAAY,EAAE,IAAI,CAAC,QAAQ,CACzB,IAAI,CAAC,MAAM,CAAC;wBACV,WAAW,EAAE,IAAI,CAAC,QAAQ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AAQ,CAAC,cAAc;CAClC,CACF,CAAC","sourcesContent":["import { Type } from \"@sinclair/typebox\";\nimport { Capabilities } from \"../capabilities/index.js\";\nimport {\n PermissionsContext,\n PermissionsData,\n RemotePermission,\n} from \"../capabilities/permissions/index.js\";\nimport {\n TypeCallArray,\n TypePrepareCall_UserOpV060_Signed,\n TypePrepareCall_UserOpV070_Signed,\n PreparedCall_Authorization,\n PreparedCall_UserOpV060,\n PreparedCall_UserOpV070,\n TypeAddress,\n TypeBase64UrlEncodedString,\n TypeCreationOptions,\n TypeHex,\n TypeSerializedInitcode,\n TypeTypedDataSignatureRequest,\n TypeUuid,\n} from \"../schemas.js\";\nimport { Examples } from \"./examples.js\";\n\nexport const wallet_sendPreparedCalls = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_sendPreparedCalls\"),\n params: Type.Tuple([\n Type.Intersect([\n Type.Union([\n TypeCallArray,\n TypePrepareCall_UserOpV060_Signed,\n TypePrepareCall_UserOpV070_Signed,\n ]),\n Type.Object({\n capabilities: Type.Optional(\n Type.Object({\n permissions: Type.Optional(\n Type.Union([PermissionsContext, RemotePermission]),\n ),\n }),\n ),\n }),\n ]),\n ]),\n }),\n ReturnType: Type.Object({\n preparedCallIds: Type.Array(TypeHex()),\n }),\n },\n {\n description:\n \"This method is used after signing the signatureRequest returned from prepareCalls to submit a user operation\",\n examples: Examples.SendPreparedCalls,\n },\n);\n\nexport const wallet_prepareCalls = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_prepareCalls\"),\n params: Type.Tuple([\n Type.Object({\n calls: Type.Array(\n Type.Object({\n to: TypeAddress,\n data: Type.Optional(TypeHex()),\n value: Type.Optional(TypeHex()),\n }),\n ),\n from: TypeAddress,\n chainId: TypeHex(),\n capabilities: Type.Optional(Capabilities),\n }),\n ]),\n }),\n ReturnType: Type.Union([\n Type.Object(\n {\n type: Type.Literal(\"array\"),\n data: Type.Array(\n Type.Union([\n PreparedCall_UserOpV060,\n PreparedCall_UserOpV070,\n PreparedCall_Authorization,\n ]),\n ),\n },\n { description: \"Array of prepared calls\" },\n ),\n PreparedCall_UserOpV060,\n PreparedCall_UserOpV070,\n ]),\n },\n {\n description:\n \"This method is used to prepare a user operation for submission. It will return a built user operation and a signature request which needs to be signed by the user before submitting to wallet_sendPreparedCalls\",\n examples: Examples.PrepareCalls,\n },\n);\n\nexport const wallet_requestAccount = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_requestAccount\"),\n params: Type.Tuple([\n Type.Union([\n Type.Object(\n {\n signerAddress: TypeAddress,\n id: Type.Optional(TypeUuid),\n creationHint: TypeCreationOptions,\n includeCounterfactualInfo: Type.Optional(\n Type.Boolean({ default: false }),\n ),\n },\n {\n description: \"Using signer address\",\n },\n ),\n Type.Object(\n {\n accountAddress: TypeAddress,\n includeCounterfactualInfo: Type.Optional(\n Type.Boolean({ default: false }),\n ),\n },\n {\n description: \"Using smart contract account address\",\n },\n ),\n ]),\n ]),\n }),\n ReturnType: Type.Object({\n accountAddress: TypeAddress,\n id: TypeUuid,\n counterfactualInfo: Type.Optional(TypeSerializedInitcode),\n delegation: Type.Optional(TypeAddress),\n }),\n },\n {\n description: `This method is used to get the smart account address and relevant info for a given signer. If an account does not already exist for a given signer, this method will create one before returning the counterfactual address.`,\n examples: Examples.RequestAccount,\n },\n);\n\nexport const wallet_createAccount = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_createAccount\"),\n params: Type.Tuple([\n Type.Object({\n signerAddress: TypeAddress,\n id: Type.Optional(TypeUuid),\n creationOptions: TypeCreationOptions,\n }),\n ]),\n }),\n ReturnType: Type.Object({\n accountAddress: TypeAddress,\n id: TypeUuid,\n }),\n },\n {\n description: `This method is used to create a smart account for a given signer. This method is primarly used to import existing accounts. For most cases, you should use wallet_requestAccount instead.`,\n examples: Examples.CreateAccount,\n },\n);\n\nexport const wallet_listAccounts = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_listAccounts\"),\n params: Type.Tuple([\n Type.Object({\n signerAddress: TypeAddress,\n limit: Type.Optional(\n Type.Number({ minimum: 1, maximum: 100, default: 100 }),\n ),\n after: Type.Optional(TypeBase64UrlEncodedString),\n }),\n ]),\n }),\n ReturnType: Type.Object({\n accounts: Type.Array(\n Type.Object({\n accountAddress: TypeAddress,\n id: TypeUuid,\n }),\n ),\n meta: Type.Object({\n totalCount: Type.Integer(),\n after: Type.Union([TypeBase64UrlEncodedString, Type.Null()]),\n }),\n }),\n },\n {\n description:\n \"This method is used to list all smart accounts for a given signer.\",\n examples: Examples.ListAccounts,\n },\n);\n\nexport const wallet_createSession = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_createSession\"),\n params: Type.Tuple([\n Type.Intersect([\n PermissionsData,\n Type.Object({\n account: TypeAddress,\n }),\n ]),\n ]),\n }),\n ReturnType: Type.Object({\n sessionId: TypeHex(),\n signatureRequest: TypeTypedDataSignatureRequest,\n }),\n },\n {\n description:\n \"This method is used to create a session for a given address with specified permissions.\",\n examples: Examples.CreateSession,\n },\n);\n\nexport const wallet_getCallsStatus = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_getCallsStatus\"),\n params: Type.Tuple([\n TypeHex({\n description: \"The call ID returned from wallet_sendPreparedCalls\",\n }),\n ]),\n }),\n ReturnType: Type.Object({\n id: TypeHex(),\n chainId: TypeHex(),\n atomic: Type.Boolean(),\n status: Type.Union([\n Type.Literal(100, {\n title: \"Pending\",\n description:\n \"Batch has been received by the wallet but has not completed execution onchain\",\n }),\n Type.Literal(200, {\n title: \"Confirmed\",\n description:\n \"Batch has been included onchain without reverts, receipts array contains info of all calls\",\n }),\n Type.Literal(400, {\n title: \"Offchain Failure\",\n description:\n \"Batch has not been included onchain and wallet will not retry\",\n }),\n Type.Literal(500, {\n title: \"Onchain Failure\",\n description:\n \"Batch reverted *completely* and only changes related to gas charge may have been included onchain\",\n }),\n Type.Literal(600, {\n title: \"Partial Onchain Failure\",\n description:\n \"Batch reverted *partially* and some changes related to batch calls may have been included onchain\",\n }),\n ]),\n receipts: Type.Optional(\n Type.Array(\n Type.Object({\n logs: Type.Array(\n Type.Object({\n address: TypeAddress,\n data: TypeHex(),\n topics: Type.Array(TypeHex()),\n }),\n ),\n status: TypeHex({\n description: \"0x1 for success, 0x0 for failure\",\n }),\n blockHash: TypeHex(),\n blockNumber: TypeHex(),\n gasUsed: TypeHex(),\n transactionHash: TypeHex(),\n }),\n ),\n ),\n }),\n },\n {\n description:\n \"This method is used to get the status of calls IDs returned from wallet_sendPreparedCalls.\",\n examples: Examples.GetCallsStatus,\n },\n);\n"]}
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/rpc/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,aAAa,EACb,iCAAiC,EACjC,iCAAiC,EACjC,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,EACvB,WAAW,EACX,0BAA0B,EAC1B,mBAAmB,EACnB,OAAO,EACP,sBAAsB,EACtB,6BAA6B,EAC7B,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,MAAM,CACjD;IACE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC;QACnB,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,0BAA0B,CAAC;QAChD,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC;YACjB,IAAI,CAAC,SAAS,CAAC;gBACb,IAAI,CAAC,KAAK,CAAC;oBACT,aAAa;oBACb,iCAAiC;oBACjC,iCAAiC;iBAClC,CAAC;gBACF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AO,EAAE;YACtB,OAAO,EAAE,OAAO,EAAE;YAClB,eAAe,EAAE,OAAO,EAAE;SAC3B,CAAC,CACH,CACF;KACF,CAAC;CACH,EACD;IACE,WAAW,EACT,4FAA4F;IAC9F,QAAQ,EAAE,QAAQ,CAAC,cAAc;CAClC,CACF,CAAC","sourcesContent":["import { Type } from \"@sinclair/typebox\";\nimport { Capabilities } from \"../capabilities/index.js\";\nimport {\n PermissionsContext,\n PermissionsData,\n RemotePermission,\n} from \"../capabilities/permissions/index.js\";\nimport {\n TypeCallArray,\n TypePrepareCall_UserOpV060_Signed,\n TypePrepareCall_UserOpV070_Signed,\n PreparedCall_Authorization,\n PreparedCall_UserOpV060,\n PreparedCall_UserOpV070,\n TypeAddress,\n TypeBase64UrlEncodedString,\n TypeCreationOptions,\n TypeHex,\n TypeSerializedInitcode,\n TypeTypedDataSignatureRequest,\n TypeUuid,\n} from \"../schemas.js\";\nimport { Examples } from \"./examples.js\";\n\nexport const wallet_sendPreparedCalls = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_sendPreparedCalls\"),\n params: Type.Tuple([\n Type.Intersect([\n Type.Union([\n TypeCallArray,\n TypePrepareCall_UserOpV060_Signed,\n TypePrepareCall_UserOpV070_Signed,\n ]),\n Type.Object({\n capabilities: Type.Optional(\n Type.Object({\n permissions: Type.Optional(\n Type.Union([PermissionsContext, RemotePermission]),\n ),\n }),\n ),\n }),\n ]),\n ]),\n }),\n ReturnType: Type.Object({\n preparedCallIds: Type.Array(TypeHex()),\n }),\n },\n {\n description:\n \"This method is used after signing the signatureRequest returned from prepareCalls to submit a user operation\",\n examples: Examples.SendPreparedCalls,\n },\n);\n\nexport const wallet_prepareCalls = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_prepareCalls\"),\n params: Type.Tuple([\n Type.Object({\n calls: Type.Array(\n Type.Object({\n to: TypeAddress,\n data: Type.Optional(TypeHex()),\n value: Type.Optional(TypeHex()),\n }),\n ),\n from: TypeAddress,\n chainId: TypeHex(),\n capabilities: Type.Optional(Capabilities),\n }),\n ]),\n }),\n ReturnType: Type.Union([\n Type.Object(\n {\n type: Type.Literal(\"array\"),\n data: Type.Array(\n Type.Union([\n PreparedCall_UserOpV060,\n PreparedCall_UserOpV070,\n PreparedCall_Authorization,\n ]),\n ),\n },\n { description: \"Array of prepared calls\" },\n ),\n PreparedCall_UserOpV060,\n PreparedCall_UserOpV070,\n ]),\n },\n {\n description:\n \"This method is used to prepare a user operation for submission. It will return a built user operation and a signature request which needs to be signed by the user before submitting to wallet_sendPreparedCalls\",\n examples: Examples.PrepareCalls,\n },\n);\n\nexport const wallet_requestAccount = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_requestAccount\"),\n params: Type.Tuple([\n Type.Union([\n Type.Object(\n {\n signerAddress: TypeAddress,\n id: Type.Optional(TypeUuid),\n creationHint: TypeCreationOptions,\n includeCounterfactualInfo: Type.Optional(\n Type.Boolean({ default: false }),\n ),\n },\n {\n description: \"Using signer address\",\n },\n ),\n Type.Object(\n {\n accountAddress: TypeAddress,\n includeCounterfactualInfo: Type.Optional(\n Type.Boolean({ default: false }),\n ),\n },\n {\n description: \"Using smart contract account address\",\n },\n ),\n ]),\n ]),\n }),\n ReturnType: Type.Object({\n accountAddress: TypeAddress,\n id: TypeUuid,\n counterfactualInfo: Type.Optional(TypeSerializedInitcode),\n delegation: Type.Optional(TypeAddress),\n }),\n },\n {\n description: `This method is used to get the smart account address and relevant info for a given signer. If an account does not already exist for a given signer, this method will create one before returning the counterfactual address.`,\n examples: Examples.RequestAccount,\n },\n);\n\nexport const wallet_createAccount = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_createAccount\"),\n params: Type.Tuple([\n Type.Object({\n signerAddress: TypeAddress,\n id: Type.Optional(TypeUuid),\n creationOptions: TypeCreationOptions,\n }),\n ]),\n }),\n ReturnType: Type.Object({\n accountAddress: TypeAddress,\n id: TypeUuid,\n }),\n },\n {\n description: `This method is used to create a smart account for a given signer. This method is primarly used to import existing accounts. For most cases, you should use wallet_requestAccount instead.`,\n examples: Examples.CreateAccount,\n },\n);\n\nexport const wallet_listAccounts = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_listAccounts\"),\n params: Type.Tuple([\n Type.Object({\n signerAddress: TypeAddress,\n limit: Type.Optional(\n Type.Number({ minimum: 1, maximum: 100, default: 100 }),\n ),\n after: Type.Optional(TypeBase64UrlEncodedString),\n }),\n ]),\n }),\n ReturnType: Type.Object({\n accounts: Type.Array(\n Type.Object({\n accountAddress: TypeAddress,\n id: TypeUuid,\n }),\n ),\n meta: Type.Object({\n totalCount: Type.Integer(),\n after: Type.Union([TypeBase64UrlEncodedString, Type.Null()]),\n }),\n }),\n },\n {\n description:\n \"This method is used to list all smart accounts for a given signer.\",\n examples: Examples.ListAccounts,\n },\n);\n\nexport const wallet_createSession = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_createSession\"),\n params: Type.Tuple([\n Type.Intersect([\n PermissionsData,\n Type.Object({\n account: TypeAddress,\n }),\n ]),\n ]),\n }),\n ReturnType: Type.Object({\n sessionId: TypeHex(),\n chainId: TypeHex(),\n signatureRequest: TypeTypedDataSignatureRequest,\n }),\n },\n {\n description:\n \"This method is used to create a session for a given address with specified permissions.\",\n examples: Examples.CreateSession,\n },\n);\n\nexport const wallet_getCallsStatus = Type.Object(\n {\n Request: Type.Object({\n method: Type.Literal(\"wallet_getCallsStatus\"),\n params: Type.Tuple([\n TypeHex({\n description: \"The call ID returned from wallet_sendPreparedCalls\",\n }),\n ]),\n }),\n ReturnType: Type.Object({\n id: TypeHex(),\n chainId: TypeHex(),\n atomic: Type.Boolean(),\n status: Type.Union([\n Type.Literal(100, {\n title: \"Pending\",\n description:\n \"Batch has been received by the wallet but has not completed execution onchain\",\n }),\n Type.Literal(200, {\n title: \"Confirmed\",\n description:\n \"Batch has been included onchain without reverts, receipts array contains info of all calls\",\n }),\n Type.Literal(400, {\n title: \"Offchain Failure\",\n description:\n \"Batch has not been included onchain and wallet will not retry\",\n }),\n Type.Literal(500, {\n title: \"Onchain Failure\",\n description:\n \"Batch reverted *completely* and only changes related to gas charge may have been included onchain\",\n }),\n Type.Literal(600, {\n title: \"Partial Onchain Failure\",\n description:\n \"Batch reverted *partially* and some changes related to batch calls may have been included onchain\",\n }),\n ]),\n receipts: Type.Optional(\n Type.Array(\n Type.Object({\n logs: Type.Array(\n Type.Object({\n address: TypeAddress,\n data: TypeHex(),\n topics: Type.Array(TypeHex()),\n }),\n ),\n status: TypeHex({\n description: \"0x1 for success, 0x0 for failure\",\n }),\n blockHash: TypeHex(),\n blockNumber: TypeHex(),\n gasUsed: TypeHex(),\n transactionHash: TypeHex(),\n }),\n ),\n ),\n }),\n },\n {\n description:\n \"This method is used to get the status of calls IDs returned from wallet_sendPreparedCalls.\",\n examples: Examples.GetCallsStatus,\n },\n);\n"]}
@@ -38,6 +38,9 @@ export declare const WalletServerRpcSchema: {
38
38
  multiplier: number;
39
39
  } | undefined;
40
40
  } | undefined;
41
+ nonceOverride?: {
42
+ nonceKey: `0x${string}`;
43
+ } | undefined;
41
44
  } | undefined;
42
45
  chainId: `0x${string}`;
43
46
  calls: {
@@ -87,11 +90,13 @@ export declare const WalletServerRpcSchema: {
87
90
  [x: string]: unknown;
88
91
  };
89
92
  };
93
+ rawPayload: `0x${string}`;
90
94
  } | {
91
95
  type: "personal_sign";
92
96
  data: string | {
93
97
  raw: `0x${string}`;
94
98
  };
99
+ rawPayload: `0x${string}`;
95
100
  };
96
101
  } | {
97
102
  type: "user-operation-v070";
@@ -133,11 +138,13 @@ export declare const WalletServerRpcSchema: {
133
138
  [x: string]: unknown;
134
139
  };
135
140
  };
141
+ rawPayload: `0x${string}`;
136
142
  } | {
137
143
  type: "personal_sign";
138
144
  data: string | {
139
145
  raw: `0x${string}`;
140
146
  };
147
+ rawPayload: `0x${string}`;
141
148
  };
142
149
  } | {
143
150
  type: "authorization";
@@ -148,6 +155,7 @@ export declare const WalletServerRpcSchema: {
148
155
  };
149
156
  signatureRequest: {
150
157
  type: "eip7702Auth";
158
+ rawPayload: `0x${string}`;
151
159
  };
152
160
  })[];
153
161
  } | {
@@ -186,11 +194,13 @@ export declare const WalletServerRpcSchema: {
186
194
  [x: string]: unknown;
187
195
  };
188
196
  };
197
+ rawPayload: `0x${string}`;
189
198
  } | {
190
199
  type: "personal_sign";
191
200
  data: string | {
192
201
  raw: `0x${string}`;
193
202
  };
203
+ rawPayload: `0x${string}`;
194
204
  };
195
205
  } | {
196
206
  type: "user-operation-v070";
@@ -232,11 +242,13 @@ export declare const WalletServerRpcSchema: {
232
242
  [x: string]: unknown;
233
243
  };
234
244
  };
245
+ rawPayload: `0x${string}`;
235
246
  } | {
236
247
  type: "personal_sign";
237
248
  data: string | {
238
249
  raw: `0x${string}`;
239
250
  };
251
+ rawPayload: `0x${string}`;
240
252
  };
241
253
  };
242
254
  } | {
@@ -461,6 +473,26 @@ export declare const WalletServerRpcSchema: {
461
473
  creationOptions?: {
462
474
  salt?: `0x${string}` | undefined;
463
475
  accountType?: "sma-b" | undefined;
476
+ } | {
477
+ salt?: `0x${string}` | undefined;
478
+ accountType: "la-v2";
479
+ } | {
480
+ salt?: `0x${string}` | undefined;
481
+ initialOwners?: `0x${string}`[] | undefined;
482
+ accountType: "la-v2-multi-owner";
483
+ } | {
484
+ salt?: `0x${string}` | undefined;
485
+ accountType: "la-v1.0.1";
486
+ } | {
487
+ salt?: `0x${string}` | undefined;
488
+ accountType: "la-v1.0.2";
489
+ } | {
490
+ salt?: `0x${string}` | undefined;
491
+ accountType: "la-v1.1.0";
492
+ } | {
493
+ salt?: `0x${string}` | undefined;
494
+ initialOwners?: `0x${string}`[] | undefined;
495
+ accountType: "ma-v1-multi-owner";
464
496
  } | {
465
497
  accountType: "7702";
466
498
  } | undefined;
@@ -479,6 +511,26 @@ export declare const WalletServerRpcSchema: {
479
511
  creationHint?: {
480
512
  salt?: `0x${string}` | undefined;
481
513
  accountType?: "sma-b" | undefined;
514
+ } | {
515
+ salt?: `0x${string}` | undefined;
516
+ accountType: "la-v2";
517
+ } | {
518
+ salt?: `0x${string}` | undefined;
519
+ initialOwners?: `0x${string}`[] | undefined;
520
+ accountType: "la-v2-multi-owner";
521
+ } | {
522
+ salt?: `0x${string}` | undefined;
523
+ accountType: "la-v1.0.1";
524
+ } | {
525
+ salt?: `0x${string}` | undefined;
526
+ accountType: "la-v1.0.2";
527
+ } | {
528
+ salt?: `0x${string}` | undefined;
529
+ accountType: "la-v1.1.0";
530
+ } | {
531
+ salt?: `0x${string}` | undefined;
532
+ initialOwners?: `0x${string}`[] | undefined;
533
+ accountType: "ma-v1-multi-owner";
482
534
  } | {
483
535
  accountType: "7702";
484
536
  } | undefined;
@@ -575,6 +627,7 @@ export declare const WalletServerRpcSchema: {
575
627
  method: "wallet_createSession";
576
628
  };
577
629
  ReturnType: {
630
+ chainId: `0x${string}`;
578
631
  signatureRequest: {
579
632
  type: "eth_signTypedData_v4";
580
633
  data: {
@@ -596,6 +649,7 @@ export declare const WalletServerRpcSchema: {
596
649
  [x: string]: unknown;
597
650
  };
598
651
  };
652
+ rawPayload: `0x${string}`;
599
653
  };
600
654
  sessionId: `0x${string}`;
601
655
  };
@@ -1,4 +1,8 @@
1
1
  import { type SchemaOptions, type Static } from "@sinclair/typebox";
2
+ export declare const baseAccountTypes: readonly ["sma-b", "la-v2", "la-v2-multi-owner", "la-v1.0.1", "la-v1.0.2", "la-v1.1.0", "ma-v1-multi-owner"];
3
+ export type BaseAccountType = (typeof baseAccountTypes)[number];
4
+ export declare const accountTypes: readonly ["sma-b", "la-v2", "la-v2-multi-owner", "la-v1.0.1", "la-v1.0.2", "la-v1.1.0", "ma-v1-multi-owner", "7702"];
5
+ export type AccountType = (typeof accountTypes)[number];
2
6
  export declare const TypeHex: (options?: SchemaOptions) => import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
3
7
  export declare const TypeAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
4
8
  export declare const TypeUuid: import("@sinclair/typebox").TString;
@@ -143,11 +147,30 @@ export type TypeCounterfactualInfo = Static<typeof TypeCounterfactualInfo>;
143
147
  export declare const TypeCreationOptions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
144
148
  accountType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"sma-b">>;
145
149
  salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
150
+ }>, import("@sinclair/typebox").TObject<{
151
+ accountType: import("@sinclair/typebox").TLiteral<"la-v2">;
152
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
153
+ }>, import("@sinclair/typebox").TObject<{
154
+ accountType: import("@sinclair/typebox").TLiteral<"la-v2-multi-owner">;
155
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
156
+ initialOwners: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>>;
157
+ }>, import("@sinclair/typebox").TObject<{
158
+ accountType: import("@sinclair/typebox").TLiteral<"la-v1.0.1">;
159
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
160
+ }>, import("@sinclair/typebox").TObject<{
161
+ accountType: import("@sinclair/typebox").TLiteral<"la-v1.0.2">;
162
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
163
+ }>, import("@sinclair/typebox").TObject<{
164
+ accountType: import("@sinclair/typebox").TLiteral<"la-v1.1.0">;
165
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
166
+ }>, import("@sinclair/typebox").TObject<{
167
+ accountType: import("@sinclair/typebox").TLiteral<"ma-v1-multi-owner">;
168
+ salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
169
+ initialOwners: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>>;
146
170
  }>, import("@sinclair/typebox").TObject<{
147
171
  accountType: import("@sinclair/typebox").TLiteral<"7702">;
148
172
  }>]>>;
149
173
  export type TypeCreationOptions = Static<typeof TypeCreationOptions>;
150
- export type TypeAccountType = Exclude<Static<typeof TypeCreationOptions>, undefined>["accountType"];
151
174
  export declare const TypeSignatureType: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"secp256k1">, import("@sinclair/typebox").TLiteral<"ecdsa">, import("@sinclair/typebox").TLiteral<"contract">]>;
152
175
  export type TypeSignatureType = Static<typeof TypeSignatureType>;
153
176
  export declare const KeySigner: import("@sinclair/typebox").TObject<{
@@ -193,6 +216,7 @@ export declare const TypePersonalSignSignatureRequest: import("@sinclair/typebox
193
216
  data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
194
217
  raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
195
218
  }>]>;
219
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
196
220
  }>;
197
221
  export declare const TypeTypedDataSignatureRequest: import("@sinclair/typebox").TObject<{
198
222
  type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
@@ -229,15 +253,18 @@ export declare const TypeTypedDataSignatureRequest: import("@sinclair/typebox").
229
253
  [x: string]: unknown;
230
254
  };
231
255
  }>;
256
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
232
257
  }>;
233
258
  export declare const TypeAuthorizationSignatureRequest: import("@sinclair/typebox").TObject<{
234
259
  type: import("@sinclair/typebox").TLiteral<"eip7702Auth">;
260
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
235
261
  }>;
236
262
  export declare const TypeSignatureRequest: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
237
263
  type: import("@sinclair/typebox").TLiteral<"personal_sign">;
238
264
  data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
239
265
  raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
240
266
  }>]>;
267
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
241
268
  }>, import("@sinclair/typebox").TObject<{
242
269
  type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
243
270
  data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
@@ -273,8 +300,10 @@ export declare const TypeSignatureRequest: import("@sinclair/typebox").TUnion<[i
273
300
  [x: string]: unknown;
274
301
  };
275
302
  }>;
303
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
276
304
  }>, import("@sinclair/typebox").TObject<{
277
305
  type: import("@sinclair/typebox").TLiteral<"eip7702Auth">;
306
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
278
307
  }>]>;
279
308
  export declare const TypeCallId: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, {
280
309
  chainId: `0x${string}`;
@@ -300,6 +329,7 @@ export declare const PreparedCall_UserOpV060: import("@sinclair/typebox").TObjec
300
329
  data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
301
330
  raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
302
331
  }>]>;
332
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
303
333
  }>, import("@sinclair/typebox").TObject<{
304
334
  type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
305
335
  data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
@@ -335,6 +365,7 @@ export declare const PreparedCall_UserOpV060: import("@sinclair/typebox").TObjec
335
365
  [x: string]: unknown;
336
366
  };
337
367
  }>;
368
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
338
369
  }>]>;
339
370
  }>;
340
371
  export declare const PreparedCall_UserOpV070: import("@sinclair/typebox").TObject<{
@@ -361,6 +392,7 @@ export declare const PreparedCall_UserOpV070: import("@sinclair/typebox").TObjec
361
392
  data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
362
393
  raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
363
394
  }>]>;
395
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
364
396
  }>, import("@sinclair/typebox").TObject<{
365
397
  type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
366
398
  data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
@@ -396,6 +428,7 @@ export declare const PreparedCall_UserOpV070: import("@sinclair/typebox").TObjec
396
428
  [x: string]: unknown;
397
429
  };
398
430
  }>;
431
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
399
432
  }>]>;
400
433
  }>;
401
434
  export declare const PreparedCall_Authorization: import("@sinclair/typebox").TObject<{
@@ -407,6 +440,7 @@ export declare const PreparedCall_Authorization: import("@sinclair/typebox").TOb
407
440
  chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
408
441
  signatureRequest: import("@sinclair/typebox").TObject<{
409
442
  type: import("@sinclair/typebox").TLiteral<"eip7702Auth">;
443
+ rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
410
444
  }>;
411
445
  }>;
412
446
  export declare const TypeEdcsaSigData: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
@@ -5,6 +5,16 @@ const UUID_V4_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[
5
5
  FormatRegistry.Set("uuid", (value) => UUID_V4_REGEX.test(value));
6
6
  const BASE_64_URL_REGEX = /^[A-Za-z0-9_-]+$/; // Matches base64url encoded strings (without padding)
7
7
  FormatRegistry.Set("base64url", (value) => BASE_64_URL_REGEX.test(value));
8
+ export const baseAccountTypes = [
9
+ "sma-b",
10
+ "la-v2",
11
+ "la-v2-multi-owner",
12
+ "la-v1.0.1",
13
+ "la-v1.0.2",
14
+ "la-v1.1.0",
15
+ "ma-v1-multi-owner",
16
+ ];
17
+ export const accountTypes = [...baseAccountTypes, "7702"];
8
18
  export const TypeHex = (options) => Type.TemplateLiteral("0x${string}", {
9
19
  ...options,
10
20
  });
@@ -210,7 +220,49 @@ export const TypeCreationOptions = Type.Optional(Type.Union([
210
220
  accountType: Type.Optional(Type.Literal("sma-b")),
211
221
  salt: Type.Optional(TypeHex()),
212
222
  }, {
213
- description: "SMA-B account type",
223
+ description: "Modular Account V2 SMA-B account type",
224
+ }),
225
+ Type.Object({
226
+ accountType: Type.Literal("la-v2"),
227
+ salt: Type.Optional(TypeHex()),
228
+ }, {
229
+ description: "Light Account V2 account type",
230
+ }),
231
+ Type.Object({
232
+ accountType: Type.Literal("la-v2-multi-owner"),
233
+ salt: Type.Optional(TypeHex()),
234
+ initialOwners: Type.Optional(Type.Array(TypeAddress, {
235
+ description: "The initial owners of the account. The signer address will be implicitly added if not specified in this list.",
236
+ })),
237
+ }, {
238
+ description: "Light Account V2 Multi-Owner account type",
239
+ }),
240
+ Type.Object({
241
+ accountType: Type.Literal("la-v1.0.1"),
242
+ salt: Type.Optional(TypeHex()),
243
+ }, {
244
+ description: "Light Account V1.0.1 account type",
245
+ }),
246
+ Type.Object({
247
+ accountType: Type.Literal("la-v1.0.2"),
248
+ salt: Type.Optional(TypeHex()),
249
+ }, {
250
+ description: "Light Account V1.0.2 account type",
251
+ }),
252
+ Type.Object({
253
+ accountType: Type.Literal("la-v1.1.0"),
254
+ salt: Type.Optional(TypeHex()),
255
+ }, {
256
+ description: "Light Account V1.1.0 account type",
257
+ }),
258
+ Type.Object({
259
+ accountType: Type.Literal("ma-v1-multi-owner"),
260
+ salt: Type.Optional(TypeHex()),
261
+ initialOwners: Type.Optional(Type.Array(TypeAddress, {
262
+ description: "The initial owners of the account. The signer address will be implicitly added if not specified in this list.",
263
+ })),
264
+ }, {
265
+ description: "Modular Account V1 Multi-Owner account type",
214
266
  }),
215
267
  Type.Object({
216
268
  accountType: Type.Literal("7702"),
@@ -271,15 +323,18 @@ export const TypePersonalSignSignatureRequest = Type.Object({
271
323
  raw: TypeHex(),
272
324
  }, { description: "Raw message" }),
273
325
  ]),
326
+ rawPayload: TypeHex(),
274
327
  }, { description: "Personal sign" });
275
328
  export const TypeTypedDataSignatureRequest = Type.Object({
276
329
  type: Type.Literal("eth_signTypedData_v4"),
277
330
  data: TTypedDataDefinition,
331
+ rawPayload: TypeHex(),
278
332
  }, {
279
333
  description: "Typed data",
280
334
  });
281
335
  export const TypeAuthorizationSignatureRequest = Type.Object({
282
336
  type: Type.Literal("eip7702Auth"),
337
+ rawPayload: TypeHex(),
283
338
  });
284
339
  export const TypeSignatureRequest = Type.Union([
285
340
  TypePersonalSignSignatureRequest,