@account-kit/wallet-client 0.1.0-alpha.5 → 0.1.0-alpha.6

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 (117) hide show
  1. package/dist/esm/capabilities/eip7702Auth.js +3 -1
  2. package/dist/esm/capabilities/eip7702Auth.js.map +1 -1
  3. package/dist/esm/capabilities/overrides.js +8 -8
  4. package/dist/esm/capabilities/overrides.js.map +1 -1
  5. package/dist/esm/capabilities/permissions/index.d.ts +1 -1
  6. package/dist/esm/capabilities/permissions/index.js +6 -3
  7. package/dist/esm/capabilities/permissions/index.js.map +1 -1
  8. package/dist/esm/client/actions/grantPermissions.d.ts +5 -60
  9. package/dist/esm/client/actions/grantPermissions.js +5 -58
  10. package/dist/esm/client/actions/grantPermissions.js.map +1 -1
  11. package/dist/esm/client/actions/sendPreparedCalls.d.ts +6 -14
  12. package/dist/esm/client/actions/sendPreparedCalls.js +11 -12
  13. package/dist/esm/client/actions/sendPreparedCalls.js.map +1 -1
  14. package/dist/esm/client/actions/signPreparedCalls.d.ts +14 -0
  15. package/dist/esm/client/actions/signPreparedCalls.js +53 -0
  16. package/dist/esm/client/actions/signPreparedCalls.js.map +1 -0
  17. package/dist/esm/client/actions/signSignatureRequest.d.ts +8 -7
  18. package/dist/esm/client/actions/signSignatureRequest.js +69 -31
  19. package/dist/esm/client/actions/signSignatureRequest.js.map +1 -1
  20. package/dist/esm/client/client.e2e-test.js +28 -25
  21. package/dist/esm/client/client.e2e-test.js.map +1 -1
  22. package/dist/esm/client/decorator.d.ts +3 -1
  23. package/dist/esm/client/decorator.js +3 -1
  24. package/dist/esm/client/decorator.js.map +1 -1
  25. package/dist/esm/exports/index.d.ts +2 -1
  26. package/dist/esm/exports/index.js +2 -1
  27. package/dist/esm/exports/index.js.map +1 -1
  28. package/dist/esm/isomorphic/actions/createSession.js +18 -32
  29. package/dist/esm/isomorphic/actions/createSession.js.map +1 -1
  30. package/dist/esm/isomorphic/actions/prepareCalls.js +22 -16
  31. package/dist/esm/isomorphic/actions/prepareCalls.js.map +1 -1
  32. package/dist/esm/isomorphic/actions/sendPreparedCalls.d.ts +3 -3
  33. package/dist/esm/isomorphic/actions/sendPreparedCalls.js +76 -36
  34. package/dist/esm/isomorphic/actions/sendPreparedCalls.js.map +1 -1
  35. package/dist/esm/isomorphic/client.d.ts +139 -13
  36. package/dist/esm/isomorphic/utils/7702.d.ts +4 -3
  37. package/dist/esm/isomorphic/utils/7702.js +14 -6
  38. package/dist/esm/isomorphic/utils/7702.js.map +1 -1
  39. package/dist/esm/isomorphic/utils/decodeSignature.d.ts +3 -0
  40. package/dist/esm/isomorphic/utils/decodeSignature.js +13 -0
  41. package/dist/esm/isomorphic/utils/decodeSignature.js.map +1 -0
  42. package/dist/esm/local/client.js +2 -3
  43. package/dist/esm/local/client.js.map +1 -1
  44. package/dist/esm/remote/client.js +3 -7
  45. package/dist/esm/remote/client.js.map +1 -1
  46. package/dist/esm/rpc/examples.d.ts +3 -3
  47. package/dist/esm/rpc/examples.js +3 -3
  48. package/dist/esm/rpc/examples.js.map +1 -1
  49. package/dist/esm/rpc/request.d.ts +357 -49
  50. package/dist/esm/rpc/request.js +26 -53
  51. package/dist/esm/rpc/request.js.map +1 -1
  52. package/dist/esm/rpc/schema.d.ts +323 -57
  53. package/dist/esm/rpc/schema.js.map +1 -1
  54. package/dist/esm/schemas.d.ts +451 -13
  55. package/dist/esm/schemas.js +165 -52
  56. package/dist/esm/schemas.js.map +1 -1
  57. package/dist/esm/types.d.ts +3 -0
  58. package/dist/esm/types.js.map +1 -1
  59. package/dist/types/capabilities/eip7702Auth.d.ts.map +1 -1
  60. package/dist/types/capabilities/permissions/index.d.ts +1 -1
  61. package/dist/types/capabilities/permissions/index.d.ts.map +1 -1
  62. package/dist/types/client/actions/grantPermissions.d.ts +5 -60
  63. package/dist/types/client/actions/grantPermissions.d.ts.map +1 -1
  64. package/dist/types/client/actions/sendPreparedCalls.d.ts +6 -14
  65. package/dist/types/client/actions/sendPreparedCalls.d.ts.map +1 -1
  66. package/dist/types/client/actions/signPreparedCalls.d.ts +15 -0
  67. package/dist/types/client/actions/signPreparedCalls.d.ts.map +1 -0
  68. package/dist/types/client/actions/signSignatureRequest.d.ts +8 -7
  69. package/dist/types/client/actions/signSignatureRequest.d.ts.map +1 -1
  70. package/dist/types/client/decorator.d.ts +3 -1
  71. package/dist/types/client/decorator.d.ts.map +1 -1
  72. package/dist/types/exports/index.d.ts +2 -1
  73. package/dist/types/exports/index.d.ts.map +1 -1
  74. package/dist/types/isomorphic/actions/createSession.d.ts.map +1 -1
  75. package/dist/types/isomorphic/actions/prepareCalls.d.ts.map +1 -1
  76. package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts +3 -3
  77. package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts.map +1 -1
  78. package/dist/types/isomorphic/client.d.ts +139 -13
  79. package/dist/types/isomorphic/client.d.ts.map +1 -1
  80. package/dist/types/isomorphic/utils/7702.d.ts +4 -3
  81. package/dist/types/isomorphic/utils/7702.d.ts.map +1 -1
  82. package/dist/types/isomorphic/utils/decodeSignature.d.ts +4 -0
  83. package/dist/types/isomorphic/utils/decodeSignature.d.ts.map +1 -0
  84. package/dist/types/remote/client.d.ts.map +1 -1
  85. package/dist/types/rpc/examples.d.ts +3 -3
  86. package/dist/types/rpc/examples.d.ts.map +1 -1
  87. package/dist/types/rpc/request.d.ts +357 -49
  88. package/dist/types/rpc/request.d.ts.map +1 -1
  89. package/dist/types/rpc/schema.d.ts +323 -57
  90. package/dist/types/rpc/schema.d.ts.map +1 -1
  91. package/dist/types/schemas.d.ts +451 -13
  92. package/dist/types/schemas.d.ts.map +1 -1
  93. package/dist/types/types.d.ts +3 -0
  94. package/dist/types/types.d.ts.map +1 -1
  95. package/package.json +2 -2
  96. package/src/capabilities/eip7702Auth.ts +17 -10
  97. package/src/capabilities/overrides.ts +8 -8
  98. package/src/capabilities/permissions/index.ts +8 -3
  99. package/src/client/actions/grantPermissions.ts +5 -60
  100. package/src/client/actions/sendPreparedCalls.ts +17 -17
  101. package/src/client/actions/signPreparedCalls.ts +71 -0
  102. package/src/client/actions/signSignatureRequest.ts +50 -46
  103. package/src/client/client.e2e-test.ts +32 -35
  104. package/src/client/decorator.ts +14 -5
  105. package/src/exports/index.ts +2 -1
  106. package/src/isomorphic/actions/createSession.ts +20 -42
  107. package/src/isomorphic/actions/prepareCalls.ts +25 -17
  108. package/src/isomorphic/actions/sendPreparedCalls.ts +104 -54
  109. package/src/isomorphic/utils/7702.ts +18 -8
  110. package/src/isomorphic/utils/decodeSignature.ts +18 -0
  111. package/src/local/client.ts +2 -6
  112. package/src/remote/client.ts +3 -10
  113. package/src/rpc/examples.ts +3 -4
  114. package/src/rpc/request.ts +41 -63
  115. package/src/rpc/schema.ts +2 -2
  116. package/src/schemas.ts +227 -53
  117. package/src/types.ts +4 -0
