@account-kit/wallet-client 0.1.0-alpha.2 → 0.1.0-alpha.4

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 (119) hide show
  1. package/dist/esm/capabilities/index.d.ts +5 -2
  2. package/dist/esm/capabilities/index.js +1 -1
  3. package/dist/esm/capabilities/index.js.map +1 -1
  4. package/dist/esm/capabilities/overrides.js +8 -8
  5. package/dist/esm/capabilities/overrides.js.map +1 -1
  6. package/dist/esm/capabilities/permissions/index.d.ts +10 -3
  7. package/dist/esm/capabilities/permissions/index.js +11 -2
  8. package/dist/esm/capabilities/permissions/index.js.map +1 -1
  9. package/dist/esm/capabilities/permissions/mav2.d.ts +2 -2
  10. package/dist/esm/capabilities/permissions/mav2.js +9 -1
  11. package/dist/esm/capabilities/permissions/mav2.js.map +1 -1
  12. package/dist/esm/client/actions/grantPermissions.d.ts +57 -3
  13. package/dist/esm/client/actions/grantPermissions.js +1 -0
  14. package/dist/esm/client/actions/grantPermissions.js.map +1 -1
  15. package/dist/esm/client/actions/requestAccount.js +2 -2
  16. package/dist/esm/client/actions/requestAccount.js.map +1 -1
  17. package/dist/esm/client/actions/signSignatureRequest.d.ts +4 -1
  18. package/dist/esm/client/actions/signSignatureRequest.js +22 -1
  19. package/dist/esm/client/actions/signSignatureRequest.js.map +1 -1
  20. package/dist/esm/client/client.e2e-test.js +13 -19
  21. package/dist/esm/client/client.e2e-test.js.map +1 -1
  22. package/dist/esm/client/index.d.ts +4 -3
  23. package/dist/esm/client/index.js +2 -2
  24. package/dist/esm/client/index.js.map +1 -1
  25. package/dist/esm/exports/index.d.ts +2 -2
  26. package/dist/esm/exports/index.js +1 -1
  27. package/dist/esm/exports/index.js.map +1 -1
  28. package/dist/esm/isomorphic/actions/createSession.js +25 -7
  29. package/dist/esm/isomorphic/actions/createSession.js.map +1 -1
  30. package/dist/esm/isomorphic/actions/prepareCalls.js +35 -12
  31. package/dist/esm/isomorphic/actions/prepareCalls.js.map +1 -1
  32. package/dist/esm/isomorphic/actions/sendPreparedCalls.js +26 -6
  33. package/dist/esm/isomorphic/actions/sendPreparedCalls.js.map +1 -1
  34. package/dist/esm/isomorphic/client.d.ts +11 -5
  35. package/dist/esm/isomorphic/utils/7702.d.ts +11 -0
  36. package/dist/esm/isomorphic/utils/7702.js +26 -0
  37. package/dist/esm/isomorphic/utils/7702.js.map +1 -0
  38. package/dist/esm/isomorphic/utils/createAccount.d.ts +2 -1
  39. package/dist/esm/isomorphic/utils/createAccount.js +30 -5
  40. package/dist/esm/isomorphic/utils/createAccount.js.map +1 -1
  41. package/dist/esm/isomorphic/utils/createDummySigner.js +3 -3
  42. package/dist/esm/isomorphic/utils/createDummySigner.js.map +1 -1
  43. package/dist/esm/isomorphic/utils/parsePermissionsContext.d.ts +2 -1
  44. package/dist/esm/isomorphic/utils/parsePermissionsContext.js +17 -5
  45. package/dist/esm/isomorphic/utils/parsePermissionsContext.js.map +1 -1
  46. package/dist/esm/local/client.js +2 -1
  47. package/dist/esm/local/client.js.map +1 -1
  48. package/dist/esm/remote/client.js +6 -2
  49. package/dist/esm/remote/client.js.map +1 -1
  50. package/dist/esm/rpc/examples.d.ts +230 -0
  51. package/dist/esm/rpc/examples.js +314 -0
  52. package/dist/esm/rpc/examples.js.map +1 -0
  53. package/dist/esm/rpc/request.d.ts +48 -17
  54. package/dist/esm/rpc/request.js +53 -14
  55. package/dist/esm/rpc/request.js.map +1 -1
  56. package/dist/esm/rpc/schema.d.ts +42 -11
  57. package/dist/esm/schemas.d.ts +29 -7
  58. package/dist/esm/schemas.js +120 -38
  59. package/dist/esm/schemas.js.map +1 -1
  60. package/dist/types/capabilities/index.d.ts +5 -2
  61. package/dist/types/capabilities/index.d.ts.map +1 -1
  62. package/dist/types/capabilities/overrides.d.ts.map +1 -1
  63. package/dist/types/capabilities/permissions/index.d.ts +10 -3
  64. package/dist/types/capabilities/permissions/index.d.ts.map +1 -1
  65. package/dist/types/capabilities/permissions/mav2.d.ts +2 -2
  66. package/dist/types/capabilities/permissions/mav2.d.ts.map +1 -1
  67. package/dist/types/client/actions/grantPermissions.d.ts +57 -3
  68. package/dist/types/client/actions/grantPermissions.d.ts.map +1 -1
  69. package/dist/types/client/actions/requestAccount.d.ts.map +1 -1
  70. package/dist/types/client/actions/signSignatureRequest.d.ts +4 -1
  71. package/dist/types/client/actions/signSignatureRequest.d.ts.map +1 -1
  72. package/dist/types/client/index.d.ts +4 -3
  73. package/dist/types/client/index.d.ts.map +1 -1
  74. package/dist/types/exports/index.d.ts +2 -2
  75. package/dist/types/exports/index.d.ts.map +1 -1
  76. package/dist/types/isomorphic/actions/createSession.d.ts.map +1 -1
  77. package/dist/types/isomorphic/actions/prepareCalls.d.ts.map +1 -1
  78. package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts.map +1 -1
  79. package/dist/types/isomorphic/client.d.ts +11 -5
  80. package/dist/types/isomorphic/client.d.ts.map +1 -1
  81. package/dist/types/isomorphic/utils/7702.d.ts +12 -0
  82. package/dist/types/isomorphic/utils/7702.d.ts.map +1 -0
  83. package/dist/types/isomorphic/utils/createAccount.d.ts +2 -1
  84. package/dist/types/isomorphic/utils/createAccount.d.ts.map +1 -1
  85. package/dist/types/isomorphic/utils/createDummySigner.d.ts.map +1 -1
  86. package/dist/types/isomorphic/utils/parsePermissionsContext.d.ts +2 -1
  87. package/dist/types/isomorphic/utils/parsePermissionsContext.d.ts.map +1 -1
  88. package/dist/types/remote/client.d.ts.map +1 -1
  89. package/dist/types/rpc/examples.d.ts +231 -0
  90. package/dist/types/rpc/examples.d.ts.map +1 -0
  91. package/dist/types/rpc/request.d.ts +48 -17
  92. package/dist/types/rpc/request.d.ts.map +1 -1
  93. package/dist/types/rpc/schema.d.ts +42 -11
  94. package/dist/types/rpc/schema.d.ts.map +1 -1
  95. package/dist/types/schemas.d.ts +29 -7
  96. package/dist/types/schemas.d.ts.map +1 -1
  97. package/package.json +2 -2
  98. package/src/capabilities/index.ts +5 -8
  99. package/src/capabilities/overrides.ts +23 -8
  100. package/src/capabilities/permissions/index.ts +21 -5
  101. package/src/capabilities/permissions/mav2.ts +12 -2
  102. package/src/client/actions/grantPermissions.ts +57 -3
  103. package/src/client/actions/requestAccount.ts +2 -3
  104. package/src/client/actions/signSignatureRequest.ts +31 -3
  105. package/src/client/client.e2e-test.ts +14 -21
  106. package/src/client/index.ts +12 -10
  107. package/src/exports/index.ts +2 -1
  108. package/src/isomorphic/actions/createSession.ts +28 -7
  109. package/src/isomorphic/actions/prepareCalls.ts +38 -11
  110. package/src/isomorphic/actions/sendPreparedCalls.ts +47 -20
  111. package/src/isomorphic/utils/7702.ts +58 -0
  112. package/src/isomorphic/utils/createAccount.ts +38 -6
  113. package/src/isomorphic/utils/createDummySigner.ts +3 -2
  114. package/src/isomorphic/utils/parsePermissionsContext.ts +23 -7
  115. package/src/local/client.ts +2 -3
  116. package/src/remote/client.ts +12 -2
  117. package/src/rpc/examples.ts +343 -0
  118. package/src/rpc/request.ts +75 -26
  119. package/src/schemas.ts +218 -87
