@account-kit/wallet-client 0.1.0-alpha.6 → 0.1.0-alpha.8
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.
- package/dist/esm/client/actions/prepareCalls.d.ts +1 -1
- package/dist/esm/client/actions/prepareCalls.js +1 -1
- package/dist/esm/client/actions/prepareCalls.js.map +1 -1
- package/dist/esm/client/actions/requestAccount.js +5 -2
- package/dist/esm/client/actions/requestAccount.js.map +1 -1
- package/dist/esm/client/actions/signPreparedCalls.js +2 -1
- package/dist/esm/client/actions/signPreparedCalls.js.map +1 -1
- package/dist/esm/client/actions/signSignatureRequest.d.ts +3 -2
- package/dist/esm/client/actions/signSignatureRequest.js.map +1 -1
- package/dist/esm/client/client.e2e-test.js +53 -0
- package/dist/esm/client/client.e2e-test.js.map +1 -1
- package/dist/esm/isomorphic/actions/createSession.js +11 -2
- package/dist/esm/isomorphic/actions/createSession.js.map +1 -1
- package/dist/esm/isomorphic/actions/prepareCalls.js +21 -14
- package/dist/esm/isomorphic/actions/prepareCalls.js.map +1 -1
- package/dist/esm/isomorphic/actions/sendPreparedCalls.js +53 -8
- package/dist/esm/isomorphic/actions/sendPreparedCalls.js.map +1 -1
- package/dist/esm/isomorphic/client.d.ts +9 -0
- package/dist/esm/isomorphic/utils/7702.js +21 -8
- package/dist/esm/isomorphic/utils/7702.js.map +1 -1
- package/dist/esm/isomorphic/utils/createAccount.js +73 -33
- package/dist/esm/isomorphic/utils/createAccount.js.map +1 -1
- package/dist/esm/isomorphic/utils/supportsFeature.d.ts +4 -0
- package/dist/esm/isomorphic/utils/supportsFeature.js +21 -0
- package/dist/esm/isomorphic/utils/supportsFeature.js.map +1 -0
- package/dist/esm/rpc/request.d.ts +12 -2
- package/dist/esm/rpc/schema.d.ts +12 -2
- package/dist/esm/schemas.d.ts +16 -1
- package/dist/esm/schemas.js +12 -1
- package/dist/esm/schemas.js.map +1 -1
- package/dist/esm/types.d.ts +3 -0
- package/dist/esm/types.js.map +1 -1
- package/dist/types/client/actions/prepareCalls.d.ts +1 -1
- package/dist/types/client/actions/requestAccount.d.ts.map +1 -1
- package/dist/types/client/actions/signPreparedCalls.d.ts.map +1 -1
- package/dist/types/client/actions/signSignatureRequest.d.ts +3 -2
- package/dist/types/client/actions/signSignatureRequest.d.ts.map +1 -1
- package/dist/types/isomorphic/actions/createSession.d.ts.map +1 -1
- package/dist/types/isomorphic/actions/prepareCalls.d.ts.map +1 -1
- package/dist/types/isomorphic/actions/sendPreparedCalls.d.ts.map +1 -1
- package/dist/types/isomorphic/client.d.ts +9 -0
- package/dist/types/isomorphic/client.d.ts.map +1 -1
- package/dist/types/isomorphic/utils/7702.d.ts.map +1 -1
- package/dist/types/isomorphic/utils/createAccount.d.ts.map +1 -1
- package/dist/types/isomorphic/utils/supportsFeature.d.ts +5 -0
- package/dist/types/isomorphic/utils/supportsFeature.d.ts.map +1 -0
- package/dist/types/rpc/request.d.ts +12 -2
- package/dist/types/rpc/request.d.ts.map +1 -1
- package/dist/types/rpc/schema.d.ts +12 -2
- package/dist/types/rpc/schema.d.ts.map +1 -1
- package/dist/types/schemas.d.ts +16 -1
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/types.d.ts +3 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/client/actions/prepareCalls.ts +1 -1
- package/src/client/actions/requestAccount.ts +10 -8
- package/src/client/actions/signPreparedCalls.ts +2 -1
- package/src/client/actions/signSignatureRequest.ts +4 -2
- package/src/client/client.e2e-test.ts +71 -0
- package/src/isomorphic/actions/createSession.ts +14 -1
- package/src/isomorphic/actions/prepareCalls.ts +22 -13
- package/src/isomorphic/actions/sendPreparedCalls.ts +59 -9
- package/src/isomorphic/utils/7702.ts +25 -9
- package/src/isomorphic/utils/createAccount.ts +81 -34
- package/src/isomorphic/utils/supportsFeature.ts +34 -0
- package/src/schemas.ts +20 -1
- package/src/types.ts +4 -0
package/dist/esm/schemas.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { type SchemaOptions, type Static } from "@sinclair/typebox";
|
|
2
|
+
export declare const baseAccountTypes: readonly ["sma-b", "la-v2", "la-v1.0.1", "la-v1.0.2", "la-v1.1.0"];
|
|
3
|
+
export type BaseAccountType = (typeof baseAccountTypes)[number];
|
|
4
|
+
export declare const accountTypes: readonly ["sma-b", "la-v2", "la-v1.0.1", "la-v1.0.2", "la-v1.1.0", "7702"];
|
|
5
|
+
export type AccountType = (typeof accountTypes)[number];
|
|
2
6
|
export declare const TypeHex: (options?: SchemaOptions) => import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
3
7
|
export declare const TypeAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
4
8
|
export declare const TypeUuid: import("@sinclair/typebox").TString;
|
|
@@ -141,7 +145,7 @@ export declare const TypeCounterfactualInfo: import("@sinclair/typebox").TInters
|
|
|
141
145
|
}>]>]>;
|
|
142
146
|
export type TypeCounterfactualInfo = Static<typeof TypeCounterfactualInfo>;
|
|
143
147
|
export declare const TypeCreationOptions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
144
|
-
accountType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"sma-b">>;
|
|
148
|
+
accountType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"sma-b" | "la-v2" | "la-v1.0.1" | "la-v1.0.2" | "la-v1.1.0">[]>>;
|
|
145
149
|
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
146
150
|
}>, import("@sinclair/typebox").TObject<{
|
|
147
151
|
accountType: import("@sinclair/typebox").TLiteral<"7702">;
|
|
@@ -193,6 +197,7 @@ export declare const TypePersonalSignSignatureRequest: import("@sinclair/typebox
|
|
|
193
197
|
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
194
198
|
raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
195
199
|
}>]>;
|
|
200
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
196
201
|
}>;
|
|
197
202
|
export declare const TypeTypedDataSignatureRequest: import("@sinclair/typebox").TObject<{
|
|
198
203
|
type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
|
|
@@ -229,15 +234,18 @@ export declare const TypeTypedDataSignatureRequest: import("@sinclair/typebox").
|
|
|
229
234
|
[x: string]: unknown;
|
|
230
235
|
};
|
|
231
236
|
}>;
|
|
237
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
232
238
|
}>;
|
|
233
239
|
export declare const TypeAuthorizationSignatureRequest: import("@sinclair/typebox").TObject<{
|
|
234
240
|
type: import("@sinclair/typebox").TLiteral<"eip7702Auth">;
|
|
241
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
235
242
|
}>;
|
|
236
243
|
export declare const TypeSignatureRequest: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
237
244
|
type: import("@sinclair/typebox").TLiteral<"personal_sign">;
|
|
238
245
|
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
239
246
|
raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
240
247
|
}>]>;
|
|
248
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
241
249
|
}>, import("@sinclair/typebox").TObject<{
|
|
242
250
|
type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
|
|
243
251
|
data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
|
|
@@ -273,8 +281,10 @@ export declare const TypeSignatureRequest: import("@sinclair/typebox").TUnion<[i
|
|
|
273
281
|
[x: string]: unknown;
|
|
274
282
|
};
|
|
275
283
|
}>;
|
|
284
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
276
285
|
}>, import("@sinclair/typebox").TObject<{
|
|
277
286
|
type: import("@sinclair/typebox").TLiteral<"eip7702Auth">;
|
|
287
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
278
288
|
}>]>;
|
|
279
289
|
export declare const TypeCallId: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, {
|
|
280
290
|
chainId: `0x${string}`;
|
|
@@ -300,6 +310,7 @@ export declare const PreparedCall_UserOpV060: import("@sinclair/typebox").TObjec
|
|
|
300
310
|
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
301
311
|
raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
302
312
|
}>]>;
|
|
313
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
303
314
|
}>, import("@sinclair/typebox").TObject<{
|
|
304
315
|
type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
|
|
305
316
|
data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
|
|
@@ -335,6 +346,7 @@ export declare const PreparedCall_UserOpV060: import("@sinclair/typebox").TObjec
|
|
|
335
346
|
[x: string]: unknown;
|
|
336
347
|
};
|
|
337
348
|
}>;
|
|
349
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
338
350
|
}>]>;
|
|
339
351
|
}>;
|
|
340
352
|
export declare const PreparedCall_UserOpV070: import("@sinclair/typebox").TObject<{
|
|
@@ -361,6 +373,7 @@ export declare const PreparedCall_UserOpV070: import("@sinclair/typebox").TObjec
|
|
|
361
373
|
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
362
374
|
raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
363
375
|
}>]>;
|
|
376
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
364
377
|
}>, import("@sinclair/typebox").TObject<{
|
|
365
378
|
type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
|
|
366
379
|
data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
|
|
@@ -396,6 +409,7 @@ export declare const PreparedCall_UserOpV070: import("@sinclair/typebox").TObjec
|
|
|
396
409
|
[x: string]: unknown;
|
|
397
410
|
};
|
|
398
411
|
}>;
|
|
412
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
399
413
|
}>]>;
|
|
400
414
|
}>;
|
|
401
415
|
export declare const PreparedCall_Authorization: import("@sinclair/typebox").TObject<{
|
|
@@ -407,6 +421,7 @@ export declare const PreparedCall_Authorization: import("@sinclair/typebox").TOb
|
|
|
407
421
|
chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
408
422
|
signatureRequest: import("@sinclair/typebox").TObject<{
|
|
409
423
|
type: import("@sinclair/typebox").TLiteral<"eip7702Auth">;
|
|
424
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
410
425
|
}>;
|
|
411
426
|
}>;
|
|
412
427
|
export declare const TypeEdcsaSigData: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">, import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
|
package/dist/esm/schemas.js
CHANGED
|
@@ -5,6 +5,14 @@ const UUID_V4_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[
|
|
|
5
5
|
FormatRegistry.Set("uuid", (value) => UUID_V4_REGEX.test(value));
|
|
6
6
|
const BASE_64_URL_REGEX = /^[A-Za-z0-9_-]+$/; // Matches base64url encoded strings (without padding)
|
|
7
7
|
FormatRegistry.Set("base64url", (value) => BASE_64_URL_REGEX.test(value));
|
|
8
|
+
export const baseAccountTypes = [
|
|
9
|
+
"sma-b",
|
|
10
|
+
"la-v2",
|
|
11
|
+
"la-v1.0.1",
|
|
12
|
+
"la-v1.0.2",
|
|
13
|
+
"la-v1.1.0",
|
|
14
|
+
];
|
|
15
|
+
export const accountTypes = [...baseAccountTypes, "7702"];
|
|
8
16
|
export const TypeHex = (options) => Type.TemplateLiteral("0x${string}", {
|
|
9
17
|
...options,
|
|
10
18
|
});
|
|
@@ -207,7 +215,7 @@ export const TypeCounterfactualInfo = Type.Intersect([
|
|
|
207
215
|
export const TypeCreationOptions = Type.Optional(Type.Union([
|
|
208
216
|
Type.Object({
|
|
209
217
|
// Optional b/c `sma-b` is the default if no accountType is specified.
|
|
210
|
-
accountType: Type.Optional(Type.Literal(
|
|
218
|
+
accountType: Type.Optional(Type.Union(baseAccountTypes.map((lit) => Type.Literal(lit)))),
|
|
211
219
|
salt: Type.Optional(TypeHex()),
|
|
212
220
|
}, {
|
|
213
221
|
description: "SMA-B account type",
|
|
@@ -271,15 +279,18 @@ export const TypePersonalSignSignatureRequest = Type.Object({
|
|
|
271
279
|
raw: TypeHex(),
|
|
272
280
|
}, { description: "Raw message" }),
|
|
273
281
|
]),
|
|
282
|
+
rawPayload: TypeHex(),
|
|
274
283
|
}, { description: "Personal sign" });
|
|
275
284
|
export const TypeTypedDataSignatureRequest = Type.Object({
|
|
276
285
|
type: Type.Literal("eth_signTypedData_v4"),
|
|
277
286
|
data: TTypedDataDefinition,
|
|
287
|
+
rawPayload: TypeHex(),
|
|
278
288
|
}, {
|
|
279
289
|
description: "Typed data",
|
|
280
290
|
});
|
|
281
291
|
export const TypeAuthorizationSignatureRequest = Type.Object({
|
|
282
292
|
type: Type.Literal("eip7702Auth"),
|
|
293
|
+
rawPayload: TypeHex(),
|
|
283
294
|
});
|
|
284
295
|
export const TypeSignatureRequest = Type.Union([
|
|
285
296
|
TypePersonalSignSignatureRequest,
|
package/dist/esm/schemas.js.map
CHANGED
|
@@ -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,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,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,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAE1E,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,OAAuB,EAAE,EAAE,CACjD,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE;IAClC,GAAG,OAAO;CACX,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AAEnE,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC;IAClC,MAAM,EAAE,MAAM;CACf,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC,MAAM,CAAC;IACpD,MAAM,EAAE,WAAW;CACpB,CAAC,CA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AoC,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"]}
|
|
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,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,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAE1E,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,OAAO;IACP,OAAO;IACP,WAAW;IACX,WAAW;IACX,WAAW;CACH,CAAC;AAIX,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAG,gBAAgB,EAAE,MAAM,CAAU,CAAC;AAInE,MAAM,CAAC,MAA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M,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 baseAccountTypes = [\n \"sma-b\",\n \"la-v2\",\n \"la-v1.0.1\",\n \"la-v1.0.2\",\n \"la-v1.1.0\",\n] as const;\n\nexport type BaseAccountType = (typeof baseAccountTypes)[number];\n\nexport const accountTypes = [...baseAccountTypes, \"7702\"] as const;\n\nexport type AccountType = (typeof accountTypes)[number];\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(\n Type.Union(baseAccountTypes.map((lit) => Type.Literal(lit))),\n ),\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 rawPayload: TypeHex(),\n },\n { description: \"Personal sign\" },\n);\n\nexport const TypeTypedDataSignatureRequest = Type.Object(\n {\n type: Type.Literal(\"eth_signTypedData_v4\"),\n data: TTypedDataDefinition,\n rawPayload: TypeHex(),\n },\n {\n description: \"Typed data\",\n },\n);\n\nexport const TypeAuthorizationSignatureRequest = Type.Object({\n type: Type.Literal(\"eip7702Auth\"),\n rawPayload: TypeHex(),\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"]}
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -36,3 +36,6 @@ export type InnerWalletApiClient = InnerWalletApiClientBase<InnerClientActions &
|
|
|
36
36
|
export type WithoutChainId<T> = T extends {
|
|
37
37
|
chainId: Hex;
|
|
38
38
|
} ? Omit<T, "chainId"> : T;
|
|
39
|
+
export type WithoutRawPayload<T> = T extends {
|
|
40
|
+
rawPayload: Hex;
|
|
41
|
+
} ? Omit<T, "rawPayload"> : T;
|
package/dist/esm/types.js.map
CHANGED
|
@@ -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\nexport type WithoutChainId<T> = T extends { chainId: Hex }\n ? Omit<T, \"chainId\">\n : T;\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\nexport type WithoutRawPayload<T> = T extends { rawPayload: Hex }\n ? Omit<T, \"rawPayload\">\n : T;\n"]}
|
|
@@ -26,7 +26,7 @@ export type PrepareCallsResult = IsomorphicPrepareCallsResult;
|
|
|
26
26
|
* the user operation data and signature request
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
|
-
* // Prepare a
|
|
29
|
+
* // Prepare a sponsored user operation call
|
|
30
30
|
* const result = await client.prepareCalls({
|
|
31
31
|
* calls: [{
|
|
32
32
|
* to: "0x1234...",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestAccount.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/requestAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,OAAO,CACL,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC5D;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE,CAC3B,EACD,eAAe,GAAG,2BAA2B,CAC9C,GAAG;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjC,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAExD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,kBAAkB,EAC1B,MAAM,CAAC,EAAE,oBAAoB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,
|
|
1
|
+
{"version":3,"file":"requestAccount.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/requestAccount.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACrC,OAAO,CACL,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAC5D;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE,CAC3B,EACD,eAAe,GAAG,2BAA2B,CAC9C,GAAG;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEjC,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAExD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,oBAAoB,EAC5B,MAAM,EAAE,kBAAkB,EAC1B,MAAM,CAAC,EAAE,oBAAoB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CA4C/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signPreparedCalls.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signPreparedCalls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAGhE,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,CAAC;AAEzD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,CAAC,OAAO,wBAAwB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CACnF,CAAC,CAAC,CAAC,CAAC;AAEL;;;;;;IAMI;AACJ,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,uBAAuB,CAAC,
|
|
1
|
+
{"version":3,"file":"signPreparedCalls.d.ts","sourceRoot":"","sources":["../../../../src/client/actions/signPreparedCalls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAGhE,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,CAAC;AAEzD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAC1C,CAAC,OAAO,wBAAwB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CACnF,CAAC,CAAC,CAAC,CAAC;AAEL;;;;;;IAMI;AACJ,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,uBAAuB,CAAC,CAgDlC"}
|
|
@@ -3,9 +3,10 @@ import type { Static } from "@sinclair/typebox";
|
|
|
3
3
|
import { type Hex } from "viem";
|
|
4
4
|
import { TypeAuthorizationSignatureRequest, TypePersonalSignSignatureRequest, TypeTypedDataSignatureRequest } from "../../schemas.js";
|
|
5
5
|
import { TypeEip7702UnsignedAuth } from "../../schemas.js";
|
|
6
|
-
|
|
6
|
+
import type { WithoutRawPayload } from "../../types.ts";
|
|
7
|
+
export type SignSignatureRequestParams = WithoutRawPayload<Static<typeof TypePersonalSignSignatureRequest> | Static<typeof TypeTypedDataSignatureRequest> | (Static<typeof TypeAuthorizationSignatureRequest> & {
|
|
7
8
|
data: Static<typeof TypeEip7702UnsignedAuth>;
|
|
8
|
-
})
|
|
9
|
+
})>;
|
|
9
10
|
export type SignSignatureRequestResult = {
|
|
10
11
|
type: "secp256k1";
|
|
11
12
|
data: Hex;
|
|
@@ -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,EAAmC,MAAM,MAAM,CAAC;AAEjE,OAAO,EACL,iCAAiC,EACjC,gCAAgC,EAChC,6BAA6B,EAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,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,EAAmC,MAAM,MAAM,CAAC;AAEjE,OAAO,EACL,iCAAiC,EACjC,gCAAgC,EAChC,6BAA6B,EAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CACtD,MAAM,CAAC,OAAO,gCAAgC,CAAC,GAC/C,MAAM,CAAC,OAAO,6BAA6B,CAAC,GAC5C,CAAC,MAAM,CAAC,OAAO,iCAAiC,CAAC,GAAG;IAClD,IAAI,EAAE,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;CAC9C,CAAC,CACL,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,GAAG,CAAC;CACX,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,0BAA0B,CAAC,CAoCrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSession.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/createSession.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,
|
|
1
|
+
{"version":3,"file":"createSession.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/createSession.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAML,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,SAAS,EACf,MAAM,MAAM,CAAC;AAId,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAKrE,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,MAAM,CACJ,CAAC,OAAO,oBAAoB,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC,CAC/E,CAAC,CAAC,CAAC,EACJ,SAAS,CACV,GAAG;IACF,QAAQ,CAAC,EAAE,GAAG,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,MAAM,CAAC,CAAC,OAAO,oBAAoB,CAAC,CAAC,YAAY,CAAC,CAAC,YAAY,CAAC,CAAC,EACjE,WAAW,CACZ,GAAG;IACF,SAAS,EAAE,GAAG,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,GAAG,CAAC;IACd,oCAAoC,EAAE,GAAG,CAAC;CAC3C,CAAC;AAEF,wBAAsB,aAAa,CACjC,MAAM,EAAE,kBAAkB,CACxB,SAAS,EACT,KAAK,EACL,oBAAoB,GAAG,SAAS,EAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,yBAAyB,CAC1B,EACD,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC,CA6F9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareCalls.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/prepareCalls.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,
|
|
1
|
+
{"version":3,"file":"prepareCalls.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/actions/prepareCalls.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAML,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BAAkB,CACxB,SAAS,EACT,KAAK,EACL,oBAAoB,GAAG,SAAS,EAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,yBAAyB,CAC1B,EACD,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,uBAAuB,CAAC,CA8KlC"}
|
|
@@ -50,11 +50,13 @@ export declare function isomorphicClientActions(client: SmartAccountClient<Trans
|
|
|
50
50
|
[x: string]: unknown;
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
+
rawPayload: `0x${string}`;
|
|
53
54
|
} | {
|
|
54
55
|
type: "personal_sign";
|
|
55
56
|
data: string | {
|
|
56
57
|
raw: `0x${string}`;
|
|
57
58
|
};
|
|
59
|
+
rawPayload: `0x${string}`;
|
|
58
60
|
};
|
|
59
61
|
} | {
|
|
60
62
|
type: "user-operation-v070";
|
|
@@ -96,11 +98,13 @@ export declare function isomorphicClientActions(client: SmartAccountClient<Trans
|
|
|
96
98
|
[x: string]: unknown;
|
|
97
99
|
};
|
|
98
100
|
};
|
|
101
|
+
rawPayload: `0x${string}`;
|
|
99
102
|
} | {
|
|
100
103
|
type: "personal_sign";
|
|
101
104
|
data: string | {
|
|
102
105
|
raw: `0x${string}`;
|
|
103
106
|
};
|
|
107
|
+
rawPayload: `0x${string}`;
|
|
104
108
|
};
|
|
105
109
|
} | {
|
|
106
110
|
type: "authorization";
|
|
@@ -111,6 +115,7 @@ export declare function isomorphicClientActions(client: SmartAccountClient<Trans
|
|
|
111
115
|
};
|
|
112
116
|
signatureRequest: {
|
|
113
117
|
type: "eip7702Auth";
|
|
118
|
+
rawPayload: `0x${string}`;
|
|
114
119
|
};
|
|
115
120
|
})[];
|
|
116
121
|
} | {
|
|
@@ -149,11 +154,13 @@ export declare function isomorphicClientActions(client: SmartAccountClient<Trans
|
|
|
149
154
|
[x: string]: unknown;
|
|
150
155
|
};
|
|
151
156
|
};
|
|
157
|
+
rawPayload: `0x${string}`;
|
|
152
158
|
} | {
|
|
153
159
|
type: "personal_sign";
|
|
154
160
|
data: string | {
|
|
155
161
|
raw: `0x${string}`;
|
|
156
162
|
};
|
|
163
|
+
rawPayload: `0x${string}`;
|
|
157
164
|
};
|
|
158
165
|
} | {
|
|
159
166
|
type: "user-operation-v070";
|
|
@@ -195,11 +202,13 @@ export declare function isomorphicClientActions(client: SmartAccountClient<Trans
|
|
|
195
202
|
[x: string]: unknown;
|
|
196
203
|
};
|
|
197
204
|
};
|
|
205
|
+
rawPayload: `0x${string}`;
|
|
198
206
|
} | {
|
|
199
207
|
type: "personal_sign";
|
|
200
208
|
data: string | {
|
|
201
209
|
raw: `0x${string}`;
|
|
202
210
|
};
|
|
211
|
+
rawPayload: `0x${string}`;
|
|
203
212
|
};
|
|
204
213
|
}>;
|
|
205
214
|
sendPreparedCalls: (params: SendPreparedCallsParams) => Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/isomorphic/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AAOtB,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,SAAS,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,gCAAgC,CAAC;AAGxC,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCACb,uBAAuB;;;6BAE1B,oBAAoB;;;;;;;;;;;;;;;;;;4BAErB,mBAAmB;EAG9C;AAID,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,SAAS,EACT,QAAQ,EACR,oBAA2B,GAC5B,EAAE,YAAY,GAAG,kBAAkB,CAClC,SAAS,EACT,KAAK,EACL,oBAAoB,GAAG,SAAS,EAChC,UAAU,CAAC,OAAO,uBAAuB,CAAC,EAC1C,yBAAyB,GAAG,2BAA2B,CACxD,CAmBA;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"7702.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/utils/7702.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"7702.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/utils/7702.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,SAAS,EAGf,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIhD,eAAO,MAAM,0BAA0B,GACrC,QAAQ,kBAAkB,CACxB,SAAS,EACT,KAAK,EACL,oBAAoB,GAAG,SAAS,EAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,yBAAyB,CAC1B,EACD,QAAQ;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,KAChD,OAAO,CAAC,MAAM,CAAC,OAAO,0BAA0B,CAAC,GAAG,SAAS,CA2B/D,CAAC;AAEF,eAAO,MAAM,qBAAqB,+BAAgC,CAAC;AAEnE,KAAK,wBAAwB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAgBvE,eAAO,MAAM,8BAA8B,gDAE1C,CAAC;AAEF,eAAO,MAAM,gCAAgC,GAAI,SAAS,OAAO,KAAG,OAEnE,CAAC;AAEF,eAAO,MAAM,sCAAsC,GACjD,SAAS,OAAO,KACf,wBAAwB,GAAG,SAE7B,CAAC;AAWF,eAAO,MAAM,eAAe,GAC1B,uBAAuB,MAAM,CAAC,OAAO,qBAAqB,CAAC,iDAS5D,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,aAAa,OAAO,EACpB,uBAAuB,MAAM,CAAC,OAAO,qBAAqB,CAAC,GAAG,SAAS,SAqBxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAccount.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/utils/createAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,
|
|
1
|
+
{"version":3,"file":"createAccount.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/utils/createAccount.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAI/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAGhF,KAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,YAAY,CAAC,OAAO,sBAAsB,CAAC,CAAC;IACjE,WAAW,CAAC,EAAE,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC;IACzD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,oBAAoB,CAAC,CAiG/B;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,IAAI,gBAAgB,CAE7B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StaticDecode } from "@sinclair/typebox";
|
|
2
|
+
import type { TypeSerializedInitcode } from "../../schemas.ts";
|
|
3
|
+
export type Feature = "permissions";
|
|
4
|
+
export declare function supportsFeature(counterfactualInfo: StaticDecode<typeof TypeSerializedInitcode>, feature: Feature): boolean;
|
|
5
|
+
//# sourceMappingURL=supportsFeature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supportsFeature.d.ts","sourceRoot":"","sources":["../../../../src/isomorphic/utils/supportsFeature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,MAAM,MAAM,OAAO,GAAG,aAAa,CAAC;AAkBpC,wBAAgB,eAAe,CAC7B,kBAAkB,EAAE,YAAY,CAAC,OAAO,sBAAsB,CAAC,EAC/D,OAAO,EAAE,OAAO,GACf,OAAO,CAST"}
|
|
@@ -287,6 +287,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
287
287
|
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
288
288
|
raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
289
289
|
}>]>;
|
|
290
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
290
291
|
}>, import("@sinclair/typebox").TObject<{
|
|
291
292
|
type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
|
|
292
293
|
data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
|
|
@@ -322,6 +323,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
322
323
|
[x: string]: unknown;
|
|
323
324
|
};
|
|
324
325
|
}>;
|
|
326
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
325
327
|
}>]>;
|
|
326
328
|
}>, import("@sinclair/typebox").TObject<{
|
|
327
329
|
type: import("@sinclair/typebox").TLiteral<"user-operation-v070">;
|
|
@@ -347,6 +349,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
347
349
|
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
348
350
|
raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
349
351
|
}>]>;
|
|
352
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
350
353
|
}>, import("@sinclair/typebox").TObject<{
|
|
351
354
|
type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
|
|
352
355
|
data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
|
|
@@ -382,6 +385,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
382
385
|
[x: string]: unknown;
|
|
383
386
|
};
|
|
384
387
|
}>;
|
|
388
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
385
389
|
}>]>;
|
|
386
390
|
}>, import("@sinclair/typebox").TObject<{
|
|
387
391
|
type: import("@sinclair/typebox").TLiteral<"authorization">;
|
|
@@ -392,6 +396,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
392
396
|
chainId: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
393
397
|
signatureRequest: import("@sinclair/typebox").TObject<{
|
|
394
398
|
type: import("@sinclair/typebox").TLiteral<"eip7702Auth">;
|
|
399
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
395
400
|
}>;
|
|
396
401
|
}>]>>;
|
|
397
402
|
}>, import("@sinclair/typebox").TObject<{
|
|
@@ -414,6 +419,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
414
419
|
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
415
420
|
raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
416
421
|
}>]>;
|
|
422
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
417
423
|
}>, import("@sinclair/typebox").TObject<{
|
|
418
424
|
type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
|
|
419
425
|
data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
|
|
@@ -449,6 +455,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
449
455
|
[x: string]: unknown;
|
|
450
456
|
};
|
|
451
457
|
}>;
|
|
458
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
452
459
|
}>]>;
|
|
453
460
|
}>, import("@sinclair/typebox").TObject<{
|
|
454
461
|
type: import("@sinclair/typebox").TLiteral<"user-operation-v070">;
|
|
@@ -474,6 +481,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
474
481
|
data: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
475
482
|
raw: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
476
483
|
}>]>;
|
|
484
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
477
485
|
}>, import("@sinclair/typebox").TObject<{
|
|
478
486
|
type: import("@sinclair/typebox").TLiteral<"eth_signTypedData_v4">;
|
|
479
487
|
data: import("@sinclair/typebox").TTransform<import("@sinclair/typebox").TObject<{
|
|
@@ -509,6 +517,7 @@ export declare const wallet_prepareCalls: import("@sinclair/typebox").TObject<{
|
|
|
509
517
|
[x: string]: unknown;
|
|
510
518
|
};
|
|
511
519
|
}>;
|
|
520
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
512
521
|
}>]>;
|
|
513
522
|
}>]>;
|
|
514
523
|
}>;
|
|
@@ -519,7 +528,7 @@ export declare const wallet_requestAccount: import("@sinclair/typebox").TObject<
|
|
|
519
528
|
signerAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
520
529
|
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
521
530
|
creationHint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
522
|
-
accountType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"sma-b">>;
|
|
531
|
+
accountType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"sma-b" | "la-v2" | "la-v1.0.1" | "la-v1.0.2" | "la-v1.1.0">[]>>;
|
|
523
532
|
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
524
533
|
}>, import("@sinclair/typebox").TObject<{
|
|
525
534
|
accountType: import("@sinclair/typebox").TLiteral<"7702">;
|
|
@@ -548,7 +557,7 @@ export declare const wallet_createAccount: import("@sinclair/typebox").TObject<{
|
|
|
548
557
|
signerAddress: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
549
558
|
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
550
559
|
creationOptions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
551
|
-
accountType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<"sma-b">>;
|
|
560
|
+
accountType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"sma-b" | "la-v2" | "la-v1.0.1" | "la-v1.0.2" | "la-v1.1.0">[]>>;
|
|
552
561
|
salt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">>;
|
|
553
562
|
}>, import("@sinclair/typebox").TObject<{
|
|
554
563
|
accountType: import("@sinclair/typebox").TLiteral<"7702">;
|
|
@@ -672,6 +681,7 @@ export declare const wallet_createSession: import("@sinclair/typebox").TObject<{
|
|
|
672
681
|
[x: string]: unknown;
|
|
673
682
|
};
|
|
674
683
|
}>;
|
|
684
|
+
rawPayload: import("@sinclair/typebox").TTemplateLiteralSyntax<"0x${string}">;
|
|
675
685
|
}>;
|
|
676
686
|
}>;
|
|
677
687
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/rpc/request.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCpC,CAAC;AAEF,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../src/rpc/request.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgCpC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0C/B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;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