@@ -1,5 +1,6 @@
1
1
  import { FormatRegistry, Type, } from "@sinclair/typebox";
2
- import { toHex, slice, pad, concat, hexToBigInt } from "viem";
2
+ import { yParityToV } from "ox/Signature";
3
+ import { toHex, slice, pad, concat, hexToBigInt, serializeSignature, hexToNumber, parseSignature, numberToHex, } from "viem";
3
4
  const UUID_V4_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
4
5
  FormatRegistry.Set("uuid", (value) => UUID_V4_REGEX.test(value));
5
6
  const BASE_64_URL_REGEX = /^[A-Za-z0-9_-]+$/; // Matches base64url encoded strings (without padding)
@@ -26,10 +27,10 @@ export const TypeUserOperationRequest_v6 = Type.Object({
26
27
  nonce: TypeHex(),
27
28
  initCode: Type.Union([
28
29
  TypeHex({
29
- title: "Present",
30
+ description: "Present",
30
31
  }),
31
32
  Type.Literal("0x", {
32
- title: "Absent",
33
+ description: "Absent",
33
34
  }),
34
35
  ]),
35
36
  callData: TypeHex(),
@@ -40,10 +41,10 @@ export const TypeUserOperationRequest_v6 = Type.Object({
40
41
  maxPriorityFeePerGas: TypeHex(),
41
42
  paymasterAndData: Type.Union([
42
43
  TypeHex({
43
- title: "Present",
44
+ description: "Present",
44
45
  }),
45
46
  Type.Literal("0x", {
46
- title: "Absent",
47
+ description: "Absent",
47
48
  }),
48
49
  ]),
49
50
  signature: TypeHex(),
@@ -65,19 +66,19 @@ export const TypeUserOperationRequest_v7 = Type.Object({
65
66
  paymasterPostOpGasLimit: Type.Optional(TypeHex()),
66
67
  signature: TypeHex(),
67
68
  });
68
- export const TypeEip7702AuthRequest = Type.Object({
69
- chainId: Type.Integer(),
70
- address: TypeAddress,
71
- nonce: Type.Integer(),
72
- });
73
- export const TypeEip7702AuthExtendedFields = Type.Object({
69
+ export const TypeEip7702UnsignedAuth = Type.Object({
74
70
  chainId: TypeHex(),
75
- nonce: TypeHex(),
76
71
  address: TypeAddress,
77
- r: TypeHex(),
78
- s: TypeHex(),
79
- yParity: TypeHex(),
72
+ nonce: TypeHex(),
80
73
  });
74
+ export const TypeEip7702SignedAuth = Type.Intersect([
75
+ TypeEip7702UnsignedAuth,
76
+ Type.Object({
77
+ r: TypeHex(),
78
+ s: TypeHex(),
79
+ yParity: TypeHex(),
80
+ }),
81
+ ]);
81
82
  export const TypeWebAuthnPublicKey = Type.Object({
82
83
  x: TypeU256,
83
84
  y: TypeU256,
@@ -86,10 +87,12 @@ export const TypePersistedInitcode = Type.Object({
86
87
  factoryAddress: TypeAddress,
87
88
  initcode: Type.Union([
88
89
  Type.Object({
89
- factoryType: Type.Literal("unknown", { title: "Unknown factory type" }),
90
+ factoryType: Type.Literal("unknown", {
91
+ description: "Unknown factory type",
92
+ }),
90
93
  factoryData: TypeHex({}),
91
94
  }, {
92
- title: "Unknown factory type",
95
+ description: "Unknown factory type",
93
96
  }),
94
97
  Type.Object({
95
98
  factoryType: Type.Union([
@@ -101,7 +104,7 @@ export const TypePersistedInitcode = Type.Object({
101
104
  salt: TypeU256,
102
105
  initialOwner: TypeAddress,
103
106
  }, {
104
- title: "Light Account",
107
+ description: "Light Account",
105
108
  }),
106
109
  Type.Object({
107
110
  factoryType: Type.Union([
@@ -111,7 +114,7 @@ export const TypePersistedInitcode = Type.Object({
111
114
  salt: TypeU256,
112
115
  initialOwners: Type.Array(TypeAddress),
113
116
  }, {
114
- title: "Multi-Owner Modular Account",
117
+ description: "Multi-Owner Modular Account",
115
118
  }),
116
119
  Type.Object({
117
120
  factoryType: Type.Literal("MAv1.0.0-MultiSig"),
@@ -119,7 +122,7 @@ export const TypePersistedInitcode = Type.Object({
119
122
  initialOwners: Type.Array(TypeAddress),
120
123
  threshold: TypeU256,
121
124
  }, {
122
- title: "Multi-Sig Modular Account",
125
+ description: "Multi-Sig Modular Account",
123
126
  }),
124
127
  Type.Intersect([
125
128
  Type.Object({
@@ -132,20 +135,20 @@ export const TypePersistedInitcode = Type.Object({
132
135
  initialOwner: TypeAddress,
133
136
  entityId: TypeU32,
134
137
  }, {
135
- title: "Modular Account V2 SSV",
138
+ description: "Modular Account V2 SSV",
136
139
  }),
137
140
  Type.Object({
138
141
  mav2type: Type.Literal("sma-b"),
139
142
  initialOwner: TypeAddress,
140
143
  }, {
141
- title: "Modular Account V2 SMA-B",
144
+ description: "Modular Account V2 SMA-B",
142
145
  }),
143
146
  Type.Object({
144
147
  mav2type: Type.Literal("ma-webauthn"),
145
148
  initialOwner: TypeWebAuthnPublicKey,
146
149
  entityId: TypeU32,
147
150
  }, {
148
- title: "Modular Account V2 WebAuthn",
151
+ description: "Modular Account V2 WebAuthn",
149
152
  }),
150
153
  ]),
151
154
  ]),
@@ -153,29 +156,29 @@ export const TypePersistedInitcode = Type.Object({
153
156
  });
154
157
  export const TypeSerializedInitcode = Type.Object({
155
158
  factoryType: Type.Union([
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" }),
159
+ Type.Literal("LightAccountV1.0.1", { description: "Light Account v1.0.1" }),
160
+ Type.Literal("LightAccountV1.0.2", { description: "Light Account v1.0.2" }),
161
+ Type.Literal("LightAccountV1.1.0", { description: "Light Account v1.1.0" }),
162
+ Type.Literal("LightAccountV2.0.0", { description: "Light Account v2.0.0" }),
160
163
  Type.Literal("LightAccountV2.0.0-MultiOwner", {
161
- title: "Light Account v2.0.0 MultiOwner",
164
+ description: "Light Account v2.0.0 MultiOwner",
162
165
  }),
163
166
  Type.Literal("MAv1.0.0-MultiOwner", {
164
- title: "Modular Account v1.0.0 MultiOwner",
167
+ description: "Modular Account v1.0.0 MultiOwner",
165
168
  }),
166
169
  Type.Literal("MAv1.0.0-MultiSig", {
167
- title: "Modular Account v1.0.0 MultiSig",
170
+ description: "Modular Account v1.0.0 MultiSig",
168
171
  }),
169
172
  Type.Literal("MAv2.0.0-sma-b", {
170
- title: "Modular Account v2.0.0 SMA-B",
173
+ description: "Modular Account v2.0.0 SMA-B",
171
174
  }),
172
175
  Type.Literal("MAv2.0.0-ma-ssv", {
173
- title: "Modular Account v2.0.0 SSV",
176
+ description: "Modular Account v2.0.0 SSV",
174
177
  }),
175
178
  Type.Literal("MAv2.0.0-ma-webauthn", {
176
- title: "Modular Account v2.0.0 WebAuthn",
179
+ description: "Modular Account v2.0.0 WebAuthn",
177
180
  }),
178
- Type.Literal("unknown", { title: "Unknown factory type" }),
181
+ Type.Literal("unknown", { description: "Unknown factory type" }),
179
182
  ]),
180
183
  factoryAddress: TypeAddress,
181
184
  factoryData: TypeHex({}),
@@ -191,13 +194,13 @@ export const TypeCounterfactualInfo = Type.Intersect([
191
194
  }),
192
195
  TypePersistedInitcode,
193
196
  ], {
194
- title: "Smart Contract Account",
197
+ description: "Smart Contract Account",
195
198
  }),
196
199
  Type.Object({
197
200
  type: Type.Literal("7702"),
198
201
  implementationAddress: TypeAddress,
199
202
  }, {
200
- title: "7702 Account",
203
+ description: "7702 Account",
201
204
  }),
202
205
  ]),
203
206
  ]);
@@ -207,7 +210,7 @@ export const TypeCreationOptions = Type.Optional(Type.Union([
207
210
  accountType: Type.Optional(Type.Literal("sma-b")),
208
211
  salt: Type.Optional(TypeHex()),
209
212
  }, {
210
- title: "SMA-B account type",
213
+ description: "SMA-B account type",
211
214
  }),
212
215
  Type.Object({
213
216
  accountType: Type.Literal("7702"),
@@ -217,13 +220,13 @@ export const TypeCreationOptions = Type.Optional(Type.Union([
217
220
  // accounts: https://github.com/ethereum/ERCs/pull/947/files#diff-dab085f963ca621595044bcbc0922705aa38b69f5bf8770dcb3d0496a633efcfR189
218
221
  // delegation: TypeAddress,
219
222
  }, {
220
- title: "7702 account type",
223
+ description: "7702 account type",
221
224
  }),
222
225
  ]));
223
226
  export const TypeSignatureType = Type.Union([
224
- Type.Literal("secp256k1", { title: "Secp256k1" }),
225
- Type.Literal("ecdsa", { title: "ECDSA (alias for secp256k1)" }),
226
- Type.Literal("contract", { title: "Contract" }),
227
+ Type.Literal("secp256k1", { description: "Secp256k1" }),
228
+ Type.Literal("ecdsa", { description: "ECDSA (alias for secp256k1)" }),
229
+ Type.Literal("contract", { description: "Contract" }),
227
230
  ]);
228
231
  export const KeySigner = Type.Object({
229
232
  type: TypeSignatureType,
@@ -260,26 +263,28 @@ export const TTypedDataDefinition = Type.Transform(Type.Object({
260
263
  message: JSON.parse(JSON.stringify(message, (_, v) => typeof v === "bigint" ? toHex(v) : v)),
261
264
  };
262
265
  });
263
- const TypePersonalSignSignatureRequest = Type.Object({
266
+ export const TypePersonalSignSignatureRequest = Type.Object({
264
267
  type: Type.Literal("personal_sign"),
265
268
  data: Type.Union([
266
- Type.String({ minLength: 1, title: "Message" }),
269
+ Type.String({ minLength: 1, description: "Message" }),
267
270
  Type.Object({
268
271
  raw: TypeHex(),
269
- }, { title: "Raw message" }),
272
+ }, { description: "Raw message" }),
270
273
  ]),
271
- }, { title: "Personal sign" });
272
- const TypeTypedDataSignatureRequest = Type.Object({
274
+ }, { description: "Personal sign" });
275
+ export const TypeTypedDataSignatureRequest = Type.Object({
273
276
  type: Type.Literal("eth_signTypedData_v4"),
274
277
  data: TTypedDataDefinition,
275
278
  }, {
276
- title: "Typed data",
279
+ description: "Typed data",
277
280
  });
278
- export const TypeSignatureRequest = Type.Intersect([
279
- Type.Union([TypePersonalSignSignatureRequest, TypeTypedDataSignatureRequest]),
280
- Type.Object({
281
- authorizationRequest: Type.Optional(TypeEip7702AuthRequest),
282
- }),
281
+ export const TypeAuthorizationSignatureRequest = Type.Object({
282
+ type: Type.Literal("eip7702Auth"),
283
+ });
284
+ export const TypeSignatureRequest = Type.Union([
285
+ TypePersonalSignSignatureRequest,
286
+ TypeTypedDataSignatureRequest,
287
+ TypeAuthorizationSignatureRequest,
283
288
  ]);
284
289
  export const TypeCallId = Type.Transform(TypeHex())
285
290
  .Decode((value) => {
@@ -292,4 +297,112 @@ export const TypeCallId = Type.Transform(TypeHex())
292
297
  const chainIdPadded = pad(chainId, { size: 32 });
293
298
  return concat([chainIdPadded, hash]);
294
299
  });
300
+ export const PreparedCall_UserOpV060 = Type.Object({
301
+ type: Type.Literal("user-operation-v060", {
302
+ description: "User Operation (Entrypoint v0.6.0)",
303
+ }),
304
+ data: Type.Omit(TypeUserOperationRequest_v6, ["signature"], {
305
+ description: "Unsigned User Operation (Entrypoint v0.6.0)",
306
+ }),
307
+ chainId: TypeHex(),
308
+ signatureRequest: Type.Union([
309
+ TypePersonalSignSignatureRequest,
310
+ TypeTypedDataSignatureRequest,
311
+ ]),
312
+ }, {
313
+ description: "Prepared User Operation (Entrypoint v0.6.0)",
314
+ });
315
+ export const PreparedCall_UserOpV070 = Type.Object({
316
+ type: Type.Literal("user-operation-v070", {
317
+ description: "User Operation (Entrypoint v0.7.0)",
318
+ }),
319
+ data: Type.Omit(TypeUserOperationRequest_v7, ["signature"], {
320
+ description: "Unsigned User Operation (Entrypoint v0.7.0)",
321
+ }),
322
+ chainId: TypeHex(),
323
+ signatureRequest: Type.Union([
324
+ TypePersonalSignSignatureRequest,
325
+ TypeTypedDataSignatureRequest,
326
+ ]),
327
+ }, {
328
+ description: "Prepared User Operation (Entrypoint v0.7.0)",
329
+ });
330
+ export const PreparedCall_Authorization = Type.Object({
331
+ type: Type.Literal("authorization", {
332
+ description: "EIP-7702 Authorization Request",
333
+ }),
334
+ data: Type.Omit(TypeEip7702UnsignedAuth, ["chainId"]),
335
+ chainId: TypeHex(),
336
+ signatureRequest: TypeAuthorizationSignatureRequest,
337
+ }, {
338
+ description: "Prepared EIP-7702 Authorization",
339
+ });
340
+ export const TypeEdcsaSigData = Type.Union([
341
+ TypeHex({
342
+ description: "Hex-encoded signature",
343
+ }),
344
+ Type.Transform(Type.Object({
345
+ r: TypeHex(),
346
+ s: TypeHex(),
347
+ yParity: TypeHex(),
348
+ }, { description: "r, s, yParity" }))
349
+ .Decode((sig) => serializeSignature({ ...sig, yParity: hexToNumber(sig.yParity) }))
350
+ .Encode((hex) => {
351
+ const parsed = parseSignature(hex);
352
+ return {
353
+ ...parsed,
354
+ yParity: numberToHex(parsed.yParity),
355
+ };
356
+ }),
357
+ Type.Transform(Type.Object({
358
+ r: TypeHex(),
359
+ s: TypeHex(),
360
+ v: TypeHex(),
361
+ }, {
362
+ description: "r, s, v",
363
+ }))
364
+ .Decode((sig) => serializeSignature({ ...sig, v: hexToBigInt(sig.v) }))
365
+ .Encode((hex) => {
366
+ const parsed = parseSignature(hex);
367
+ return {
368
+ ...parsed,
369
+ v: numberToHex(yParityToV(parsed.yParity)),
370
+ };
371
+ }),
372
+ ]);
373
+ export const TypeEcdsaSig = Type.Object({
374
+ signature: Type.Union([
375
+ Type.Object({
376
+ type: Type.Literal("secp256k1"),
377
+ data: TypeEdcsaSigData,
378
+ }, {
379
+ description: "Secp256k1 signature",
380
+ }),
381
+ Type.Object({
382
+ type: Type.Literal("ecdsa"),
383
+ data: TypeEdcsaSigData,
384
+ }, {
385
+ description: "ECDSA signature (alias for secp256k1)",
386
+ }),
387
+ ]),
388
+ });
389
+ export const TypePrepareCall_UserOpV060_Signed = Type.Intersect([Type.Omit(PreparedCall_UserOpV060, ["signatureRequest"]), TypeEcdsaSig], {
390
+ description: "Prepared User Operation (Entrypoint v0.6.0) with signature",
391
+ });
392
+ export const TypePrepareCall_UserOpV070_Signed = Type.Intersect([Type.Omit(PreparedCall_UserOpV070, ["signatureRequest"]), TypeEcdsaSig], {
393
+ description: "Prepared User Operation (Entrypoint v0.7.0) with signature",
394
+ });
395
+ export const TypePrepareCall_Authorization_Signed = Type.Intersect([Type.Omit(PreparedCall_Authorization, ["signatureRequest"]), TypeEcdsaSig], {
396
+ description: "Prepared EIP-7702 Authorization with signature",
397
+ });
398
+ export const TypeCallArray = Type.Object({
399
+ type: Type.Literal("array"),
400
+ data: Type.Array(Type.Union([
401
+ TypePrepareCall_UserOpV060_Signed,
402
+ TypePrepareCall_UserOpV070_Signed,
403
+ TypePrepareCall_Authorization_Signed,
404
+ ])),
405
+ }, {
406
+ description: "Array of prepared calls with signatures",
407
+ });
295
408
  //# sourceMappingURL=schemas.js.map
@@ -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,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAEjE,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,CAAC,sDAAsD;AACpG,cAAc,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,I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F,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,SAAS,CAAC;IACjD,IAAI,CAAC,KAAK,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 TypeSignatureType = Type.Union([\n Type.Literal(\"secp256k1\", { title: \"Secp256k1\" }),\n Type.Literal(\"ecdsa\", { title: \"ECDSA (alias for secp256k1)\" }),\n Type.Literal(\"contract\", { title: \"Contract\" }),\n]);\nexport type TypeSignatureType = Static<typeof TypeSignatureType>;\n\nexport const KeySigner = Type.Object({\n type: TypeSignatureType,\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
+ {"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,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EACL,KAAK,EACL,KAAK,EACL,GAAG,EACH,MAAM,EACN,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,WAAW,GACZ,MAAM,MAAM,CAAC;AAEd,MAAM,aAAa,GACjB,wEAAwE,CAAC;AAC3E,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,KAA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qBAAqB;SACnC,CACF;QACD,IAAI,CAAC,MAAM,CACT;YACE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;YAC3B,IAAI,EAAE,gBAAgB;SACvB,EACD;YACE,WAAW,EAAE,uCAAuC;SACrD,CACF;KACF,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iCAAiC,GAAG,IAAI,CAAC,SAAS,CAC7D,CAAC,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,YAAY,CAAC,EACxE;IACE,WAAW,EAAE,4DAA4D;CAC1E,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,IAAI,CAAC,SAAS,CAC7D,CAAC,IAAI,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,YAAY,CAAC,EACxE;IACE,WAAW,EAAE,4DAA4D;CAC1E,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAAG,IAAI,CAAC,SAAS,CAChE,CAAC,IAAI,CAAC,IAAI,CAAC,0BAA0B,EAAE,CAAC,kBAAkB,CAAC,CAAC,EAAE,YAAY,CAAC,EAC3E;IACE,WAAW,EAAE,gDAAgD;CAC9D,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CACtC;IACE,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IAC3B,IAAI,EAAE,IAAI,CAAC,KAAK,CACd,IAAI,CAAC,KAAK,CAAC;QACT,iCAAiC;QACjC,iCAAiC;QACjC,oCAAoC;KACrC,CAAC,CACH;CACF,EACD;IACE,WAAW,EAAE,yCAAyC;CACvD,CACF,CAAC","sourcesContent":["import {\n FormatRegistry,\n Type,\n type SchemaOptions,\n type Static,\n} from \"@sinclair/typebox\";\nimport { yParityToV } from \"ox/Signature\";\nimport {\n toHex,\n slice,\n pad,\n concat,\n hexToBigInt,\n serializeSignature,\n hexToNumber,\n parseSignature,\n numberToHex,\n} 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 description: \"Present\",\n }),\n Type.Literal(\"0x\", {\n description: \"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 description: \"Present\",\n }),\n Type.Literal(\"0x\", {\n description: \"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 TypeEip7702UnsignedAuth = Type.Object({\n chainId: TypeHex(),\n address: TypeAddress,\n nonce: TypeHex(),\n});\n\nexport const TypeEip7702SignedAuth = Type.Intersect([\n TypeEip7702UnsignedAuth,\n Type.Object({\n r: TypeHex(),\n s: TypeHex(),\n yParity: TypeHex(),\n }),\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\", {\n description: \"Unknown factory type\",\n }),\n factoryData: TypeHex({}),\n },\n {\n description: \"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 description: \"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 description: \"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 description: \"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 description: \"Modular Account V2 SSV\",\n },\n ),\n Type.Object(\n {\n mav2type: Type.Literal(\"sma-b\"),\n initialOwner: TypeAddress,\n },\n {\n description: \"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 description: \"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\", { description: \"Light Account v1.0.1\" }),\n Type.Literal(\"LightAccountV1.0.2\", { description: \"Light Account v1.0.2\" }),\n Type.Literal(\"LightAccountV1.1.0\", { description: \"Light Account v1.1.0\" }),\n Type.Literal(\"LightAccountV2.0.0\", { description: \"Light Account v2.0.0\" }),\n Type.Literal(\"LightAccountV2.0.0-MultiOwner\", {\n description: \"Light Account v2.0.0 MultiOwner\",\n }),\n Type.Literal(\"MAv1.0.0-MultiOwner\", {\n description: \"Modular Account v1.0.0 MultiOwner\",\n }),\n Type.Literal(\"MAv1.0.0-MultiSig\", {\n description: \"Modular Account v1.0.0 MultiSig\",\n }),\n Type.Literal(\"MAv2.0.0-sma-b\", {\n description: \"Modular Account v2.0.0 SMA-B\",\n }),\n Type.Literal(\"MAv2.0.0-ma-ssv\", {\n description: \"Modular Account v2.0.0 SSV\",\n }),\n Type.Literal(\"MAv2.0.0-ma-webauthn\", {\n description: \"Modular Account v2.0.0 WebAuthn\",\n }),\n Type.Literal(\"unknown\", { description: \"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 description: \"Smart Contract Account\",\n },\n ),\n Type.Object(\n {\n type: Type.Literal(\"7702\"),\n implementationAddress: TypeAddress,\n },\n {\n description: \"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 description: \"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 description: \"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 TypeSignatureType = Type.Union([\n Type.Literal(\"secp256k1\", { description: \"Secp256k1\" }),\n Type.Literal(\"ecdsa\", { description: \"ECDSA (alias for secp256k1)\" }),\n Type.Literal(\"contract\", { description: \"Contract\" }),\n]);\nexport type TypeSignatureType = Static<typeof TypeSignatureType>;\n\nexport const KeySigner = Type.Object({\n type: TypeSignatureType,\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\nexport const TypePersonalSignSignatureRequest = Type.Object(\n {\n type: Type.Literal(\"personal_sign\"),\n data: Type.Union([\n Type.String({ minLength: 1, description: \"Message\" }),\n Type.Object(\n {\n raw: TypeHex(),\n },\n { description: \"Raw message\" },\n ),\n ]),\n },\n { description: \"Personal sign\" },\n);\n\nexport const TypeTypedDataSignatureRequest = Type.Object(\n {\n type: Type.Literal(\"eth_signTypedData_v4\"),\n data: TTypedDataDefinition,\n },\n {\n description: \"Typed data\",\n },\n);\n\nexport const TypeAuthorizationSignatureRequest = Type.Object({\n type: Type.Literal(\"eip7702Auth\"),\n});\n\nexport const TypeSignatureRequest = Type.Union([\n TypePersonalSignSignatureRequest,\n TypeTypedDataSignatureRequest,\n TypeAuthorizationSignatureRequest,\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\nexport const PreparedCall_UserOpV060 = Type.Object(\n {\n type: Type.Literal(\"user-operation-v060\", {\n description: \"User Operation (Entrypoint v0.6.0)\",\n }),\n data: Type.Omit(TypeUserOperationRequest_v6, [\"signature\"], {\n description: \"Unsigned User Operation (Entrypoint v0.6.0)\",\n }),\n chainId: TypeHex(),\n signatureRequest: Type.Union([\n TypePersonalSignSignatureRequest,\n TypeTypedDataSignatureRequest,\n ]),\n },\n {\n description: \"Prepared User Operation (Entrypoint v0.6.0)\",\n },\n);\n\nexport const PreparedCall_UserOpV070 = Type.Object(\n {\n type: Type.Literal(\"user-operation-v070\", {\n description: \"User Operation (Entrypoint v0.7.0)\",\n }),\n data: Type.Omit(TypeUserOperationRequest_v7, [\"signature\"], {\n description: \"Unsigned User Operation (Entrypoint v0.7.0)\",\n }),\n chainId: TypeHex(),\n signatureRequest: Type.Union([\n TypePersonalSignSignatureRequest,\n TypeTypedDataSignatureRequest,\n ]),\n },\n {\n description: \"Prepared User Operation (Entrypoint v0.7.0)\",\n },\n);\n\nexport const PreparedCall_Authorization = Type.Object(\n {\n type: Type.Literal(\"authorization\", {\n description: \"EIP-7702 Authorization Request\",\n }),\n data: Type.Omit(TypeEip7702UnsignedAuth, [\"chainId\"]),\n chainId: TypeHex(),\n signatureRequest: TypeAuthorizationSignatureRequest,\n },\n {\n description: \"Prepared EIP-7702 Authorization\",\n },\n);\n\nexport const TypeEdcsaSigData = Type.Union([\n TypeHex({\n description: \"Hex-encoded signature\",\n }),\n Type.Transform(\n Type.Object(\n {\n r: TypeHex(),\n s: TypeHex(),\n yParity: TypeHex(),\n },\n { description: \"r, s, yParity\" },\n ),\n )\n .Decode((sig) =>\n serializeSignature({ ...sig, yParity: hexToNumber(sig.yParity) }),\n )\n .Encode((hex) => {\n const parsed = parseSignature(hex);\n return {\n ...parsed,\n yParity: numberToHex(parsed.yParity),\n };\n }),\n Type.Transform(\n Type.Object(\n {\n r: TypeHex(),\n s: TypeHex(),\n v: TypeHex(),\n },\n {\n description: \"r, s, v\",\n },\n ),\n )\n .Decode((sig) => serializeSignature({ ...sig, v: hexToBigInt(sig.v) }))\n .Encode((hex) => {\n const parsed = parseSignature(hex);\n return {\n ...parsed,\n v: numberToHex(yParityToV(parsed.yParity)),\n };\n }),\n]);\n\nexport const TypeEcdsaSig = Type.Object({\n signature: Type.Union([\n Type.Object(\n {\n type: Type.Literal(\"secp256k1\"),\n data: TypeEdcsaSigData,\n },\n {\n description: \"Secp256k1 signature\",\n },\n ),\n Type.Object(\n {\n type: Type.Literal(\"ecdsa\"),\n data: TypeEdcsaSigData,\n },\n {\n description: \"ECDSA signature (alias for secp256k1)\",\n },\n ),\n ]),\n});\n\nexport const TypePrepareCall_UserOpV060_Signed = Type.Intersect(\n [Type.Omit(PreparedCall_UserOpV060, [\"signatureRequest\"]), TypeEcdsaSig],\n {\n description: \"Prepared User Operation (Entrypoint v0.6.0) with signature\",\n },\n);\n\nexport const TypePrepareCall_UserOpV070_Signed = Type.Intersect(\n [Type.Omit(PreparedCall_UserOpV070, [\"signatureRequest\"]), TypeEcdsaSig],\n {\n description: \"Prepared User Operation (Entrypoint v0.7.0) with signature\",\n },\n);\n\nexport const TypePrepareCall_Authorization_Signed = Type.Intersect(\n [Type.Omit(PreparedCall_Authorization, [\"signatureRequest\"]), TypeEcdsaSig],\n {\n description: \"Prepared EIP-7702 Authorization with signature\",\n },\n);\n\nexport const TypeCallArray = Type.Object(\n {\n type: Type.Literal(\"array\"),\n data: Type.Array(\n Type.Union([\n TypePrepareCall_UserOpV060_Signed,\n TypePrepareCall_UserOpV070_Signed,\n TypePrepareCall_Authorization_Signed,\n ]),\n ),\n },\n {\n description: \"Array of prepared calls with signatures\",\n },\n);\n"]}
@@ -33,3 +33,6 @@ export type InternalState = {
33
33
  export type InnerWalletApiClient = InnerWalletApiClientBase<InnerClientActions & {
34
34
  internal: InternalState;
35
35
  }>;
36
+ export type WithoutChainId<T> = T extends {
37
+ chainId: Hex;
38
+ } ? Omit<T, "chainId"> : T;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SmartAccountSigner, SmartContractAccount } from \"@aa-sdk/core\";\nimport type { AlchemyTransport } from \"@account-kit/infra\";\nimport type {\n Address,\n Chain,\n Client,\n Hex,\n JsonRpcAccount,\n Transport,\n} from \"viem\";\nimport type {\n GrantPermissionsParams,\n GrantPermissionsResult,\n} from \"./client/actions/grantPermissions.ts\";\nimport type { RequestAccountParams } from \"./client/actions/requestAccount.ts\";\nimport type { WalletServerViemRpcSchema } from \"./rpc/schema.ts\";\n\nexport type CreateInnerClientParams<\n TAccount extends Address | undefined = Address | undefined,\n> = {\n chain: Chain;\n transport: AlchemyTransport;\n policyId?: string;\n account?: TAccount | Address | undefined;\n};\n\nexport type InnerWalletApiClientBase<\n TExtend extends { [key: string]: unknown } | undefined =\n | { [key: string]: unknown }\n | undefined,\n> = Client<\n Transport,\n Chain,\n JsonRpcAccount<Address> | undefined,\n WalletServerViemRpcSchema,\n { policyId?: string } & TExtend\n>;\n\nexport type InnerClientActions = {\n grantPermissions: (\n signer: SmartAccountSigner,\n params: GrantPermissionsParams & { chainId: Hex },\n ) => Promise<GrantPermissionsResult>;\n};\n\nexport type CachedAccount = {\n account: SmartContractAccount;\n requestParams: RequestAccountParams;\n};\n\nexport type InternalState = {\n setAccount: (account: CachedAccount) => void;\n getAccount: () => CachedAccount | undefined;\n};\n\nexport type InnerWalletApiClient = InnerWalletApiClientBase<\n InnerClientActions & { internal: InternalState }\n>;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SmartAccountSigner, SmartContractAccount } from \"@aa-sdk/core\";\nimport type { AlchemyTransport } from \"@account-kit/infra\";\nimport type {\n Address,\n Chain,\n Client,\n Hex,\n JsonRpcAccount,\n Transport,\n} from \"viem\";\nimport type {\n GrantPermissionsParams,\n GrantPermissionsResult,\n} from \"./client/actions/grantPermissions.ts\";\nimport type { RequestAccountParams } from \"./client/actions/requestAccount.ts\";\nimport type { WalletServerViemRpcSchema } from \"./rpc/schema.ts\";\n\nexport type CreateInnerClientParams<\n TAccount extends Address | undefined = Address | undefined,\n> = {\n chain: Chain;\n transport: AlchemyTransport;\n policyId?: string;\n account?: TAccount | Address | undefined;\n};\n\nexport type InnerWalletApiClientBase<\n TExtend extends { [key: string]: unknown } | undefined =\n | { [key: string]: unknown }\n | undefined,\n> = Client<\n Transport,\n Chain,\n JsonRpcAccount<Address> | undefined,\n WalletServerViemRpcSchema,\n { policyId?: string } & TExtend\n>;\n\nexport type InnerClientActions = {\n grantPermissions: (\n signer: SmartAccountSigner,\n params: GrantPermissionsParams & { chainId: Hex },\n ) => Promise<GrantPermissionsResult>;\n};\n\nexport type CachedAccount = {\n account: SmartContractAccount;\n requestParams: RequestAccountParams;\n};\n\nexport type InternalState = {\n setAccount: (account: CachedAccount) => void;\n getAccount: () => CachedAccount | undefined;\n};\n\nexport type InnerWalletApiClient = InnerWalletApiClientBase<\n InnerClientActions & { internal: InternalState }\n>;\n\nexport type WithoutChainId<T> = T extends { chainId: Hex }\n ? Omit<T, \"chainId\">\n : T;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"eip7702Auth.d.ts","sourceRoot":"","sources":["../../../src/capabilities/eip7702Auth.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,qBAAqB;;;gDAWhC,CAAC"}
1
+ {"version":3,"file":"eip7702Auth.d.ts","sourceRoot":"","sources":["../../../src/capabilities/eip7702Auth.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,qBAAqB;;;gDAkBhC,CAAC"}
@@ -90,7 +90,7 @@ export declare const RemotePermission: TObject<{
90
90
  }>;
91
91
  export declare const PermissionsData: TObject<{
92
92
  chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
93
- expiry: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
93
+ expirySec: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
94
94
  key: TObject<{
95
95
  type: import("@sinclair/typebox").TUnion<[TLiteral<"secp256k1">, TLiteral<"ecdsa">, TLiteral<"contract">]>;
96
96
  publicKey: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
@@ -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;;EAO9B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;EAQ5B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK1B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;IAKhC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU1B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;IAKhC,CAAC"}
@@ -1,8 +1,6 @@
1
1
  import { type SmartAccountSigner } from "@aa-sdk/core";
2
- import type { Static } from "@sinclair/typebox";
3
2
  import { type Address, type Hex, type IsUndefined } from "viem";
4
3
  import type { CreateSessionParams } from "../../isomorphic/actions/createSession.ts";
5
- import { TypeEip7702AuthExtendedFields } from "../../schemas.js";
6
4
  import type { InnerWalletApiClient } from "../../types.ts";
7
5
  export type GrantPermissionsParams<TAccount extends Address | undefined = Address | undefined> = Omit<CreateSessionParams, "account" | "chainId"> & (IsUndefined<TAccount> extends true ? {
8
6
  account: Address;
@@ -11,7 +9,6 @@ export type GrantPermissionsParams<TAccount extends Address | undefined = Addres
11
9
  });
12
10
  export type GrantPermissionsResult = {
13
11
  context: Hex;
14
- signedAuthorization?: Static<typeof TypeEip7702AuthExtendedFields>;
15
12
  };
16
13
  /**
17
14
  * Grants permissions to a smart account by creating a session.
@@ -21,14 +18,13 @@ export type GrantPermissionsResult = {
21
18
  * @param {SmartAccountSigner} signer - The signer of the smart account
22
19
  * @param {GrantPermissionsParams} params - The parameters for granting permissions
23
20
  * @param {Address} [params.account] - The account address (required if client was not initialized with an account)
24
- * @param {number} params.expiry - Unix timestamp when the permissions expire
21
+ * @param {number} params.expirySec - Unix timestamp when the permissions expire
25
22
  * @param {object} params.key - The session key information
26
23
  * @param {string} params.key.publicKey - The public key of the session key
27
24
  * @param {string} params.key.type - The type of the key (e.g., "secp256k1")
28
25
  * @param {Array} params.permissions - Array of permission objects defining what the session key can do
29
26
  * @returns {Promise<GrantPermissionsResult>} A Promise that resolves to the result containing a context identifier
30
27
  * @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
32
28
  *
33
29
  * @example
34
30
  * // Create a session key and grant root permissions
@@ -46,7 +42,7 @@ export type GrantPermissionsResult = {
46
42
  * });
47
43
  *
48
44
  * // Use the permissions to prepare a call
49
- * const preparedCall = await client.prepareCalls({
45
+ * const preparedCalls = await client.prepareCalls({
50
46
  * calls: [{ to: zeroAddress, value: "0x0" }],
51
47
  * from: account.address,
52
48
  * capabilities: {
@@ -58,65 +54,14 @@ export type GrantPermissionsResult = {
58
54
  * });
59
55
  *
60
56
  * // Sign with the session key
61
- * const signature = await signSignatureRequest(
57
+ * const signedCalls = await client.signPreparedCalls(
62
58
  * sessionKey,
63
- * preparedCall.signatureRequest,
59
+ * preparedCalls,
64
60
  * );
65
61
  *
66
62
  * // Send the prepared call using the session key
67
63
  * const result = await client.sendPreparedCalls({
68
- * ...preparedCall,
69
- * signature,
70
- * capabilities: {
71
- * permissions,
72
- * },
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,
64
+ * ...signedCalls,
120
65
  * capabilities: {
121
66
  * permissions,
122
67
  * },
@@ -1 +1 @@
1
- {"version":3,"file":"grantPermissions.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/grantPermissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,WAAW,EAAS,MAAM,MAAM,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,MAAM,MAAM,sBAAsB,CAChC,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,IACxD,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,SAAS,CAAC,GAClD,CAAC,WAAW,CAAC,QAAQ,CAAC,SAAS,IAAI,GAC/B;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GACpB;IAAE,OAAO,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC;AAE3B,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,GAAG,CAAC;IACb,mBAAmB,CAAC,EAAE,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAC;CACpE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4GG;AACH,wBAAsB,gBAAgB,CACpC,QAAQ,SAAS,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,EAE1D,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,k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