@@ -4,30 +4,48 @@ const UUID_V4_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[
4
4
  FormatRegistry.Set("uuid", (value) => UUID_V4_REGEX.test(value));
5
5
  const BASE_64_URL_REGEX = /^[A-Za-z0-9_-]+$/; // Matches base64url encoded strings (without padding)
6
6
  FormatRegistry.Set("base64url", (value) => BASE_64_URL_REGEX.test(value));
7
- export const TypeHex = (options) => Type.TemplateLiteral("0x${string}", options);
8
- export const TypeAddress = Type.TemplateLiteral("0x${string}");
9
- export const TypeUuid = Type.String({ format: "uuid" });
7
+ export const TypeHex = (options) => Type.TemplateLiteral("0x${string}", {
8
+ ...options,
9
+ });
10
+ export const TypeAddress = Type.TemplateLiteral("0x${string}", {});
11
+ export const TypeUuid = Type.String({
12
+ format: "uuid",
13
+ });
10
14
  export const TypeBase64UrlEncodedString = Type.String({
11
15
  format: "base64url",
12
16
  });
13
17
  // BigInt is not json-serializable, so it must be encoded as a string.
14
- export const TypeU256 = Type.Transform(Type.String())
18
+ export const TypeU256 = Type.Transform(Type.String({}))
15
19
  .Decode((value) => BigInt(value))
16
20
  .Encode((value) => toHex(value));
17
- export const TypeU32 = Type.Transform(Type.String())
21
+ export const TypeU32 = Type.Transform(Type.String({}))
18
22
  .Decode((value) => Number.parseInt(value, 16))
19
23
  .Encode((value) => toHex(value));
20
24
  export const TypeUserOperationRequest_v6 = Type.Object({
21
25
  sender: TypeAddress,
22
26
  nonce: TypeHex(),
23
- initCode: Type.Union([TypeHex(), Type.Literal("0x")]),
27
+ initCode: Type.Union([
28
+ TypeHex({
29
+ title: "Present",
30
+ }),
31
+ Type.Literal("0x", {
32
+ title: "Absent",
33
+ }),
34
+ ]),
24
35
  callData: TypeHex(),
25
36
  callGasLimit: TypeHex(),
26
37
  verificationGasLimit: TypeHex(),
27
38
  preVerificationGas: TypeHex(),
28
39
  maxFeePerGas: TypeHex(),
29
40
  maxPriorityFeePerGas: TypeHex(),
30
- paymasterAndData: Type.Union([TypeHex(), Type.Literal("0x")]),
41
+ paymasterAndData: Type.Union([
42
+ TypeHex({
43
+ title: "Present",
44
+ }),
45
+ Type.Literal("0x", {
46
+ title: "Absent",
47
+ }),
48
+ ]),
31
49
  signature: TypeHex(),
32
50
  });
33
51
  export const TypeUserOperationRequest_v7 = Type.Object({
@@ -47,6 +65,19 @@ export const TypeUserOperationRequest_v7 = Type.Object({
47
65
  paymasterPostOpGasLimit: Type.Optional(TypeHex()),
48
66
  signature: TypeHex(),
49
67
  });
68
+ export const TypeEip7702AuthRequest = Type.Object({
69
+ chainId: Type.Integer(),
70
+ address: TypeAddress,
71
+ nonce: Type.Integer(),
72
+ });
73
+ export const TypeEip7702AuthExtendedFields = Type.Object({
74
+ chainId: TypeHex(),
75
+ nonce: TypeHex(),
76
+ address: TypeAddress,
77
+ r: TypeHex(),
78
+ s: TypeHex(),
79
+ yParity: TypeHex(),
80
+ });
50
81
  export const TypeWebAuthnPublicKey = Type.Object({
51
82
  x: TypeU256,
52
83
  y: TypeU256,
@@ -55,8 +86,10 @@ export const TypePersistedInitcode = Type.Object({
55
86
  factoryAddress: TypeAddress,
56
87
  initcode: Type.Union([
57
88
  Type.Object({
58
- factoryType: Type.Literal("unknown"),
59
- factoryData: TypeHex(),
89
+ factoryType: Type.Literal("unknown", { title: "Unknown factory type" }),
90
+ factoryData: TypeHex({}),
91
+ }, {
92
+ title: "Unknown factory type",
60
93
  }),
61
94
  Type.Object({
62
95
  factoryType: Type.Union([
@@ -67,6 +100,8 @@ export const TypePersistedInitcode = Type.Object({
67
100
  ]),
68
101
  salt: TypeU256,
69
102
  initialOwner: TypeAddress,
103
+ }, {
104
+ title: "Light Account",
70
105
  }),
71
106
  Type.Object({
72
107
  factoryType: Type.Union([
@@ -75,12 +110,16 @@ export const TypePersistedInitcode = Type.Object({
75
110
  ]),
76
111
  salt: TypeU256,
77
112
  initialOwners: Type.Array(TypeAddress),
113
+ }, {
114
+ title: "Multi-Owner Modular Account",
78
115
  }),
79
116
  Type.Object({
80
117
  factoryType: Type.Literal("MAv1.0.0-MultiSig"),
81
118
  salt: TypeU256,
82
119
  initialOwners: Type.Array(TypeAddress),
83
120
  threshold: TypeU256,
121
+ }, {
122
+ title: "Multi-Sig Modular Account",
84
123
  }),
85
124
  Type.Intersect([
86
125
  Type.Object({
@@ -92,15 +131,21 @@ export const TypePersistedInitcode = Type.Object({
92
131
  mav2type: Type.Literal("ma-ssv"),
93
132
  initialOwner: TypeAddress,
94
133
  entityId: TypeU32,
134
+ }, {
135
+ title: "Modular Account V2 SSV",
95
136
  }),
96
137
  Type.Object({
97
138
  mav2type: Type.Literal("sma-b"),
98
139
  initialOwner: TypeAddress,
140
+ }, {
141
+ title: "Modular Account V2 SMA-B",
99
142
  }),
100
143
  Type.Object({
101
144
  mav2type: Type.Literal("ma-webauthn"),
102
145
  initialOwner: TypeWebAuthnPublicKey,
103
146
  entityId: TypeU32,
147
+ }, {
148
+ title: "Modular Account V2 WebAuthn",
104
149
  }),
105
150
  ]),
106
151
  ]),
@@ -108,20 +153,32 @@ export const TypePersistedInitcode = Type.Object({
108
153
  });
109
154
  export const TypeSerializedInitcode = Type.Object({
110
155
  factoryType: Type.Union([
111
- Type.Literal("LightAccountV1.0.1"),
112
- Type.Literal("LightAccountV1.0.2"),
113
- Type.Literal("LightAccountV1.1.0"),
114
- Type.Literal("LightAccountV2.0.0"),
115
- Type.Literal("LightAccountV2.0.0-MultiOwner"),
116
- Type.Literal("MAv1.0.0-MultiOwner"),
117
- Type.Literal("MAv1.0.0-MultiSig"),
118
- Type.Literal("MAv2.0.0-sma-b"),
119
- Type.Literal("MAv2.0.0-ma-ssv"),
120
- Type.Literal("MAv2.0.0-ma-webauthn"),
121
- Type.Literal("unknown"),
156
+ Type.Literal("LightAccountV1.0.1", { title: "Light Account v1.0.1" }),
157
+ Type.Literal("LightAccountV1.0.2", { title: "Light Account v1.0.2" }),
158
+ Type.Literal("LightAccountV1.1.0", { title: "Light Account v1.1.0" }),
159
+ Type.Literal("LightAccountV2.0.0", { title: "Light Account v2.0.0" }),
160
+ Type.Literal("LightAccountV2.0.0-MultiOwner", {
161
+ title: "Light Account v2.0.0 MultiOwner",
162
+ }),
163
+ Type.Literal("MAv1.0.0-MultiOwner", {
164
+ title: "Modular Account v1.0.0 MultiOwner",
165
+ }),
166
+ Type.Literal("MAv1.0.0-MultiSig", {
167
+ title: "Modular Account v1.0.0 MultiSig",
168
+ }),
169
+ Type.Literal("MAv2.0.0-sma-b", {
170
+ title: "Modular Account v2.0.0 SMA-B",
171
+ }),
172
+ Type.Literal("MAv2.0.0-ma-ssv", {
173
+ title: "Modular Account v2.0.0 SSV",
174
+ }),
175
+ Type.Literal("MAv2.0.0-ma-webauthn", {
176
+ title: "Modular Account v2.0.0 WebAuthn",
177
+ }),
178
+ Type.Literal("unknown", { title: "Unknown factory type" }),
122
179
  ]),
123
180
  factoryAddress: TypeAddress,
124
- factoryData: TypeHex(),
181
+ factoryData: TypeHex({}),
125
182
  });
126
183
  export const TypeCounterfactualInfo = Type.Intersect([
127
184
  Type.Object({
@@ -133,9 +190,14 @@ export const TypeCounterfactualInfo = Type.Intersect([
133
190
  type: Type.Literal("sca"),
134
191
  }),
135
192
  TypePersistedInitcode,
136
- ]),
193
+ ], {
194
+ title: "Smart Contract Account",
195
+ }),
137
196
  Type.Object({
138
197
  type: Type.Literal("7702"),
198
+ implementationAddress: TypeAddress,
199
+ }, {
200
+ title: "7702 Account",
139
201
  }),
140
202
  ]),
141
203
  ]);
@@ -144,16 +206,30 @@ export const TypeCreationOptions = Type.Optional(Type.Union([
144
206
  // Optional b/c `sma-b` is the default if no accountType is specified.
145
207
  accountType: Type.Optional(Type.Literal("sma-b")),
146
208
  salt: Type.Optional(TypeHex()),
209
+ }, {
210
+ title: "SMA-B account type",
211
+ }),
212
+ Type.Object({
213
+ accountType: Type.Literal("7702"),
214
+ // TODO: Add support for specifying a delegation address.
215
+ // Currently we only support delegating to MAv2, and it's important
216
+ // that wallet applications maintain a strict shortlist of well-known
217
+ // accounts: https://github.com/ethereum/ERCs/pull/947/files#diff-dab085f963ca621595044bcbc0922705aa38b69f5bf8770dcb3d0496a633efcfR189
218
+ // delegation: TypeAddress,
219
+ }, {
220
+ title: "7702 account type",
147
221
  }),
148
- // TODO: add more options after v0.
149
222
  ]));
150
223
  export const KeySigner = Type.Object({
151
- type: Type.Union([Type.Literal("secp256k1"), Type.Literal("contract")]),
152
- publicKey: TypeHex(),
224
+ type: Type.Union([
225
+ Type.Literal("secp256k1", { title: "Secp256k1" }),
226
+ Type.Literal("contract", { title: "Contract" }),
227
+ ]),
228
+ publicKey: TypeHex({}),
153
229
  });
154
230
  export const TTypedDataDefinition = Type.Transform(Type.Object({
155
231
  domain: Type.Optional(Type.Object({
156
- chainId: Type.Optional(Type.Number()),
232
+ chainId: Type.Optional(Type.Integer()),
157
233
  name: Type.Optional(Type.String()),
158
234
  salt: Type.Optional(TypeHex()),
159
235
  verifyingContract: Type.Optional(TypeAddress),
@@ -182,19 +258,25 @@ export const TTypedDataDefinition = Type.Transform(Type.Object({
182
258
  message: JSON.parse(JSON.stringify(message, (_, v) => typeof v === "bigint" ? toHex(v) : v)),
183
259
  };
184
260
  });
185
- export const TypeSignatureRequest = Type.Union([
186
- Type.Object({
187
- type: Type.Literal("personal_sign"),
188
- data: Type.Union([
189
- Type.String({ minLength: 1 }),
190
- Type.Object({
191
- raw: TypeHex(),
192
- }),
193
- ]),
194
- }),
261
+ const TypePersonalSignSignatureRequest = Type.Object({
262
+ type: Type.Literal("personal_sign"),
263
+ data: Type.Union([
264
+ Type.String({ minLength: 1, title: "Message" }),
265
+ Type.Object({
266
+ raw: TypeHex(),
267
+ }, { title: "Raw message" }),
268
+ ]),
269
+ }, { title: "Personal sign" });
270
+ const TypeTypedDataSignatureRequest = Type.Object({
271
+ type: Type.Literal("eth_signTypedData_v4"),
272
+ data: TTypedDataDefinition,
273
+ }, {
274
+ title: "Typed data",
275
+ });
276
+ export const TypeSignatureRequest = Type.Intersect([
277
+ Type.Union([TypePersonalSignSignatureRequest, TypeTypedDataSignatureRequest]),
195
278
  Type.Object({
196
- type: Type.Literal("eth_signTypedData_v4"),
197
- data: TTypedDataDefinition,
279
+ authorizationRequest: Type.Optional(TypeEip7702AuthRequest),
198
280
  }),
199
281
  ]);
200
282
  export const TypeCallId = Type.Transform(TypeHex())
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,IAAI,GAGL,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAE9D,MAAM,aAAa,GACjB,wEAAwE,CAAC;AAC3E,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,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Content":["import {\n FormatRegistry,\n Type,\n type SchemaOptions,\n type Static,\n} from \"@sinclair/typebox\";\nimport { toHex, slice, pad, concat, hexToBigInt } from \"viem\";\n\nconst UUID_V4_REGEX =\n /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\nFormatRegistry.Set(\"uuid\", (value) => UUID_V4_REGEX.test(value));\n\nconst BASE_64_URL_REGEX = /^[A-Za-z0-9_-]+$/; // Matches base64url encoded strings (without padding)\nFormatRegistry.Set(\"base64url\", (value) => BASE_64_URL_REGEX.test(value));\n\nexport const TypeHex = (options?: SchemaOptions) =>\n Type.TemplateLiteral(\"0x${string}\", options);\nexport const TypeAddress = Type.TemplateLiteral(\"0x${string}\");\nexport const TypeUuid = Type.String({ format: \"uuid\" });\nexport const TypeBase64UrlEncodedString = Type.String({\n format: \"base64url\",\n});\n\n// BigInt is not json-serializable, so it must be encoded as a string.\nexport const TypeU256 = Type.Transform(Type.String())\n .Decode((value) => BigInt(value))\n .Encode((value) => toHex(value));\n\nexport const TypeU32 = Type.Transform(Type.String())\n .Decode((value) => Number.parseInt(value, 16))\n .Encode((value) => toHex(value));\n\nexport const TypeUserOperationRequest_v6 = Type.Object({\n sender: TypeAddress,\n nonce: TypeHex(),\n initCode: Type.Union([TypeHex(), Type.Literal(\"0x\")]),\n callData: TypeHex(),\n callGasLimit: TypeHex(),\n verificationGasLimit: TypeHex(),\n preVerificationGas: TypeHex(),\n maxFeePerGas: TypeHex(),\n maxPriorityFeePerGas: TypeHex(),\n paymasterAndData: Type.Union([TypeHex(), Type.Literal(\"0x\")]),\n signature: TypeHex(),\n});\n\nexport const TypeUserOperationRequest_v7 = Type.Object({\n sender: TypeAddress,\n nonce: TypeHex(),\n factory: Type.Optional(TypeAddress),\n factoryData: Type.Optional(TypeHex()),\n callData: TypeHex(),\n callGasLimit: TypeHex(),\n verificationGasLimit: TypeHex(),\n preVerificationGas: TypeHex(),\n maxFeePerGas: TypeHex(),\n maxPriorityFeePerGas: TypeHex(),\n paymaster: Type.Optional(TypeAddress),\n paymasterData: Type.Optional(TypeHex()),\n paymasterVerificationGasLimit: Type.Optional(TypeHex()),\n paymasterPostOpGasLimit: Type.Optional(TypeHex()),\n signature: TypeHex(),\n});\n\nexport const TypeWebAuthnPublicKey = Type.Object({\n x: TypeU256,\n y: TypeU256,\n});\n\nexport const TypePersistedInitcode = Type.Object({\n factoryAddress: TypeAddress,\n initcode: Type.Union([\n Type.Object({\n factoryType: Type.Literal(\"unknown\"),\n factoryData: TypeHex(),\n }),\n Type.Object({\n factoryType: Type.Union([\n Type.Literal(\"LightAccountV2.0.0\"),\n Type.Literal(\"LightAccountV1.1.0\"),\n Type.Literal(\"LightAccountV1.0.2\"),\n Type.Literal(\"LightAccountV1.0.1\"),\n ]),\n salt: TypeU256,\n initialOwner: TypeAddress,\n }),\n Type.Object({\n factoryType: Type.Union([\n Type.Literal(\"MAv1.0.0-MultiOwner\"),\n Type.Literal(\"LightAccountV2.0.0-MultiOwner\"),\n ]),\n salt: TypeU256,\n initialOwners: Type.Array(TypeAddress),\n }),\n Type.Object({\n factoryType: Type.Literal(\"MAv1.0.0-MultiSig\"),\n salt: TypeU256,\n initialOwners: Type.Array(TypeAddress),\n threshold: TypeU256,\n }),\n Type.Intersect([\n Type.Object({\n factoryType: Type.Literal(\"MAv2.0.0\"),\n salt: TypeU256,\n }),\n Type.Union([\n Type.Object({\n mav2type: Type.Literal(\"ma-ssv\"),\n initialOwner: TypeAddress,\n entityId: TypeU32,\n }),\n Type.Object({\n mav2type: Type.Literal(\"sma-b\"),\n initialOwner: TypeAddress,\n }),\n Type.Object({\n mav2type: Type.Literal(\"ma-webauthn\"),\n initialOwner: TypeWebAuthnPublicKey,\n entityId: TypeU32,\n }),\n ]),\n ]),\n ]),\n});\n\nexport const TypeSerializedInitcode = Type.Object({\n factoryType: Type.Union([\n Type.Literal(\"LightAccountV1.0.1\"),\n Type.Literal(\"LightAccountV1.0.2\"),\n Type.Literal(\"LightAccountV1.1.0\"),\n Type.Literal(\"LightAccountV2.0.0\"),\n Type.Literal(\"LightAccountV2.0.0-MultiOwner\"),\n Type.Literal(\"MAv1.0.0-MultiOwner\"),\n Type.Literal(\"MAv1.0.0-MultiSig\"),\n Type.Literal(\"MAv2.0.0-sma-b\"),\n Type.Literal(\"MAv2.0.0-ma-ssv\"),\n Type.Literal(\"MAv2.0.0-ma-webauthn\"),\n Type.Literal(\"unknown\"),\n ]),\n factoryAddress: TypeAddress,\n factoryData: TypeHex(),\n});\n\nexport const TypeCounterfactualInfo = Type.Intersect([\n Type.Object({\n accountAddress: TypeAddress,\n }),\n Type.Union([\n Type.Intersect([\n Type.Object({\n type: Type.Literal(\"sca\"),\n }),\n TypePersistedInitcode,\n ]),\n Type.Object({\n type: Type.Literal(\"7702\"),\n }),\n ]),\n]);\nexport type TypeCounterfactualInfo = Static<typeof TypeCounterfactualInfo>;\n\nexport const TypeCreationOptions = Type.Optional(\n Type.Union([\n Type.Object({\n // Optional b/c `sma-b` is the default if no accountType is specified.\n accountType: Type.Optional(Type.Literal(\"sma-b\")),\n salt: Type.Optional(TypeHex()),\n }),\n // TODO: add more options after v0.\n ]),\n);\nexport type TypeCreationOptions = Static<typeof TypeCreationOptions>;\n\nexport type TypeAccountType = Exclude<\n Static<typeof TypeCreationOptions>,\n undefined\n>[\"accountType\"];\n\nexport const KeySigner = Type.Object({\n type: Type.Union([Type.Literal(\"secp256k1\"), Type.Literal(\"contract\")]),\n publicKey: TypeHex(),\n});\nexport type KeySigner = Static<typeof KeySigner>;\n\nexport const TTypedDataDefinition = Type.Transform(\n Type.Object({\n domain: Type.Optional(\n Type.Object({\n chainId: Type.Optional(Type.Number()),\n name: Type.Optional(Type.String()),\n salt: Type.Optional(TypeHex()),\n verifyingContract: Type.Optional(TypeAddress),\n version: Type.Optional(Type.String()),\n }),\n ),\n types: Type.Record(\n Type.String(),\n Type.Array(\n Type.Object({\n name: Type.String(),\n type: Type.String(),\n }),\n ),\n ),\n primaryType: Type.String(),\n message: Type.Record(Type.String(), Type.Unknown()),\n }),\n)\n // No-op b/c Viem is happy w/ the encoded version too.\n .Decode((it) => it)\n // Encode the TypedDataDefinition into our json-serialized format.\n .Encode(({ domain, types, primaryType, message }) => {\n return {\n domain: {\n ...domain,\n chainId:\n typeof domain?.chainId === \"bigint\"\n ? Number(domain.chainId)\n : domain?.chainId,\n },\n types,\n primaryType,\n message: JSON.parse(\n JSON.stringify(message, (_, v) =>\n typeof v === \"bigint\" ? toHex(v) : v,\n ),\n ),\n };\n });\n\nexport const TypeSignatureRequest = Type.Union([\n Type.Object({\n type: Type.Literal(\"personal_sign\"),\n data: Type.Union([\n Type.String({ minLength: 1 }),\n Type.Object({\n raw: TypeHex(),\n }),\n ]),\n }),\n Type.Object({\n type: Type.Literal(\"eth_signTypedData_v4\"),\n data: TTypedDataDefinition,\n }),\n]);\n\nexport const TypeCallId = Type.Transform(TypeHex())\n .Decode((value) => {\n return {\n chainId: toHex(hexToBigInt(slice(value, 0, 32))),\n hash: slice(value, 32),\n };\n })\n .Encode(({ chainId, hash }) => {\n const chainIdPadded = pad(chainId, { size: 32 });\n return concat([chainIdPadded, hash]);\n });\n"]}
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,IAAI,GAGL,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAE9D,MAAM,aAAa,GACjB,wEAAwE,CAAC;AAC3E,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAEjE,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,CAAC,sDAAsD;AACpG,cAAc,CAAC,GAAG,CAAC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AK,CAAC,CAAC,gCAAgC,EAAE,6BAA6B,CAAC,CAAC;IAC7E,IAAI,CAAC,MAAM,CAAC;QACV,oBAAoB,EAAE,IAAI,CAAC,QAAQ,CAAC,sBAAsB,CAAC;KAC5D,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;KAChD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;IAChB,OAAO;QACL,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAChD,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;KACvB,CAAC;AACJ,CAAC,CAAC;KACD,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;IAC5B,MAAM,aAAa,GAAG,GAAG,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;IACjD,OAAO,MAAM,CAAC,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC;AACvC,CAAC,CAAC,CAAC","sourcesContent":["import {\n FormatRegistry,\n Type,\n type SchemaOptions,\n type Static,\n} from \"@sinclair/typebox\";\nimport { toHex, slice, pad, concat, hexToBigInt } from \"viem\";\n\nconst UUID_V4_REGEX =\n /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\nFormatRegistry.Set(\"uuid\", (value) => UUID_V4_REGEX.test(value));\n\nconst BASE_64_URL_REGEX = /^[A-Za-z0-9_-]+$/; // Matches base64url encoded strings (without padding)\nFormatRegistry.Set(\"base64url\", (value) => BASE_64_URL_REGEX.test(value));\n\nexport const TypeHex = (options?: SchemaOptions) =>\n Type.TemplateLiteral(\"0x${string}\", {\n ...options,\n });\n\nexport const TypeAddress = Type.TemplateLiteral(\"0x${string}\", {});\n\nexport const TypeUuid = Type.String({\n format: \"uuid\",\n});\n\nexport const TypeBase64UrlEncodedString = Type.String({\n format: \"base64url\",\n});\n\n// BigInt is not json-serializable, so it must be encoded as a string.\nexport const TypeU256 = Type.Transform(Type.String({}))\n .Decode((value) => BigInt(value))\n .Encode((value) => toHex(value));\n\nexport const TypeU32 = Type.Transform(Type.String({}))\n .Decode((value) => Number.parseInt(value, 16))\n .Encode((value) => toHex(value));\n\nexport const TypeUserOperationRequest_v6 = Type.Object({\n sender: TypeAddress,\n nonce: TypeHex(),\n initCode: Type.Union([\n TypeHex({\n title: \"Present\",\n }),\n Type.Literal(\"0x\", {\n title: \"Absent\",\n }),\n ]),\n callData: TypeHex(),\n callGasLimit: TypeHex(),\n verificationGasLimit: TypeHex(),\n preVerificationGas: TypeHex(),\n maxFeePerGas: TypeHex(),\n maxPriorityFeePerGas: TypeHex(),\n paymasterAndData: Type.Union([\n TypeHex({\n title: \"Present\",\n }),\n Type.Literal(\"0x\", {\n title: \"Absent\",\n }),\n ]),\n signature: TypeHex(),\n});\n\nexport const TypeUserOperationRequest_v7 = Type.Object({\n sender: TypeAddress,\n nonce: TypeHex(),\n factory: Type.Optional(TypeAddress),\n factoryData: Type.Optional(TypeHex()),\n callData: TypeHex(),\n callGasLimit: TypeHex(),\n verificationGasLimit: TypeHex(),\n preVerificationGas: TypeHex(),\n maxFeePerGas: TypeHex(),\n maxPriorityFeePerGas: TypeHex(),\n paymaster: Type.Optional(TypeAddress),\n paymasterData: Type.Optional(TypeHex()),\n paymasterVerificationGasLimit: Type.Optional(TypeHex()),\n paymasterPostOpGasLimit: Type.Optional(TypeHex()),\n signature: TypeHex(),\n});\n\nexport const TypeEip7702AuthRequest = Type.Object({\n chainId: Type.Integer(),\n address: TypeAddress,\n nonce: Type.Integer(),\n});\n\nexport const TypeEip7702AuthExtendedFields = Type.Object({\n chainId: TypeHex(),\n nonce: TypeHex(),\n address: TypeAddress,\n r: TypeHex(),\n s: TypeHex(),\n yParity: TypeHex(),\n});\n\nexport const TypeWebAuthnPublicKey = Type.Object({\n x: TypeU256,\n y: TypeU256,\n});\n\nexport const TypePersistedInitcode = Type.Object({\n factoryAddress: TypeAddress,\n initcode: Type.Union([\n Type.Object(\n {\n factoryType: Type.Literal(\"unknown\", { title: \"Unknown factory type\" }),\n factoryData: TypeHex({}),\n },\n {\n title: \"Unknown factory type\",\n },\n ),\n Type.Object(\n {\n factoryType: Type.Union([\n Type.Literal(\"LightAccountV2.0.0\"),\n Type.Literal(\"LightAccountV1.1.0\"),\n Type.Literal(\"LightAccountV1.0.2\"),\n Type.Literal(\"LightAccountV1.0.1\"),\n ]),\n salt: TypeU256,\n initialOwner: TypeAddress,\n },\n {\n title: \"Light Account\",\n },\n ),\n Type.Object(\n {\n factoryType: Type.Union([\n Type.Literal(\"MAv1.0.0-MultiOwner\"),\n Type.Literal(\"LightAccountV2.0.0-MultiOwner\"),\n ]),\n salt: TypeU256,\n initialOwners: Type.Array(TypeAddress),\n },\n {\n title: \"Multi-Owner Modular Account\",\n },\n ),\n Type.Object(\n {\n factoryType: Type.Literal(\"MAv1.0.0-MultiSig\"),\n salt: TypeU256,\n initialOwners: Type.Array(TypeAddress),\n threshold: TypeU256,\n },\n {\n title: \"Multi-Sig Modular Account\",\n },\n ),\n Type.Intersect([\n Type.Object({\n factoryType: Type.Literal(\"MAv2.0.0\"),\n salt: TypeU256,\n }),\n Type.Union([\n Type.Object(\n {\n mav2type: Type.Literal(\"ma-ssv\"),\n initialOwner: TypeAddress,\n entityId: TypeU32,\n },\n {\n title: \"Modular Account V2 SSV\",\n },\n ),\n Type.Object(\n {\n mav2type: Type.Literal(\"sma-b\"),\n initialOwner: TypeAddress,\n },\n {\n title: \"Modular Account V2 SMA-B\",\n },\n ),\n Type.Object(\n {\n mav2type: Type.Literal(\"ma-webauthn\"),\n initialOwner: TypeWebAuthnPublicKey,\n entityId: TypeU32,\n },\n {\n title: \"Modular Account V2 WebAuthn\",\n },\n ),\n ]),\n ]),\n ]),\n});\n\nexport const TypeSerializedInitcode = Type.Object({\n factoryType: Type.Union([\n Type.Literal(\"LightAccountV1.0.1\", { title: \"Light Account v1.0.1\" }),\n Type.Literal(\"LightAccountV1.0.2\", { title: \"Light Account v1.0.2\" }),\n Type.Literal(\"LightAccountV1.1.0\", { title: \"Light Account v1.1.0\" }),\n Type.Literal(\"LightAccountV2.0.0\", { title: \"Light Account v2.0.0\" }),\n Type.Literal(\"LightAccountV2.0.0-MultiOwner\", {\n title: \"Light Account v2.0.0 MultiOwner\",\n }),\n Type.Literal(\"MAv1.0.0-MultiOwner\", {\n title: \"Modular Account v1.0.0 MultiOwner\",\n }),\n Type.Literal(\"MAv1.0.0-MultiSig\", {\n title: \"Modular Account v1.0.0 MultiSig\",\n }),\n Type.Literal(\"MAv2.0.0-sma-b\", {\n title: \"Modular Account v2.0.0 SMA-B\",\n }),\n Type.Literal(\"MAv2.0.0-ma-ssv\", {\n title: \"Modular Account v2.0.0 SSV\",\n }),\n Type.Literal(\"MAv2.0.0-ma-webauthn\", {\n title: \"Modular Account v2.0.0 WebAuthn\",\n }),\n Type.Literal(\"unknown\", { title: \"Unknown factory type\" }),\n ]),\n factoryAddress: TypeAddress,\n factoryData: TypeHex({}),\n});\n\nexport const TypeCounterfactualInfo = Type.Intersect([\n Type.Object({\n accountAddress: TypeAddress,\n }),\n Type.Union([\n Type.Intersect(\n [\n Type.Object({\n type: Type.Literal(\"sca\"),\n }),\n TypePersistedInitcode,\n ],\n {\n title: \"Smart Contract Account\",\n },\n ),\n Type.Object(\n {\n type: Type.Literal(\"7702\"),\n implementationAddress: TypeAddress,\n },\n {\n title: \"7702 Account\",\n },\n ),\n ]),\n]);\nexport type TypeCounterfactualInfo = Static<typeof TypeCounterfactualInfo>;\n\nexport const TypeCreationOptions = Type.Optional(\n Type.Union([\n Type.Object(\n {\n // Optional b/c `sma-b` is the default if no accountType is specified.\n accountType: Type.Optional(Type.Literal(\"sma-b\")),\n salt: Type.Optional(TypeHex()),\n },\n {\n title: \"SMA-B account type\",\n },\n ),\n Type.Object(\n {\n accountType: Type.Literal(\"7702\"),\n // TODO: Add support for specifying a delegation address.\n // Currently we only support delegating to MAv2, and it's important\n // that wallet applications maintain a strict shortlist of well-known\n // accounts: https://github.com/ethereum/ERCs/pull/947/files#diff-dab085f963ca621595044bcbc0922705aa38b69f5bf8770dcb3d0496a633efcfR189\n // delegation: TypeAddress,\n },\n {\n title: \"7702 account type\",\n },\n ),\n ]),\n);\nexport type TypeCreationOptions = Static<typeof TypeCreationOptions>;\n\nexport type TypeAccountType = Exclude<\n Static<typeof TypeCreationOptions>,\n undefined\n>[\"accountType\"];\n\nexport const KeySigner = Type.Object({\n type: Type.Union([\n Type.Literal(\"secp256k1\", { title: \"Secp256k1\" }),\n Type.Literal(\"contract\", { title: \"Contract\" }),\n ]),\n publicKey: TypeHex({}),\n});\nexport type KeySigner = Static<typeof KeySigner>;\n\nexport const TTypedDataDefinition = Type.Transform(\n Type.Object({\n domain: Type.Optional(\n Type.Object({\n chainId: Type.Optional(Type.Integer()),\n name: Type.Optional(Type.String()),\n salt: Type.Optional(TypeHex()),\n verifyingContract: Type.Optional(TypeAddress),\n version: Type.Optional(Type.String()),\n }),\n ),\n types: Type.Record(\n Type.String(),\n Type.Array(\n Type.Object({\n name: Type.String(),\n type: Type.String(),\n }),\n ),\n ),\n primaryType: Type.String(),\n message: Type.Record(Type.String(), Type.Unknown()),\n }),\n)\n // No-op b/c Viem is happy w/ the encoded version too.\n .Decode((it) => it)\n // Encode the TypedDataDefinition into our json-serialized format.\n .Encode(({ domain, types, primaryType, message }) => {\n return {\n domain: {\n ...domain,\n chainId:\n typeof domain?.chainId === \"bigint\"\n ? Number(domain.chainId)\n : domain?.chainId,\n },\n types,\n primaryType,\n message: JSON.parse(\n JSON.stringify(message, (_, v) =>\n typeof v === \"bigint\" ? toHex(v) : v,\n ),\n ),\n };\n });\n\nconst TypePersonalSignSignatureRequest = Type.Object(\n {\n type: Type.Literal(\"personal_sign\"),\n data: Type.Union([\n Type.String({ minLength: 1, title: \"Message\" }),\n Type.Object(\n {\n raw: TypeHex(),\n },\n { title: \"Raw message\" },\n ),\n ]),\n },\n { title: \"Personal sign\" },\n);\n\nconst TypeTypedDataSignatureRequest = Type.Object(\n {\n type: Type.Literal(\"eth_signTypedData_v4\"),\n data: TTypedDataDefinition,\n },\n {\n title: \"Typed data\",\n },\n);\n\nexport const TypeSignatureRequest = Type.Intersect([\n Type.Union([TypePersonalSignSignatureRequest, TypeTypedDataSignatureRequest]),\n Type.Object({\n authorizationRequest: Type.Optional(TypeEip7702AuthRequest),\n }),\n]);\n\nexport const TypeCallId = Type.Transform(TypeHex())\n .Decode((value) => {\n return {\n chainId: toHex(hexToBigInt(slice(value, 0, 32))),\n hash: slice(value, 32),\n };\n })\n .Encode(({ chainId, hash }) => {\n const chainIdPadded = pad(chainId, { size: 32 });\n return concat([chainIdPadded, hash]);\n });\n"]}
@@ -1,7 +1,10 @@
1
1
  export declare const Capabilities: import("@sinclair/typebox").TObject<{
2
- permissions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
2
+ permissions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
3
3
  context: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
4
- }>>;
4
+ }>, import("@sinclair/typebox").TObject<{
5
+ sessionId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
6
+ signature: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
7
+ }>]>>;
5
8
  paymasterService: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
6
9
  policyId: import("@sinclair/typebox").TString;
7
10
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/capabilities/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOxB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/capabilities/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"overrides.d.ts","sourceRoot":"","sources":["../../../src/capabilities/overrides.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;EAA6C,CAAC;AAGrE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;EAavC,CAAC"}
1
+ {"version":3,"file":"overrides.d.ts","sourceRoot":"","sources":["../../../src/capabilities/overrides.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;EAGtB,CAAC;AAGF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;EAyBvC,CAAC"}
@@ -84,9 +84,13 @@ export declare const PermissionsArray: import("@sinclair/typebox").TArray<import
84
84
  export declare const PermissionsContext: TObject<{
85
85
  context: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
86
86
  }>;
87
+ export declare const RemotePermission: TObject<{
88
+ sessionId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
89
+ signature: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
90
+ }>;
87
91
  export declare const PermissionsData: TObject<{
88
92
  chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
89
- expiry: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
93
+ expiry: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
90
94
  key: TObject<{
91
95
  type: import("@sinclair/typebox").TUnion<[TLiteral<"secp256k1">, TLiteral<"contract">]>;
92
96
  publicKey: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
@@ -133,7 +137,10 @@ export declare const PermissionsData: TObject<{
133
137
  data: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNever>;
134
138
  }>]>>;
135
139
  }>;
136
- export declare const PermissionsCapability: TObject<{
140
+ export declare const PermissionsCapability: import("@sinclair/typebox").TUnion<[TObject<{
137
141
  context: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
138
- }>;
142
+ }>, TObject<{
143
+ sessionId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
144
+ signature: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
145
+ }>]>;
139
146
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/permissions/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,QAAQ,EAEb,KAAK,OAAO,EAEb,MAAM,mBAAmB,CAAC;AAwG3B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWzB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA8C,CAAC;AAE5E,eAAO,MAAM,kBAAkB;;EAE7B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK1B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;EAIhC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/permissions/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,QAAQ,EAEb,KAAK,OAAO,EAEb,MAAM,mBAAmB,CAAC;AAwG3B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWzB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA8C,CAAC;AAE5E,eAAO,MAAM,kBAAkB;;EAO9B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;EAQ5B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK1B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;IAKhC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { Static } from "@sinclair/typebox";
2
2
  import { type Hex } from "viem";
3
- import type { PermissionsData } from "./index.ts";
4
3
  import type { KeySigner } from "../../schemas.ts";
4
+ import type { PermissionsCapability, PermissionsData } from "./index.ts";
5
5
  export declare const SESSION_ID_LENGTH_BYTES = 16;
6
6
  export declare const ENTITY_ID_LENGTH_BYTES = 4;
7
7
  export declare const PermissionsContextVersion: {
@@ -30,7 +30,7 @@ type DecodedPermissionsContext = {
30
30
  isGlobalValidation: boolean;
31
31
  });
32
32
  export declare const encodePermissionsContext: (context: DecodedPermissionsContext) => Hex;
33
- export declare const decodePermissionsContext: (input: Hex) => DecodedPermissionsContext;
33
+ export declare const decodePermissionsContext: (capability: Static<typeof PermissionsCapability>) => DecodedPermissionsContext;
34
34
  export declare const prefixSignatureKeyType: (sig: Hex, type: KeySigner["type"]) => Hex;
35
35
  export declare const isGlobalValidation: (data: Pick<Static<typeof PermissionsData>, "permissions">) => boolean;
36
36
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"mav2.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/permissions/mav2.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAuB,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGlD,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC,eAAO,MAAM,yBAAyB;;;;CAI5B,CAAC;AAKX,KAAK,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AM,YAAY,CAAC;AAEzE,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC,eAAO,MAAM,yBAAyB;;;;CAI5B,CAAC;AAKX,KAAK,yBAAyB,GAAG;IAC/B,cAAc,EAAE,MAAM,OAAO,yBAAyB,CAAC;CACxD,GAAG,CACA;IACE,cAAc,EAAE,6BAA6B,CAAC;IAC9C,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,GAAG,CAAC;IACf,cAAc,CAAC,EAAE,KAAK,CAAC;CACxB,GACD;IACE,cAAc,EAAE,4BAA4B,CAAC;IAC7C,cAAc,EAAE,GAAG,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB,GACD;IACE,cAAc,EAAE,qBAAqB,CAAC;IACtC,cAAc,CAAC,EAAE,KAAK,CAAC;IACvB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,QAAQ,EAAE,GAAG,CAAC;IACd,kBAAkB,EAAE,OAAO,CAAC;CAC7B,CACJ,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,SAAS,yBAAyB,KACjC,GAsBF,CAAC;AAEF,eAAO,MAAM,wBAAwB,GACnC,YAAY,MAAM,CAAC,OAAO,qBAAqB,CAAC,KAC/C,yBA4CF,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,KAAK,GAAG,EACR,MAAM,SAAS,CAAC,MAAM,CAAC,KACtB,GASF,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAC7B,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,EAAE,aAAa,CAAC,KACxD,OAEF,CAAC"}
@@ -2,6 +2,8 @@ import { type Address, type Hex, type IsUndefined, type JsonRpcAccount } from "v
2
2
  import type { InnerWalletApiClient } from "../../types.ts";
3
3
  import type { SmartAccountSigner } from "@aa-sdk/core";
4
4
  import type { CreateSessionParams } from "../../isomorphic/actions/createSession.ts";
5
+ import { TypeEip7702AuthExtendedFields } from "../../schemas.js";
6
+ import type { Static } from "@sinclair/typebox";
5
7
  export type GrantPermissionsParams<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined> = Omit<CreateSessionParams, "account" | "chainId"> & (IsUndefined<TAccount> extends true ? {
6
8
  account: Address;
7
9
  } : {
@@ -9,6 +11,7 @@ export type GrantPermissionsParams<TAccount extends JsonRpcAccount<Address> | un
9
11
  });
10
12
  export type GrantPermissionsResult = {
11
13
  context: Hex;
14
+ signedAuthorization?: Static<typeof TypeEip7702AuthExtendedFields>;
12
15
  };
13
16
  /**
14
17
  * Grants permissions to a smart account by creating a session.
@@ -25,6 +28,7 @@ export type GrantPermissionsResult = {
25
28
  * @param {Array} params.permissions - Array of permission objects defining what the session key can do
26
29
  * @returns {Promise<GrantPermissionsResult>} A Promise that resolves to the result containing a context identifier
27
30
  * @returns {Hex} result.context - A hex identifier for the granted permissions context
31
+ * @returns {Static<typeof TypeEip7702AuthExtendedFields>} result.signedAuthorization - The EIP-7702 authorization fields, if applicable
28
32
  *
29
33
  * @example
30
34
  * // Create a session key and grant root permissions
@@ -42,7 +46,7 @@ export type GrantPermissionsResult = {
42
46
  * });
43
47
  *
44
48
  * // Use the permissions to prepare a call
45
- * const preparedUO = await client.prepareCalls({
49
+ * const preparedCall = await client.prepareCalls({
46
50
  * calls: [{ to: zeroAddress, value: "0x0" }],
47
51
  * from: account.address,
48
52
  * capabilities: {
@@ -56,17 +60,67 @@ export type GrantPermissionsResult = {
56
60
  * // Sign with the session key
57
61
  * const signature = await signSignatureRequest(
58
62
  * sessionKey,
59
- * preparedUO.signatureRequest,
63
+ * preparedCall.signatureRequest,
60
64
  * );
61
65
  *
62
66
  * // Send the prepared call using the session key
63
67
  * const result = await client.sendPreparedCalls({
64
- * ...preparedUO,
68
+ * ...preparedCall,
65
69
  * signature,
66
70
  * capabilities: {
67
71
  * permissions,
68
72
  * },
69
73
  * });
74
+ *
75
+ * @example
76
+ * // Create a session key and grant root permissions using a 7702 account
77
+ * const sessionKey = LocalAccountSigner.generatePrivateKeySigner();
78
+ * const account = await client.requestAccount({
79
+ * creationHint: {
80
+ * accountType: "7702",
81
+ * }
82
+ * });
83
+ *
84
+ * const permissions = await client.grantPermissions({
85
+ * account: account.address,
86
+ * expiry: Math.floor(Date.now() / 1000) + 60 * 60, // 1 hour from now
87
+ * key: {
88
+ * publicKey: await sessionKey.getAddress(),
89
+ * type: "secp256k1",
90
+ * },
91
+ * permissions: [{ type: "root" }],
92
+ * });
93
+ *
94
+ * // Use the permissions to prepare a call
95
+ * const preparedCall = await client.prepareCalls({
96
+ * calls: [{ to: zeroAddress, value: "0x0" }],
97
+ * from: account.address,
98
+ * capabilities: {
99
+ * paymasterService: {
100
+ * policyId: "your-paymaster-policy-id",
101
+ * },
102
+ * permissions,
103
+ * },
104
+ * });
105
+ *
106
+ * // Sign with the session key
107
+ * // If the 7702 account delegation is not yet installed, the result
108
+ * // here will include a `signedAuthorization` field that that
109
+ * // must be included when sending the account's first call.
110
+ * const { signedAuthorization, ...signature} = await signSignatureRequest(
111
+ * sessionKey,
112
+ * preparedCall.signatureRequest,
113
+ * );
114
+ *
115
+ * // Send the prepared call using the session key
116
+ * const result = await client.sendPreparedCalls({
117
+ * ...preparedCall,
118
+ * signature,
119
+ * signedAuthorization,
120
+ * capabilities: {
121
+ * permissions,
122
+ * },
123
+ * });
70
124
  */
71
125
  export declare function grantPermissions<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined>(client: InnerWalletApiClient<TAccount>, signer: SmartAccountSigner, params: GrantPermissionsParams<TAccount>): Promise<GrantPermissionsResult>;
72
126
  //# sourceMappingURL=grantPermissions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"grantPermissions.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/grantPermissions.ts"],"names":[],"mappings":"AAAA,O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oBAAoB,CAAC,CAAC"}
@@ -2,10 +2,12 @@ import type { SmartAccountSigner } from "@aa-sdk/core";
2
2
  import type { Static } from "@sinclair/typebox";
3
3
  import { type Hex } from "viem";
4
4
  import { TypeSignatureRequest } from "../../schemas.js";
5
+ import type { Eip7702ExtendedFields } from "@aa-sdk/core";
5
6
  export type SignSignatureRequestParams = Static<typeof TypeSignatureRequest>;
6
7
  export type SignSignatureRequestResult = {
7
8
  type: "ecdsa";
8
9
  signature: Hex;
10
+ signedAuthorization?: Eip7702ExtendedFields["eip7702Auth"];
9
11
  };
10
12
  /**
11
13
  * Signs a signature request using the provided signer.
@@ -13,11 +15,12 @@ export type SignSignatureRequestResult = {
13
15
  *
14
16
  * @param {SmartAccountSigner} signer - The signer to use for signing the request
15
17
  * @param {SignSignatureRequestParams} params - The signature request parameters
16
- * @param {string} params.type - The type of signature request ('personal_sign' or 'eth_signTypedData_v4')
18
+ * @param {string} params.type - The type of signature request ('personal_sign', 'eth_signTypedData_v4', or 'signature_with_authorization')
17
19
  * @param {any} params.data - The data to sign, format depends on the signature type
18
20
  * @returns {Promise<SignSignatureRequestResult>} A Promise that resolves to the signature result
19
21
  * @returns {string} result.type - The signature type (currently only 'ecdsa' is supported)
20
22
  * @returns {Hex} result.signature - The hex-encoded signature
23
+ * @returns {Eip7702ExtendedFields["eip7702Auth"]} result.signedAuthorization - The signed EIP-7702 authorization, if applicable
21
24
  *
22
25
  * @example
23
26
  * // Sign a personal message
@@ -1 +1 @@
1
- {"version":3,"file":"signSignatureRequest.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signSignatureRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,MAAM,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAGxD,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE7E,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,0BAA0B,CAAC,CAAC"}
1
+ {"version":3,"file":"signSignatureRequest.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signSignatureRequest.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,KAAK,GAAG,EAAS,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1D,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE7E,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,GAAG,CAAC;IACf,mBAAmB,CAAC,EAAE,qBAAqB,CAAC,aAAa,CAAC,CAAC;CAC5D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,0BAA0B,CAAC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import type { SmartAccountSigner } from "@aa-sdk/core";
2
+ import type { AlchemyTransport } from "@account-kit/infra";
2
3
  import type { Address, Chain, IsUndefined, JsonRpcAccount, Prettify } from "viem";
3
4
  import type { InnerWalletApiClient } from "../types.ts";
4
5
  import { type SmartWalletActions } from "./decorator.js";
5
- import type { AlchemyTransport } from "@account-kit/infra";
6
6
  export type SmartWalletClientParams<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined> = Prettify<{
7
7
  transport: AlchemyTransport;
8
8
  chain: Chain;
@@ -14,6 +14,7 @@ export type SmartWalletClientParams<TAccount extends JsonRpcAccount<Address> | u
14
14
  } : {
15
15
  account: Address;
16
16
  })>;
17
- export declare function createSmartWalletClient<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined>(params: SmartWalletClientParams<TAccount>): InnerWalletApiClient<TAccount> & SmartWalletActions<TAccount>;
18
- export declare function createSmartWalletClient<TAccount extends JsonRpcAccount<Address> = JsonRpcAccount<Address>>(params: SmartWalletClientParams<TAccount>): InnerWalletApiClient<TAccount> & SmartWalletActions<TAccount>;
17
+ export type SmartWalletClient<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined> = InnerWalletApiClient<TAccount> & SmartWalletActions<TAccount>;
18
+ export declare function createSmartWalletClient<TAccount extends JsonRpcAccount<Address> | undefined = JsonRpcAccount<Address> | undefined>(params: SmartWalletClientParams<TAccount>): SmartWalletClient<TAccount>;
19
+ export declare function createSmartWalletClient<TAccount extends JsonRpcAccount<Address> = JsonRpcAccount<Address>>(params: SmartWalletClientParams<TAccount>): SmartWalletClient<TAccount>;
19
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,KAAK,EACV,OAAO,EACP,KAAK,EACL,WAAW,EACX,cAAc,EACd,QAAQ,EACT,MAAM,MAAM,CAAC;AAGd,OAAO,KAAK,EAAE,oBAAoB,EAAE,M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