@aa-sdk/core 4.31.2 → 4.33.0

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.
@@ -2,7 +2,7 @@ import type { Transport } from "viem";
2
2
  import { z } from "zod";
3
3
  import type { BundlerClient } from "./bundlerClient.js";
4
4
  export declare const createPublicErc4337ClientSchema: <TTransport extends Transport = Transport>() => z.ZodType<BundlerClient<TTransport>, z.ZodTypeDef, BundlerClient<TTransport>>;
5
- export declare const ConnectionConfigSchema: z.ZodUnion<[z.ZodObject<{
5
+ export declare const ConnectionConfigSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
6
6
  rpcUrl: z.ZodOptional<z.ZodNever>;
7
7
  apiKey: z.ZodString;
8
8
  jwt: z.ZodOptional<z.ZodNever>;
@@ -50,7 +50,13 @@ export declare const ConnectionConfigSchema: z.ZodUnion<[z.ZodObject<{
50
50
  rpcUrl: string;
51
51
  jwt: string;
52
52
  apiKey?: undefined;
53
- }>]>;
53
+ }>]>, z.ZodObject<{
54
+ chainAgnosticUrl: z.ZodOptional<z.ZodString>;
55
+ }, "strip", z.ZodTypeAny, {
56
+ chainAgnosticUrl?: string | undefined;
57
+ }, {
58
+ chainAgnosticUrl?: string | undefined;
59
+ }>>;
54
60
  export declare const UserOperationFeeOptionsFieldSchema: z.ZodObject<{
55
61
  min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
56
62
  max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
@@ -9,7 +9,8 @@ export const createPublicErc4337ClientSchema = () => z.custom((provider) => {
9
9
  "name" in provider);
10
10
  });
11
11
  // [!region ConnectionConfigSchema]
12
- export const ConnectionConfigSchema = z.union([
12
+ // TODO: in v5 either remove this or simplify it (either way this should be moved out of aa-sdk/core)
13
+ export const ConnectionConfigSchema = z.intersection(z.union([
13
14
  z.object({
14
15
  rpcUrl: z.never().optional(),
15
16
  apiKey: z.string(),
@@ -30,7 +31,9 @@ export const ConnectionConfigSchema = z.union([
30
31
  apiKey: z.never().optional(),
31
32
  jwt: z.string(),
32
33
  }),
33
- ]);
34
+ ]), z.object({
35
+ chainAgnosticUrl: z.string().optional(),
36
+ }));
34
37
  // [!endregion ConnectionConfigSchema]
35
38
  export const UserOperationFeeOptionsFieldSchema = BigNumberishRangeSchema.merge(MultiplierSchema).partial();
36
39
  export const UserOperationFeeOptionsSchema_v6 = z
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/client/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG9E,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAE3C,EAAE,CACJ,CAAC,CAAC,MAAM,CAA4B,CAAC,QAAQ,EAAE,EAAE;IAC/C,OAAO,CACL,QAAQ,IAAI,IAAI;QAChB,OAAO,QAAQ,KAAK,QAAQ;QAC5B,SAAS,IAAI,QAAQ;QACrB,MAAM,IAAI,QAAQ;QAClB,KAAK,IAAI,QAAQ;QACjB,MAAM,IAAI,QAAQ,CACnB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEL,mCAAmC;AACnC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC;IAC5C,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB,GAAG,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KAC1B,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACP,MAAM,E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C,MAAM,CAAC;IACN;;OAEG;IACH,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAErD;;OAEG;IACH,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAK,CAAC;IAE9D;;OAEG;IACH,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC;IAE5D;;OAEG;IACH,UAAU,EAAE,6BAA6B,CAAC,QAAQ,EAAE;CACrD,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["import type { Transport } from \"viem\";\nimport { z } from \"zod\";\n\nimport { BigNumberishRangeSchema, MultiplierSchema } from \"../utils/index.js\";\nimport type { BundlerClient } from \"./bundlerClient.js\";\n\nexport const createPublicErc4337ClientSchema = <\n TTransport extends Transport = Transport\n>() =>\n z.custom<BundlerClient<TTransport>>((provider) => {\n return (\n provider != null &&\n typeof provider === \"object\" &&\n \"request\" in provider &&\n \"type\" in provider &&\n \"key\" in provider &&\n \"name\" in provider\n );\n });\n\n// [!region ConnectionConfigSchema]\nexport const ConnectionConfigSchema = z.union([\n z.object({\n rpcUrl: z.never().optional(),\n apiKey: z.string(),\n jwt: z.never().optional(),\n }),\n z.object({\n rpcUrl: z.never().optional(),\n apiKey: z.never().optional(),\n jwt: z.string(),\n }),\n z.object({\n rpcUrl: z.string(),\n apiKey: z.never().optional(),\n jwt: z.never().optional(),\n }),\n z.object({\n rpcUrl: z.string(),\n apiKey: z.never().optional(),\n jwt: z.string(),\n }),\n]);\n// [!endregion ConnectionConfigSchema]\n\nexport const UserOperationFeeOptionsFieldSchema =\n BigNumberishRangeSchema.merge(MultiplierSchema).partial();\n\nexport const UserOperationFeeOptionsSchema_v6 = z\n .object({\n maxFeePerGas: UserOperationFeeOptionsFieldSchema,\n maxPriorityFeePerGas: UserOperationFeeOptionsFieldSchema,\n callGasLimit: UserOperationFeeOptionsFieldSchema,\n verificationGasLimit: UserOperationFeeOptionsFieldSchema,\n preVerificationGas: UserOperationFeeOptionsFieldSchema,\n })\n .partial()\n .strict();\n\nexport const UserOperationFeeOptionsSchema_v7 =\n UserOperationFeeOptionsSchema_v6.extend({\n paymasterVerificationGasLimit: UserOperationFeeOptionsFieldSchema,\n paymasterPostOpGasLimit: UserOperationFeeOptionsFieldSchema,\n })\n .partial()\n .strict();\n\nexport const UserOperationFeeOptionsSchema = UserOperationFeeOptionsSchema_v7;\n\nexport const SmartAccountClientOptsSchema = z\n .object({\n /**\n * The maximum number of times to try fetching a transaction receipt before giving up (default: 5)\n */\n txMaxRetries: z.number().min(0).optional().default(5),\n\n /**\n * The interval in milliseconds to wait between retries while waiting for tx receipts (default: 2_000)\n */\n txRetryIntervalMs: z.number().min(0).optional().default(2_000),\n\n /**\n * The multiplier on interval length to wait between retries while waiting for tx receipts (default: 1.5)\n */\n txRetryMultiplier: z.number().min(0).optional().default(1.5),\n\n /**\n * Optional user operation fee options to be set globally at the provider level\n */\n feeOptions: UserOperationFeeOptionsSchema.optional(),\n })\n .strict();\n"]}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/client/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG9E,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAE3C,EAAE,CACJ,CAAC,CAAC,MAAM,CAA4B,CAAC,QAAQ,EAAE,EAAE;IAC/C,OAAO,CACL,QAAQ,IAAI,IAAI;QAChB,OAAO,QAAQ,KAAK,QAAQ;QAC5B,SAAS,IAAI,QAAQ;QACrB,MAAM,IAAI,QAAQ;QA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,OAAO,EAAE,CAAC;AAE5D,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC;KAC9C,MAAM,CAAC;IACN,YAAY,EAAE,kCAAkC;IAChD,oBAAoB,EAAE,kCAAkC;IACxD,YAAY,EAAE,kCAAkC;IAChD,oBAAoB,EAAE,kCAAkC;IACxD,kBAAkB,EAAE,kCAAkC;CACvD,CAAC;KACD,OAAO,EAAE;KACT,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,gCAAgC,GAC3C,gCAAgC,CAAC,MAAM,CAAC;IACtC,6BAA6B,EAAE,kCAAkC;IACjE,uBAAuB,EAAE,kCAAkC;CAC5D,CAAC;KACC,OAAO,EAAE;KACT,MAAM,EAAE,CAAC;AAEd,MAAM,CAAC,MAAM,6BAA6B,GAAG,gCAAgC,CAAC;AAE9E,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC;KAC1C,MAAM,CAAC;IACN;;OAEG;IACH,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAErD;;OAEG;IACH,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAK,CAAC;IAE9D;;OAEG;IACH,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC;IAE5D;;OAEG;IACH,UAAU,EAAE,6BAA6B,CAAC,QAAQ,EAAE;CACrD,CAAC;KACD,MAAM,EAAE,CAAC","sourcesContent":["import type { Transport } from \"viem\";\nimport { z } from \"zod\";\n\nimport { BigNumberishRangeSchema, MultiplierSchema } from \"../utils/index.js\";\nimport type { BundlerClient } from \"./bundlerClient.js\";\n\nexport const createPublicErc4337ClientSchema = <\n TTransport extends Transport = Transport\n>() =>\n z.custom<BundlerClient<TTransport>>((provider) => {\n return (\n provider != null &&\n typeof provider === \"object\" &&\n \"request\" in provider &&\n \"type\" in provider &&\n \"key\" in provider &&\n \"name\" in provider\n );\n });\n\n// [!region ConnectionConfigSchema]\n// TODO: in v5 either remove this or simplify it (either way this should be moved out of aa-sdk/core)\nexport const ConnectionConfigSchema = z.intersection(\n z.union([\n z.object({\n rpcUrl: z.never().optional(),\n apiKey: z.string(),\n jwt: z.never().optional(),\n }),\n z.object({\n rpcUrl: z.never().optional(),\n apiKey: z.never().optional(),\n jwt: z.string(),\n }),\n z.object({\n rpcUrl: z.string(),\n apiKey: z.never().optional(),\n jwt: z.never().optional(),\n }),\n z.object({\n rpcUrl: z.string(),\n apiKey: z.never().optional(),\n jwt: z.string(),\n }),\n ]),\n z.object({\n chainAgnosticUrl: z.string().optional(),\n })\n);\n// [!endregion ConnectionConfigSchema]\n\nexport const UserOperationFeeOptionsFieldSchema =\n BigNumberishRangeSchema.merge(MultiplierSchema).partial();\n\nexport const UserOperationFeeOptionsSchema_v6 = z\n .object({\n maxFeePerGas: UserOperationFeeOptionsFieldSchema,\n maxPriorityFeePerGas: UserOperationFeeOptionsFieldSchema,\n callGasLimit: UserOperationFeeOptionsFieldSchema,\n verificationGasLimit: UserOperationFeeOptionsFieldSchema,\n preVerificationGas: UserOperationFeeOptionsFieldSchema,\n })\n .partial()\n .strict();\n\nexport const UserOperationFeeOptionsSchema_v7 =\n UserOperationFeeOptionsSchema_v6.extend({\n paymasterVerificationGasLimit: UserOperationFeeOptionsFieldSchema,\n paymasterPostOpGasLimit: UserOperationFeeOptionsFieldSchema,\n })\n .partial()\n .strict();\n\nexport const UserOperationFeeOptionsSchema = UserOperationFeeOptionsSchema_v7;\n\nexport const SmartAccountClientOptsSchema = z\n .object({\n /**\n * The maximum number of times to try fetching a transaction receipt before giving up (default: 5)\n */\n txMaxRetries: z.number().min(0).optional().default(5),\n\n /**\n * The interval in milliseconds to wait between retries while waiting for tx receipts (default: 2_000)\n */\n txRetryIntervalMs: z.number().min(0).optional().default(2_000),\n\n /**\n * The multiplier on interval length to wait between retries while waiting for tx receipts (default: 1.5)\n */\n txRetryMultiplier: z.number().min(0).optional().default(1.5),\n\n /**\n * Optional user operation fee options to be set globally at the provider level\n */\n feeOptions: UserOperationFeeOptionsSchema.optional(),\n })\n .strict();\n"]}
@@ -29,7 +29,7 @@ export class BaseError extends ViemBaseError {
29
29
  ...(args.metaMessages ? [...args.metaMessages, ""] : []),
30
30
  ...(docsPath
31
31
  ? [
32
- `Docs: https://accountkit.alchemy.com${docsPath}${args.docsSlug ? `#${args.docsSlug}` : ""}`,
32
+ `Docs: https://www.alchemy.com/docs/wallets${docsPath}${args.docsSlug ? `#${args.docsSlug}` : ""}`,
33
33
  ]
34
34
  : []),
35
35
  ...(this.details ? [`Details: ${this.details}`] : []),
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/errors/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAiBxC;;;;GAIG;AACH,MAAM,OAAO,SAAU,SAAQ,aAAa;IAI1C,YAAY,YAAoB,EAAE,OAA4B,EAAE;QAC9D,KAAK,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;QAJnB;;;;mBAAO,YAAY;WAAC;QACpB;;;;mBAAU,OAAO;WAAC;QAKzB,MAAM,QAAQ,GACZ,IAAI,CAAC,KAAK,YAAY,SAAS;YAC7B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ;YACtC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;QAEpB,IAAI,CAAC,OAAO,GAAG;YACb,YAAY,IAAI,oBAAoB;YACpC,EAAE;YACF,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACxD,GAAG,CAAC,QAAQ;gBACV,CAAC,CAAC;oBACE,uCAAuC,QAAQ,GAC7C,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EACxC,EAAE;iBACH;gBACH,CAAC,CAAC,EAAE,CAAC;YACP,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACrD,YAAY,IAAI,CAAC,OAAO,EAAE;SAC3B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;CACF","sourcesContent":["import { BaseError as ViemBaseError } from \"viem\";\nimport { VERSION } from \"../version.js\";\n\ntype BaseErrorParameters = {\n docsPath?: string;\n docsSlug?: string;\n metaMessages?: string[];\n} & (\n | {\n cause?: never;\n details?: string;\n }\n | {\n cause: BaseError | Error;\n details?: never;\n }\n);\n\n/**\n * A custom error class that extends from `ViemBaseError`. This class allows for error messages to include links to relevant documentation based on provided `docsPath` and `docsSlug` parameters.\n * This is based on on viem's BaseError type (obviously from the import and extend)\n * we want the errors here to point to our docs if we supply a docsPath though\n */\nexport class BaseError extends ViemBaseError {\n override name = \"AASDKError\";\n override version = VERSION;\n\n constructor(shortMessage: string, args: BaseErrorParameters = {}) {\n super(shortMessage, args);\n\n const docsPath =\n args.cause instanceof BaseError\n ? args.cause.docsPath || args.docsPath\n : args.docsPath;\n\n this.message = [\n shortMessage || \"An error occurred.\",\n \"\",\n ...(args.metaMessages ? [...args.metaMessages, \"\"] : []),\n ...(docsPath\n ? [\n `Docs: https://accountkit.alchemy.com${docsPath}${\n args.docsSlug ? `#${args.docsSlug}` : \"\"\n }`,\n ]\n : []),\n ...(this.details ? [`Details: ${this.details}`] : []),\n `Version: ${this.version}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emBaseError } from \"viem\";\nimport { VERSION } from \"../version.js\";\n\ntype BaseErrorParameters = {\n docsPath?: string;\n docsSlug?: string;\n metaMessages?: string[];\n} & (\n | {\n cause?: never;\n details?: string;\n }\n | {\n cause: BaseError | Error;\n details?: never;\n }\n);\n\n/**\n * A custom error class that extends from `ViemBaseError`. This class allows for error messages to include links to relevant documentation based on provided `docsPath` and `docsSlug` parameters.\n * This is based on on viem's BaseError type (obviously from the import and extend)\n * we want the errors here to point to our docs if we supply a docsPath though\n */\nexport class BaseError extends ViemBaseError {\n override name = \"AASDKError\";\n override version = VERSION;\n\n constructor(shortMessage: string, args: BaseErrorParameters = {}) {\n super(shortMessage, args);\n\n const docsPath =\n args.cause instanceof BaseError\n ? args.cause.docsPath || args.docsPath\n : args.docsPath;\n\n this.message = [\n shortMessage || \"An error occurred.\",\n \"\",\n ...(args.metaMessages ? [...args.metaMessages, \"\"] : []),\n ...(docsPath\n ? [\n `Docs: https://www.alchemy.com/docs/wallets${docsPath}${\n args.docsSlug ? `#${args.docsSlug}` : \"\"\n }`,\n ]\n : []),\n ...(this.details ? [`Details: ${this.details}`] : []),\n `Version: ${this.version}`,\n ].join(\"\\n\");\n }\n}\n"]}
@@ -53,7 +53,7 @@ export { noopMiddleware } from "./middleware/noopMiddleware.js";
53
53
  export type * from "./middleware/types.js";
54
54
  export { LocalAccountSigner } from "./signer/local-account.js";
55
55
  export { SignerSchema, isSigner } from "./signer/schema.js";
56
- export type { SmartAccountAuthenticator, SmartAccountSigner, } from "./signer/types.js";
56
+ export type { SmartAccountAuthenticator, SmartAccountSigner, AuthorizationRequest, } from "./signer/types.js";
57
57
  export { wrapSignatureWith6492 } from "./signer/utils.js";
58
58
  export { WalletClientSigner } from "./signer/wallet-client.js";
59
59
  export { split, type SplitTransportParams } from "./transport/split.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAA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AAuC,CAAC;AAE5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAK5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,KAAK,EAA6B,MAAM,sBAAsB,CAAC;AAGxE,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,mBAAmB,EACnB,8BAA8B,EAC9B,SAAS,EACT,SAAS,EACT,cAAc,EACd,sBAAsB,EACtB,8BAA8B,EAC9B,sBAAsB,EACtB,WAAW,EACX,eAAe,EACf,iCAAiC,EACjC,cAAc,EACd,YAAY,EACZ,cAAc,EACd,qBAAqB,EACrB,IAAI,EACJ,iBAAiB,EACjB,SAAS,EACT,QAAQ,GACT,MAAM,kBAAkB,CAAC","sourcesContent":["export type { Abi } from \"abitype\";\nexport type { Address, HttpTransport } from \"viem\";\n\nexport { EntryPointAbi_v6 } from \"./abis/EntryPointAbi_v6.js\";\nexport { EntryPointAbi_v7 } from \"./abis/EntryPointAbi_v7.js\";\nexport { SimpleAccountAbi_v6 } from \"./abis/SimpleAccountAbi_v6.js\";\nexport { SimpleAccountAbi_v7 } from \"./abis/SimpleAccountAbi_v7.js\";\nexport { SimpleAccountFactoryAbi } from \"./abis/SimpleAccountFactoryAbi.js\";\nexport type * from \"./account/smartContractAccount.js\";\nexport {\n getAccountAddress,\n isSmartAccountWithSigner,\n parseFactoryAddressFromAccountInitCode,\n toSmartContractAccount,\n} from \"./account/smartContractAccount.js\";\nexport { buildUserOperation } from \"./actions/smartAccount/buildUserOperation.js\";\nexport { buildUserOperationFromTx } from \"./actions/smartAccount/buildUserOperationFromTx.js\";\nexport { buildUserOperationFromTxs } from \"./actions/smartAccount/buildUserOperationFromTxs.js\";\nexport { checkGasSponsorshipEligibility } from \"./actions/smartAccount/checkGasSponsorshipEligibility.js\";\nexport { dropAndReplaceUserOperation } from \"./actions/smartAccount/dropAndReplaceUserOperation.js\";\nexport { sendTransaction } from \"./actions/smartAccount/sendTransaction.js\";\nexport { sendTransactions } from \"./actions/smartAccount/sendTransactions.js\";\nexport { sendUserOperation } from \"./actions/smartAccount/sendUserOperation.js\";\nexport type * from \"./actions/smartAccount/types.js\";\nexport { waitForUserOperationTransaction } from \"./actions/smartAccount/waitForUserOperationTransacation.js\";\nexport type * from \"./client/bundlerClient.js\";\nexport {\n createBundlerClient,\n createBundlerClientFromExisting,\n} from \"./client/bundlerClient.js\";\nexport type * from \"./client/decorators/bundlerClient.js\";\nexport { bundlerActions } from \"./client/decorators/bundlerClient.js\";\nexport type * from \"./client/decorators/smartAccountClient.js\";\nexport { smartAccountClientActions } from \"./client/decorators/smartAccountClient.js\";\nexport { isSmartAccountClient } from \"./client/isSmartAccountClient.js\";\nexport {\n ConnectionConfigSchema,\n SmartAccountClientOptsSchema,\n} from \"./client/schema.js\";\nexport type * from \"./client/smartAccountClient.js\";\nexport {\n createSmartAccountClient,\n createSmartAccountClientFromExisting,\n} from \"./client/smartAccountClient.js\";\nexport type * from \"./client/types.js\";\nexport {\n convertChainIdToCoinType,\n convertCoinTypeToChain,\n convertCoinTypeToChainId,\n} from \"./ens/utils.js\";\nexport {\n defaultEntryPointVersion,\n entryPointRegistry,\n getEntryPoint,\n isEntryPointVersion,\n} from \"./entrypoint/index.js\";\nexport type * from \"./entrypoint/types.js\";\nexport {\n AccountNotFoundError,\n AccountRequiresOwnerError,\n BatchExecutionNotSupportedError,\n DefaultFactoryNotDefinedError,\n FailedToGetStorageSlotError,\n GetCounterFactualAddressError,\n IncorrectAccountType,\n SignTransactionNotSupportedError,\n SmartAccountWithSignerRequiredError,\n UpgradeToAndCallNotSupportedError,\n UpgradesNotSupportedError,\n} from \"./errors/account.js\";\nexport { BaseError } from \"./errors/base.js\";\nexport {\n ChainNotFoundError,\n IncompatibleClientError,\n InvalidRpcUrlError,\n InvalidEntityIdError,\n InvalidNonceKeyError,\n EntityIdOverrideError,\n InvalidModularAccountV2Mode,\n InvalidDeferredActionNonce,\n} from \"./errors/client.js\";\nexport {\n EntryPointNotFoundError,\n InvalidEntryPointError,\n} from \"./errors/entrypoint.js\";\nexport { InvalidSignerTypeError } from \"./errors/signer.js\";\nexport {\n FailedToFindTransactionError,\n TransactionMissingToParamError,\n} from \"./errors/transaction.js\";\nexport {\n InvalidUserOperationError,\n WaitForUserOperationError,\n} from \"./errors/useroperation.js\";\nexport * from \"./client/addBreadcrumb.js\";\nexport { LogLevel, Logger } from \"./logger.js\";\nexport { middlewareActions } from \"./middleware/actions.js\";\nexport { default7702UserOpSigner } from \"./middleware/defaults/7702signer.js\";\nexport { default7702GasEstimator } from \"./middleware/defaults/7702gasEstimator.js\";\nexport { defaultFeeEstimator } from \"./middleware/defaults/feeEstimator.js\";\nexport { defaultGasEstimator } from \"./middleware/defaults/gasEstimator.js\";\nexport { defaultPaymasterAndData } from \"./middleware/defaults/paymasterAndData.js\";\nexport { defaultUserOpSigner } from \"./middleware/defaults/userOpSigner.js\";\nexport type * from \"./middleware/erc7677middleware.js\";\nexport { erc7677Middleware } from \"./middleware/erc7677middleware.js\";\nexport { noopMiddleware } from \"./middleware/noopMiddleware.js\";\nexport type * from \"./middleware/types.js\";\nexport { LocalAccountSigner } from \"./signer/local-account.js\";\nexport { SignerSchema, isSigner } from \"./signer/schema.js\";\nexport type {\n SmartAccountAuthenticator,\n SmartAccountSigner,\n} from \"./signer/types.js\";\nexport { wrapSignatureWith6492 } from \"./signer/utils.js\";\nexport { WalletClientSigner } from \"./signer/wallet-client.js\";\nexport { split, type SplitTransportParams } from \"./transport/split.js\";\nexport type * from \"./types.js\";\nexport type * from \"./utils/index.js\";\nexport {\n TraceHeader,\n TRACE_HEADER_NAME,\n TRACE_HEADER_STATE,\n} from \"./utils/traceHeader.js\";\nexport {\n BigNumberishRangeSchema,\n BigNumberishSchema,\n ChainSchema,\n HexSchema,\n MultiplierSchema,\n allEqual,\n applyUserOpFeeOption,\n applyUserOpOverride,\n applyUserOpOverrideOrFeeOption,\n asyncPipe,\n bigIntMax,\n bigIntMultiply,\n bypassPaymasterAndData,\n bypassPaymasterAndDataEmptyHex,\n concatPaymasterAndData,\n deepHexlify,\n filterUndefined,\n getDefaultUserOperationFeeOptions,\n isBigNumberish,\n isMultiplier,\n isValidRequest,\n parsePaymasterAndData,\n pick,\n resolveProperties,\n takeBytes,\n toRecord,\n} from \"./utils/index.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAE5E,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,sCAAsC,EACtC,sBAAsB,GACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,qDAAqD,CAAC;AAChG,OAAO,EAAE,8BAA8B,EAAE,MAAM,0DAA0D,CAAC;AAC1G,OAAO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ChB,QAAQ,EACR,oBAAoB,EACpB,mBAAmB,EACnB,8BAA8B,EAC9B,SAAS,EACT,SAAS,EACT,cAAc,EACd,sBAAsB,EACtB,8BAA8B,EAC9B,sBAAsB,EACtB,WAAW,EACX,eAAe,EACf,iCAAiC,EACjC,cAAc,EACd,YAAY,EACZ,cAAc,EACd,qBAAqB,EACrB,IAAI,EACJ,iBAAiB,EACjB,SAAS,EACT,QAAQ,GACT,MAAM,kBAAkB,CAAC","sourcesContent":["export type { Abi } from \"abitype\";\nexport type { Address, HttpTransport } from \"viem\";\n\nexport { EntryPointAbi_v6 } from \"./abis/EntryPointAbi_v6.js\";\nexport { EntryPointAbi_v7 } from \"./abis/EntryPointAbi_v7.js\";\nexport { SimpleAccountAbi_v6 } from \"./abis/SimpleAccountAbi_v6.js\";\nexport { SimpleAccountAbi_v7 } from \"./abis/SimpleAccountAbi_v7.js\";\nexport { SimpleAccountFactoryAbi } from \"./abis/SimpleAccountFactoryAbi.js\";\nexport type * from \"./account/smartContractAccount.js\";\nexport {\n getAccountAddress,\n isSmartAccountWithSigner,\n parseFactoryAddressFromAccountInitCode,\n toSmartContractAccount,\n} from \"./account/smartContractAccount.js\";\nexport { buildUserOperation } from \"./actions/smartAccount/buildUserOperation.js\";\nexport { buildUserOperationFromTx } from \"./actions/smartAccount/buildUserOperationFromTx.js\";\nexport { buildUserOperationFromTxs } from \"./actions/smartAccount/buildUserOperationFromTxs.js\";\nexport { checkGasSponsorshipEligibility } from \"./actions/smartAccount/checkGasSponsorshipEligibility.js\";\nexport { dropAndReplaceUserOperation } from \"./actions/smartAccount/dropAndReplaceUserOperation.js\";\nexport { sendTransaction } from \"./actions/smartAccount/sendTransaction.js\";\nexport { sendTransactions } from \"./actions/smartAccount/sendTransactions.js\";\nexport { sendUserOperation } from \"./actions/smartAccount/sendUserOperation.js\";\nexport type * from \"./actions/smartAccount/types.js\";\nexport { waitForUserOperationTransaction } from \"./actions/smartAccount/waitForUserOperationTransacation.js\";\nexport type * from \"./client/bundlerClient.js\";\nexport {\n createBundlerClient,\n createBundlerClientFromExisting,\n} from \"./client/bundlerClient.js\";\nexport type * from \"./client/decorators/bundlerClient.js\";\nexport { bundlerActions } from \"./client/decorators/bundlerClient.js\";\nexport type * from \"./client/decorators/smartAccountClient.js\";\nexport { smartAccountClientActions } from \"./client/decorators/smartAccountClient.js\";\nexport { isSmartAccountClient } from \"./client/isSmartAccountClient.js\";\nexport {\n ConnectionConfigSchema,\n SmartAccountClientOptsSchema,\n} from \"./client/schema.js\";\nexport type * from \"./client/smartAccountClient.js\";\nexport {\n createSmartAccountClient,\n createSmartAccountClientFromExisting,\n} from \"./client/smartAccountClient.js\";\nexport type * from \"./client/types.js\";\nexport {\n convertChainIdToCoinType,\n convertCoinTypeToChain,\n convertCoinTypeToChainId,\n} from \"./ens/utils.js\";\nexport {\n defaultEntryPointVersion,\n entryPointRegistry,\n getEntryPoint,\n isEntryPointVersion,\n} from \"./entrypoint/index.js\";\nexport type * from \"./entrypoint/types.js\";\nexport {\n AccountNotFoundError,\n AccountRequiresOwnerError,\n BatchExecutionNotSupportedError,\n DefaultFactoryNotDefinedError,\n FailedToGetStorageSlotError,\n GetCounterFactualAddressError,\n IncorrectAccountType,\n SignTransactionNotSupportedError,\n SmartAccountWithSignerRequiredError,\n UpgradeToAndCallNotSupportedError,\n UpgradesNotSupportedError,\n} from \"./errors/account.js\";\nexport { BaseError } from \"./errors/base.js\";\nexport {\n ChainNotFoundError,\n IncompatibleClientError,\n InvalidRpcUrlError,\n InvalidEntityIdError,\n InvalidNonceKeyError,\n EntityIdOverrideError,\n InvalidModularAccountV2Mode,\n InvalidDeferredActionNonce,\n} from \"./errors/client.js\";\nexport {\n EntryPointNotFoundError,\n InvalidEntryPointError,\n} from \"./errors/entrypoint.js\";\nexport { InvalidSignerTypeError } from \"./errors/signer.js\";\nexport {\n FailedToFindTransactionError,\n TransactionMissingToParamError,\n} from \"./errors/transaction.js\";\nexport {\n InvalidUserOperationError,\n WaitForUserOperationError,\n} from \"./errors/useroperation.js\";\nexport * from \"./client/addBreadcrumb.js\";\nexport { LogLevel, Logger } from \"./logger.js\";\nexport { middlewareActions } from \"./middleware/actions.js\";\nexport { default7702UserOpSigner } from \"./middleware/defaults/7702signer.js\";\nexport { default7702GasEstimator } from \"./middleware/defaults/7702gasEstimator.js\";\nexport { defaultFeeEstimator } from \"./middleware/defaults/feeEstimator.js\";\nexport { defaultGasEstimator } from \"./middleware/defaults/gasEstimator.js\";\nexport { defaultPaymasterAndData } from \"./middleware/defaults/paymasterAndData.js\";\nexport { defaultUserOpSigner } from \"./middleware/defaults/userOpSigner.js\";\nexport type * from \"./middleware/erc7677middleware.js\";\nexport { erc7677Middleware } from \"./middleware/erc7677middleware.js\";\nexport { noopMiddleware } from \"./middleware/noopMiddleware.js\";\nexport type * from \"./middleware/types.js\";\nexport { LocalAccountSigner } from \"./signer/local-account.js\";\nexport { SignerSchema, isSigner } from \"./signer/schema.js\";\nexport type {\n SmartAccountAuthenticator,\n SmartAccountSigner,\n AuthorizationRequest,\n} from \"./signer/types.js\";\nexport { wrapSignatureWith6492 } from \"./signer/utils.js\";\nexport { WalletClientSigner } from \"./signer/wallet-client.js\";\nexport { split, type SplitTransportParams } from \"./transport/split.js\";\nexport type * from \"./types.js\";\nexport type * from \"./utils/index.js\";\nexport {\n TraceHeader,\n TRACE_HEADER_NAME,\n TRACE_HEADER_STATE,\n} from \"./utils/traceHeader.js\";\nexport {\n BigNumberishRangeSchema,\n BigNumberishSchema,\n ChainSchema,\n HexSchema,\n MultiplierSchema,\n allEqual,\n applyUserOpFeeOption,\n applyUserOpOverride,\n applyUserOpOverrideOrFeeOption,\n asyncPipe,\n bigIntMax,\n bigIntMultiply,\n bypassPaymasterAndData,\n bypassPaymasterAndDataEmptyHex,\n concatPaymasterAndData,\n deepHexlify,\n filterUndefined,\n getDefaultUserOperationFeeOptions,\n isBigNumberish,\n isMultiplier,\n isValidRequest,\n parsePaymasterAndData,\n pick,\n resolveProperties,\n takeBytes,\n toRecord,\n} from \"./utils/index.js\";\n"]}
@@ -1,6 +1,5 @@
1
- import { type HDAccount, type HDOptions, type Hex, type LocalAccount, type PrivateKeyAccount, type SignableMessage, type TypedDataDefinition } from "viem";
2
- import type { SmartAccountSigner } from "./types.js";
3
- import type { Authorization } from "viem/experimental";
1
+ import { type HDAccount, type HDOptions, type Hex, type LocalAccount, type PrivateKeyAccount, type SignableMessage, type SignedAuthorization, type TypedDataDefinition } from "viem";
2
+ import type { AuthorizationRequest, SmartAccountSigner } from "./types.js";
4
3
  /**
5
4
  * Represents a local account signer and provides methods to sign messages and transactions, as well as static methods to create the signer from mnemonic or private key.
6
5
  */
@@ -86,31 +85,31 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
86
85
  [x: `bytes9[${string}]`]: undefined;
87
86
  [x: `bytes10[${string}]`]: undefined;
88
87
  [x: `bytes25[${string}]`]: undefined;
89
- [x: `bytes31[${string}]`]: undefined;
90
- [x: `bytes30[${string}]`]: undefined;
91
- [x: `bytes29[${string}]`]: undefined;
92
- [x: `bytes28[${string}]`]: undefined;
93
- [x: `bytes27[${string}]`]: undefined;
94
- [x: `bytes26[${string}]`]: undefined;
95
- [x: `bytes24[${string}]`]: undefined;
96
- [x: `bytes23[${string}]`]: undefined;
97
- [x: `bytes22[${string}]`]: undefined;
98
- [x: `bytes21[${string}]`]: undefined;
99
- [x: `bytes20[${string}]`]: undefined;
100
- [x: `bytes19[${string}]`]: undefined;
101
- [x: `bytes18[${string}]`]: undefined;
102
- [x: `bytes17[${string}]`]: undefined;
103
- [x: `bytes16[${string}]`]: undefined;
104
- [x: `bytes15[${string}]`]: undefined;
105
- [x: `bytes14[${string}]`]: undefined;
106
- [x: `bytes13[${string}]`]: undefined;
107
88
  [x: `bytes12[${string}]`]: undefined;
89
+ [x: `bytes13[${string}]`]: undefined;
90
+ [x: `bytes14[${string}]`]: undefined;
91
+ [x: `bytes15[${string}]`]: undefined;
92
+ [x: `bytes16[${string}]`]: undefined;
93
+ [x: `bytes17[${string}]`]: undefined;
94
+ [x: `bytes18[${string}]`]: undefined;
95
+ [x: `bytes19[${string}]`]: undefined;
96
+ [x: `bytes20[${string}]`]: undefined;
97
+ [x: `bytes21[${string}]`]: undefined;
98
+ [x: `bytes22[${string}]`]: undefined;
99
+ [x: `bytes23[${string}]`]: undefined;
100
+ [x: `bytes24[${string}]`]: undefined;
101
+ [x: `bytes26[${string}]`]: undefined;
102
+ [x: `bytes27[${string}]`]: undefined;
103
+ [x: `bytes28[${string}]`]: undefined;
104
+ [x: `bytes29[${string}]`]: undefined;
105
+ [x: `bytes30[${string}]`]: undefined;
106
+ [x: `bytes31[${string}]`]: undefined;
108
107
  [x: `int[${string}]`]: undefined;
109
108
  [x: `int8[${string}]`]: undefined;
110
- [x: `int40[${string}]`]: undefined;
111
- [x: `int32[${string}]`]: undefined;
112
- [x: `int24[${string}]`]: undefined;
113
109
  [x: `int16[${string}]`]: undefined;
110
+ [x: `int24[${string}]`]: undefined;
111
+ [x: `int32[${string}]`]: undefined;
112
+ [x: `int40[${string}]`]: undefined;
114
113
  [x: `int48[${string}]`]: undefined;
115
114
  [x: `int56[${string}]`]: undefined;
116
115
  [x: `int64[${string}]`]: undefined;
@@ -139,9 +138,9 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
139
138
  [x: `int248[${string}]`]: undefined;
140
139
  [x: `int256[${string}]`]: undefined;
141
140
  [x: `uint[${string}]`]: undefined;
142
- [x: `uint40[${string}]`]: undefined;
143
- [x: `uint24[${string}]`]: undefined;
144
141
  [x: `uint16[${string}]`]: undefined;
142
+ [x: `uint24[${string}]`]: undefined;
143
+ [x: `uint40[${string}]`]: undefined;
145
144
  [x: `uint56[${string}]`]: undefined;
146
145
  [x: `uint72[${string}]`]: undefined;
147
146
  [x: `uint80[${string}]`]: undefined;
@@ -188,30 +187,30 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
188
187
  bytes9?: undefined;
189
188
  bytes10?: undefined;
190
189
  bytes25?: undefined;
191
- bytes31?: undefined;
192
- bytes30?: undefined;
193
- bytes29?: undefined;
194
- bytes28?: undefined;
195
- bytes27?: undefined;
196
- bytes26?: undefined;
197
- bytes24?: undefined;
198
- bytes23?: undefined;
199
- bytes22?: undefined;
200
- bytes21?: undefined;
201
- bytes20?: undefined;
202
- bytes19?: undefined;
203
- bytes18?: undefined;
204
- bytes17?: undefined;
205
- bytes16?: undefined;
206
- bytes15?: undefined;
207
- bytes14?: undefined;
208
- bytes13?: undefined;
209
190
  bytes12?: undefined;
191
+ bytes13?: undefined;
192
+ bytes14?: undefined;
193
+ bytes15?: undefined;
194
+ bytes16?: undefined;
195
+ bytes17?: undefined;
196
+ bytes18?: undefined;
197
+ bytes19?: undefined;
198
+ bytes20?: undefined;
199
+ bytes21?: undefined;
200
+ bytes22?: undefined;
201
+ bytes23?: undefined;
202
+ bytes24?: undefined;
203
+ bytes26?: undefined;
204
+ bytes27?: undefined;
205
+ bytes28?: undefined;
206
+ bytes29?: undefined;
207
+ bytes30?: undefined;
208
+ bytes31?: undefined;
210
209
  int8?: undefined;
211
- int40?: undefined;
212
- int32?: undefined;
213
- int24?: undefined;
214
210
  int16?: undefined;
211
+ int24?: undefined;
212
+ int32?: undefined;
213
+ int40?: undefined;
215
214
  int48?: undefined;
216
215
  int56?: undefined;
217
216
  int64?: undefined;
@@ -239,9 +238,9 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
239
238
  int240?: undefined;
240
239
  int248?: undefined;
241
240
  int256?: undefined;
242
- uint40?: undefined;
243
- uint24?: undefined;
244
241
  uint16?: undefined;
242
+ uint24?: undefined;
243
+ uint40?: undefined;
245
244
  uint56?: undefined;
246
245
  uint72?: undefined;
247
246
  uint80?: undefined;
@@ -281,10 +280,10 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
281
280
  * });
282
281
  * ```
283
282
  *
284
- * @param {Authorization<number, false>} unsignedAuthorization - The unsigned authorization to be signed.
285
- * @returns {Promise<Authorization<number, true>>} A promise that resolves to the signed authorization.
283
+ * @param {AuthorizationRequest<number>} unsignedAuthorization - The unsigned authorization to be signed.
284
+ * @returns {Promise<SignedAuthorization<number>>} A promise that resolves to the signed authorization.
286
285
  */
287
- signAuthorization(this: LocalAccountSigner<PrivateKeyAccount>, unsignedAuthorization: Authorization<number, false>): Promise<Authorization<number, true>>;
286
+ signAuthorization(this: LocalAccountSigner<PrivateKeyAccount>, unsignedAuthorization: AuthorizationRequest<number>): Promise<SignedAuthorization<number>>;
288
287
  /**
289
288
  * Returns the address of the inner object in a specific hexadecimal format.
290
289
  *
@@ -124,11 +124,11 @@ export class LocalAccountSigner {
124
124
  * });
125
125
  * ```
126
126
  *
127
- * @param {Authorization<number, false>} unsignedAuthorization - The unsigned authorization to be signed.
128
- * @returns {Promise<Authorization<number, true>>} A promise that resolves to the signed authorization.
127
+ * @param {AuthorizationRequest<number>} unsignedAuthorization - The unsigned authorization to be signed.
128
+ * @returns {Promise<SignedAuthorization<number>>} A promise that resolves to the signed authorization.
129
129
  */
130
130
  signAuthorization(unsignedAuthorization) {
131
- return this.inner.experimental_signAuthorization(unsignedAuthorization);
131
+ return this.inner.signAuthorization(unsignedAuthorization);
132
132
  }
133
133
  /**
134
134
  * Creates a LocalAccountSigner using the provided mnemonic key and optional HD options.
@@ -1 +1 @@
1
- {"version":3,"file":"local-account.js","sourceRoot":"","sources":["../../../src/signer/local-account.ts"],"names":[],"mappings":"AAAA,OAAO,EASN,MAAM,MAAM,CAAC;AACd,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,eAAe,CAAC;AAIvB;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAO7B;;;;;;;;;;;;;;OAcG;IACH,YAAY,KAAQ;QAlBpB;;;;;WAAS;QACT;;;;;WAAmB;QAsBnB;;;;;;;;;;;;;;WAcG;QACM;;;;mBAAoE,CAC3E,OAAO,EACP,EAAE;gBACF,OAAO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C;CACF","sourcesContent":["import {\n type HDAccount,\n type HDOptions,\n type Hex,\n type LocalAccount,\n type PrivateKeyAccount,\n type SignableMessage,\n type TypedData,\n type TypedDataDefinition,\n} from \"viem\";\nimport {\n generatePrivateKey,\n mnemonicToAccount,\n privateKeyToAccount,\n} from \"viem/accounts\";\nimport type { SmartAccountSigner } from \"./types.js\";\nimport type { Authorization } from \"viem/experimental\";\n\n/**\n * Represents a local account signer and provides methods to sign messages and transactions, as well as static methods to create the signer from mnemonic or private key.\n */\nexport class LocalAccountSigner<\n T extends HDAccount | PrivateKeyAccount | LocalAccount\n> implements SmartAccountSigner<T>\n{\n inner: T;\n signerType: string;\n\n /**\n * A function to initialize an object with an inner parameter and derive a signerType from it.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { privateKeyToAccount, generatePrivateKey } from \"viem\";\n *\n * const signer = new LocalAccountSigner(\n * privateKeyToAccount(generatePrivateKey()),\n * );\n * ```\n *\n * @param {T} inner The inner parameter containing the necessary data\n */\n constructor(inner: T) {\n this.inner = inner;\n this.signerType = inner.type; // type: \"local\"\n }\n\n /**\n * Signs the provided message using the inner signMessage function.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * const signature = await signer.signMessage(\"Hello, world!\");\n * ```\n *\n * @param {string} message The message to be signed\n * @returns {Promise<any>} A promise that resolves to the signed message\n */\n readonly signMessage: (message: SignableMessage) => Promise<`0x${string}`> = (\n message\n ) => {\n return this.inner.signMessage({ message });\n };\n\n /**\n * Signs typed data using the given parameters.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * const signature = await signer.signTypedData({\n * domain: {},\n * types: {},\n * primaryType: \"\",\n * message: {},\n * });\n * ```\n *\n * @param {TypedDataDefinition<TTypedData, TPrimaryType>} params The parameters defining the typed data and primary type\n * @returns {Promise<Hex>} A promise that resolves to the signed data in hexadecimal format\n */\n readonly signTypedData = async <\n const TTypedData extends TypedData | Record<string, unknown>,\n TPrimaryType extends keyof TTypedData | \"EIP712Domain\" = keyof TTypedData\n >(\n params: TypedDataDefinition<TTypedData, TPrimaryType>\n ): Promise<Hex> => {\n return this.inner.signTypedData(params);\n };\n\n /**\n * Signs an unsigned authorization using the provided private key account.\n *\n * @example\n * ```ts twoslash\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem/accounts\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * const signedAuthorization = await signer.signAuthorization({\n * contractAddress: \"0x1234123412341234123412341234123412341234\",\n * chainId: 1,\n * nonce: 3,\n * });\n * ```\n *\n * @param {Authorization<number, false>} unsignedAuthorization - The unsigned authorization to be signed.\n * @returns {Promise<Authorization<number, true>>} A promise that resolves to the signed authorization.\n */\n\n signAuthorization(\n this: LocalAccountSigner<PrivateKeyAccount>,\n unsignedAuthorization: Authorization<number, false>\n ): Promise<Authorization<number, true>> {\n return this.inner.experimental_signAuthorization(unsignedAuthorization);\n }\n\n /**\n * Returns the address of the inner object in a specific hexadecimal format.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * const address = await signer.getAddress();\n * ```\n *\n * @returns {Promise<Hex>} A promise that resolves to the address in the format `0x{string}`\n */\n readonly getAddress = async (): Promise<`0x${string}`> => {\n return this.inner.address;\n };\n\n /**\n * Creates a LocalAccountSigner using the provided mnemonic key and optional HD options.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generateMnemonic } from \"viem\";\n *\n * const signer = LocalAccountSigner.mnemonicToAccountSigner(generateMnemonic());\n * ```\n *\n * @param {string} key The mnemonic key to derive the account from.\n * @param {HDOptions} [opts] Optional HD options for deriving the account.\n * @returns {LocalAccountSigner<HDAccount>} A LocalAccountSigner object for the derived account.\n */\n static mnemonicToAccountSigner(\n key: string,\n opts?: HDOptions\n ): LocalAccountSigner<HDAccount> {\n const signer = mnemonicToAccount(key, opts);\n return new LocalAccountSigner(signer);\n }\n\n /**\n * Creates a `LocalAccountSigner` instance using the provided private key.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * ```\n *\n * @param {Hex} key The private key in hexadecimal format\n * @returns {LocalAccountSigner<PrivateKeyAccount>} An instance of `LocalAccountSigner` initialized with the provided private key\n */\n static privateKeyToAccountSigner(\n key: Hex\n ): LocalAccountSigner<PrivateKeyAccount> {\n const signer = privateKeyToAccount(key);\n return new LocalAccountSigner(signer);\n }\n\n /**\n * Generates a new private key and creates a `LocalAccountSigner` for a `PrivateKeyAccount`.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n *\n * const signer = LocalAccountSigner.generatePrivateKeySigner();\n * ```\n *\n * @returns {LocalAccountSigner<PrivateKeyAccount>} A `LocalAccountSigner` instance initialized with the generated private key account\n */\n static generatePrivateKeySigner(): LocalAccountSigner<PrivateKeyAccount> {\n const signer = privateKeyToAccount(generatePrivateKey());\n return new LocalAccountSigner(signer);\n }\n}\n"]}
1
+ {"version":3,"file":"local-account.js","sourceRoot":"","sources":["../../../src/signer/local-account.ts"],"names":[],"mappings":"AAAA,OAAO,EAUN,MAAM,MAAM,CAAC;AACd,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,eAAe,CAAC;AAGvB;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAO7B;;;;;;;;;;;;;;OAcG;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,wBAAwB;QAC7B,MAAM,MAAM,GAAG,mBAAmB,CAAC,kBAAkB,EAAE,CAAC,CAAC;QACzD,OAAO,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACxC,CAAC;CACF","sourcesContent":["import {\n type HDAccount,\n type HDOptions,\n type Hex,\n type LocalAccount,\n type PrivateKeyAccount,\n type SignableMessage,\n type SignedAuthorization,\n type TypedData,\n type TypedDataDefinition,\n} from \"viem\";\nimport {\n generatePrivateKey,\n mnemonicToAccount,\n privateKeyToAccount,\n} from \"viem/accounts\";\nimport type { AuthorizationRequest, SmartAccountSigner } from \"./types.js\";\n\n/**\n * Represents a local account signer and provides methods to sign messages and transactions, as well as static methods to create the signer from mnemonic or private key.\n */\nexport class LocalAccountSigner<\n T extends HDAccount | PrivateKeyAccount | LocalAccount\n> implements SmartAccountSigner<T>\n{\n inner: T;\n signerType: string;\n\n /**\n * A function to initialize an object with an inner parameter and derive a signerType from it.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { privateKeyToAccount, generatePrivateKey } from \"viem\";\n *\n * const signer = new LocalAccountSigner(\n * privateKeyToAccount(generatePrivateKey()),\n * );\n * ```\n *\n * @param {T} inner The inner parameter containing the necessary data\n */\n constructor(inner: T) {\n this.inner = inner;\n this.signerType = inner.type; // type: \"local\"\n }\n\n /**\n * Signs the provided message using the inner signMessage function.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * const signature = await signer.signMessage(\"Hello, world!\");\n * ```\n *\n * @param {string} message The message to be signed\n * @returns {Promise<any>} A promise that resolves to the signed message\n */\n readonly signMessage: (message: SignableMessage) => Promise<`0x${string}`> = (\n message\n ) => {\n return this.inner.signMessage({ message });\n };\n\n /**\n * Signs typed data using the given parameters.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * const signature = await signer.signTypedData({\n * domain: {},\n * types: {},\n * primaryType: \"\",\n * message: {},\n * });\n * ```\n *\n * @param {TypedDataDefinition<TTypedData, TPrimaryType>} params The parameters defining the typed data and primary type\n * @returns {Promise<Hex>} A promise that resolves to the signed data in hexadecimal format\n */\n readonly signTypedData = async <\n const TTypedData extends TypedData | Record<string, unknown>,\n TPrimaryType extends keyof TTypedData | \"EIP712Domain\" = keyof TTypedData\n >(\n params: TypedDataDefinition<TTypedData, TPrimaryType>\n ): Promise<Hex> => {\n return this.inner.signTypedData(params);\n };\n\n /**\n * Signs an unsigned authorization using the provided private key account.\n *\n * @example\n * ```ts twoslash\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem/accounts\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * const signedAuthorization = await signer.signAuthorization({\n * contractAddress: \"0x1234123412341234123412341234123412341234\",\n * chainId: 1,\n * nonce: 3,\n * });\n * ```\n *\n * @param {AuthorizationRequest<number>} unsignedAuthorization - The unsigned authorization to be signed.\n * @returns {Promise<SignedAuthorization<number>>} A promise that resolves to the signed authorization.\n */\n\n signAuthorization(\n this: LocalAccountSigner<PrivateKeyAccount>,\n unsignedAuthorization: AuthorizationRequest<number>\n ): Promise<SignedAuthorization<number>> {\n return this.inner.signAuthorization(unsignedAuthorization);\n }\n\n /**\n * Returns the address of the inner object in a specific hexadecimal format.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * const address = await signer.getAddress();\n * ```\n *\n * @returns {Promise<Hex>} A promise that resolves to the address in the format `0x{string}`\n */\n readonly getAddress = async (): Promise<`0x${string}`> => {\n return this.inner.address;\n };\n\n /**\n * Creates a LocalAccountSigner using the provided mnemonic key and optional HD options.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generateMnemonic } from \"viem\";\n *\n * const signer = LocalAccountSigner.mnemonicToAccountSigner(generateMnemonic());\n * ```\n *\n * @param {string} key The mnemonic key to derive the account from.\n * @param {HDOptions} [opts] Optional HD options for deriving the account.\n * @returns {LocalAccountSigner<HDAccount>} A LocalAccountSigner object for the derived account.\n */\n static mnemonicToAccountSigner(\n key: string,\n opts?: HDOptions\n ): LocalAccountSigner<HDAccount> {\n const signer = mnemonicToAccount(key, opts);\n return new LocalAccountSigner(signer);\n }\n\n /**\n * Creates a `LocalAccountSigner` instance using the provided private key.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n * import { generatePrivateKey } from \"viem\";\n *\n * const signer = LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey());\n * ```\n *\n * @param {Hex} key The private key in hexadecimal format\n * @returns {LocalAccountSigner<PrivateKeyAccount>} An instance of `LocalAccountSigner` initialized with the provided private key\n */\n static privateKeyToAccountSigner(\n key: Hex\n ): LocalAccountSigner<PrivateKeyAccount> {\n const signer = privateKeyToAccount(key);\n return new LocalAccountSigner(signer);\n }\n\n /**\n * Generates a new private key and creates a `LocalAccountSigner` for a `PrivateKeyAccount`.\n *\n * @example\n * ```ts\n * import { LocalAccountSigner } from \"@aa-sdk/core\";\n *\n * const signer = LocalAccountSigner.generatePrivateKeySigner();\n * ```\n *\n * @returns {LocalAccountSigner<PrivateKeyAccount>} A `LocalAccountSigner` instance initialized with the generated private key account\n */\n static generatePrivateKeySigner(): LocalAccountSigner<PrivateKeyAccount> {\n const signer = privateKeyToAccount(generatePrivateKey());\n return new LocalAccountSigner(signer);\n }\n}\n"]}
@@ -1,6 +1,5 @@
1
1
  import type { Address } from "abitype";
2
- import type { Hex, SignableMessage, TypedData, TypedDataDefinition } from "viem";
3
- import type { Authorization } from "viem/experimental";
2
+ import type { Hex, OneOf, SignableMessage, TypedData, TypedDataDefinition, SignedAuthorization } from "viem";
4
3
  /**
5
4
  * Extends the @interface SmartAccountSigner interface with authentication.
6
5
  *
@@ -12,6 +11,16 @@ export interface SmartAccountAuthenticator<AuthParams, AuthDetails, Inner = any>
12
11
  authenticate: (params: AuthParams) => Promise<AuthDetails>;
13
12
  getAuthDetails: () => Promise<AuthDetails>;
14
13
  }
14
+ export type AuthorizationRequest<uint32 = number> = OneOf<{
15
+ address: Address;
16
+ } | {
17
+ contractAddress: Address;
18
+ }> & {
19
+ /** Chain ID. */
20
+ chainId: uint32;
21
+ /** Nonce of the EOA to delegate to. */
22
+ nonce: uint32;
23
+ };
15
24
  /**
16
25
  * A signer that can sign messages and typed data.
17
26
  *
@@ -23,5 +32,5 @@ export interface SmartAccountSigner<Inner = any> {
23
32
  getAddress: () => Promise<Address>;
24
33
  signMessage: (message: SignableMessage) => Promise<Hex>;
25
34
  signTypedData: <const TTypedData extends TypedData | Record<string, unknown>, TPrimaryType extends keyof TTypedData | "EIP712Domain" = keyof TTypedData>(params: TypedDataDefinition<TTypedData, TPrimaryType>) => Promise<Hex>;
26
- signAuthorization?: (unsignedAuthorization: Authorization<number, false>) => Promise<Authorization<number, true>>;
35
+ signAuthorization?: (unsignedAuthorization: AuthorizationRequest<number>) => Promise<SignedAuthorization<number>>;
27
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/signer/types.ts"],"names":[],"mappings":";AAkDA,kCAAkC","sourcesContent":["import type { Address } from \"abitype\";\nimport type {\n Hex,\n SignableMessage,\n TypedData,\n TypedDataDefinition,\n} from \"viem\";\nimport type { Authorization } from \"viem/experimental\";\n\n// [!region SmartAccountAuthenticator]\n/**\n * Extends the @interface SmartAccountSigner interface with authentication.\n *\n * @template AuthParams - the generic type of the authentication parameters\n * @template AuthDetails - the generic type of the authentication details\n * @template Inner - the generic type of the inner client that the signer wraps to provide functionality such as signing, etc.\n */\nexport interface SmartAccountAuthenticator<AuthParams, AuthDetails, Inner = any>\n extends SmartAccountSigner<Inner> {\n authenticate: (params: AuthParams) => Promise<AuthDetails>;\n\n getAuthDetails: () => Promise<AuthDetails>;\n}\n// [!endregion SmartAccountAuthenticator]\n\n// [!region SmartAccountSigner]\n/**\n * A signer that can sign messages and typed data.\n *\n * @template Inner - the generic type of the inner client that the signer wraps to provide functionality such as signing, etc.\n */\nexport interface SmartAccountSigner<Inner = any> {\n signerType: string;\n inner: Inner;\n\n getAddress: () => Promise<Address>;\n\n signMessage: (message: SignableMessage) => Promise<Hex>;\n\n signTypedData: <\n const TTypedData extends TypedData | Record<string, unknown>,\n TPrimaryType extends keyof TTypedData | \"EIP712Domain\" = keyof TTypedData\n >(\n params: TypedDataDefinition<TTypedData, TPrimaryType>\n ) => Promise<Hex>;\n\n signAuthorization?: (\n unsignedAuthorization: Authorization<number, false>\n ) => Promise<Authorization<number, true>>;\n}\n// [!endregion SmartAccountSigner]\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/signer/types.ts"],"names":[],"mappings":";AAkEA,kCAAkC","sourcesContent":["import type { Address } from \"abitype\";\nimport type {\n Hex,\n OneOf,\n SignableMessage,\n TypedData,\n TypedDataDefinition,\n SignedAuthorization,\n} from \"viem\";\n\n// [!region SmartAccountAuthenticator]\n/**\n * Extends the @interface SmartAccountSigner interface with authentication.\n *\n * @template AuthParams - the generic type of the authentication parameters\n * @template AuthDetails - the generic type of the authentication details\n * @template Inner - the generic type of the inner client that the signer wraps to provide functionality such as signing, etc.\n */\nexport interface SmartAccountAuthenticator<AuthParams, AuthDetails, Inner = any>\n extends SmartAccountSigner<Inner> {\n authenticate: (params: AuthParams) => Promise<AuthDetails>;\n\n getAuthDetails: () => Promise<AuthDetails>;\n}\n// [!endregion SmartAccountAuthenticator]\n\n// [!region SmartAccountSigner]\n// TODO: This is a temporary type to be removed when viem is updated\nexport type AuthorizationRequest<uint32 = number> = OneOf<\n | {\n address: Address;\n }\n | {\n contractAddress: Address;\n }\n> & {\n /** Chain ID. */\n chainId: uint32;\n /** Nonce of the EOA to delegate to. */\n nonce: uint32;\n};\n\n/**\n * A signer that can sign messages and typed data.\n *\n * @template Inner - the generic type of the inner client that the signer wraps to provide functionality such as signing, etc.\n */\nexport interface SmartAccountSigner<Inner = any> {\n signerType: string;\n inner: Inner;\n\n getAddress: () => Promise<Address>;\n\n signMessage: (message: SignableMessage) => Promise<Hex>;\n\n signTypedData: <\n const TTypedData extends TypedData | Record<string, unknown>,\n TPrimaryType extends keyof TTypedData | \"EIP712Domain\" = keyof TTypedData\n >(\n params: TypedDataDefinition<TTypedData, TPrimaryType>\n ) => Promise<Hex>;\n\n signAuthorization?: (\n unsignedAuthorization: AuthorizationRequest<number>\n ) => Promise<SignedAuthorization<number>>;\n}\n// [!endregion SmartAccountSigner]\n"]}
@@ -125,31 +125,31 @@ export declare class WalletClientSigner implements SmartAccountSigner<WalletClie
125
125
  [x: `bytes9[${string}]`]: undefined;
126
126
  [x: `bytes10[${string}]`]: undefined;
127
127
  [x: `bytes25[${string}]`]: undefined;
128
- [x: `bytes31[${string}]`]: undefined;
129
- [x: `bytes30[${string}]`]: undefined;
130
- [x: `bytes29[${string}]`]: undefined;
131
- [x: `bytes28[${string}]`]: undefined;
132
- [x: `bytes27[${string}]`]: undefined;
133
- [x: `bytes26[${string}]`]: undefined;
134
- [x: `bytes24[${string}]`]: undefined;
135
- [x: `bytes23[${string}]`]: undefined;
136
- [x: `bytes22[${string}]`]: undefined;
137
- [x: `bytes21[${string}]`]: undefined;
138
- [x: `bytes20[${string}]`]: undefined;
139
- [x: `bytes19[${string}]`]: undefined;
140
- [x: `bytes18[${string}]`]: undefined;
141
- [x: `bytes17[${string}]`]: undefined;
142
- [x: `bytes16[${string}]`]: undefined;
143
- [x: `bytes15[${string}]`]: undefined;
144
- [x: `bytes14[${string}]`]: undefined;
145
- [x: `bytes13[${string}]`]: undefined;
146
128
  [x: `bytes12[${string}]`]: undefined;
129
+ [x: `bytes13[${string}]`]: undefined;
130
+ [x: `bytes14[${string}]`]: undefined;
131
+ [x: `bytes15[${string}]`]: undefined;
132
+ [x: `bytes16[${string}]`]: undefined;
133
+ [x: `bytes17[${string}]`]: undefined;
134
+ [x: `bytes18[${string}]`]: undefined;
135
+ [x: `bytes19[${string}]`]: undefined;
136
+ [x: `bytes20[${string}]`]: undefined;
137
+ [x: `bytes21[${string}]`]: undefined;
138
+ [x: `bytes22[${string}]`]: undefined;
139
+ [x: `bytes23[${string}]`]: undefined;
140
+ [x: `bytes24[${string}]`]: undefined;
141
+ [x: `bytes26[${string}]`]: undefined;
142
+ [x: `bytes27[${string}]`]: undefined;
143
+ [x: `bytes28[${string}]`]: undefined;
144
+ [x: `bytes29[${string}]`]: undefined;
145
+ [x: `bytes30[${string}]`]: undefined;
146
+ [x: `bytes31[${string}]`]: undefined;
147
147
  [x: `int[${string}]`]: undefined;
148
148
  [x: `int8[${string}]`]: undefined;
149
- [x: `int40[${string}]`]: undefined;
150
- [x: `int32[${string}]`]: undefined;
151
- [x: `int24[${string}]`]: undefined;
152
149
  [x: `int16[${string}]`]: undefined;
150
+ [x: `int24[${string}]`]: undefined;
151
+ [x: `int32[${string}]`]: undefined;
152
+ [x: `int40[${string}]`]: undefined;
153
153
  [x: `int48[${string}]`]: undefined;
154
154
  [x: `int56[${string}]`]: undefined;
155
155
  [x: `int64[${string}]`]: undefined;
@@ -178,9 +178,9 @@ export declare class WalletClientSigner implements SmartAccountSigner<WalletClie
178
178
  [x: `int248[${string}]`]: undefined;
179
179
  [x: `int256[${string}]`]: undefined;
180
180
  [x: `uint[${string}]`]: undefined;
181
- [x: `uint40[${string}]`]: undefined;
182
- [x: `uint24[${string}]`]: undefined;
183
181
  [x: `uint16[${string}]`]: undefined;
182
+ [x: `uint24[${string}]`]: undefined;
183
+ [x: `uint40[${string}]`]: undefined;
184
184
  [x: `uint56[${string}]`]: undefined;
185
185
  [x: `uint72[${string}]`]: undefined;
186
186
  [x: `uint80[${string}]`]: undefined;
@@ -227,30 +227,30 @@ export declare class WalletClientSigner implements SmartAccountSigner<WalletClie
227
227
  bytes9?: undefined;
228
228
  bytes10?: undefined;
229
229
  bytes25?: undefined;
230
- bytes31?: undefined;
231
- bytes30?: undefined;
232
- bytes29?: undefined;
233
- bytes28?: undefined;
234
- bytes27?: undefined;
235
- bytes26?: undefined;
236
- bytes24?: undefined;
237
- bytes23?: undefined;
238
- bytes22?: undefined;
239
- bytes21?: undefined;
240
- bytes20?: undefined;
241
- bytes19?: undefined;
242
- bytes18?: undefined;
243
- bytes17?: undefined;
244
- bytes16?: undefined;
245
- bytes15?: undefined;
246
- bytes14?: undefined;
247
- bytes13?: undefined;
248
230
  bytes12?: undefined;
231
+ bytes13?: undefined;
232
+ bytes14?: undefined;
233
+ bytes15?: undefined;
234
+ bytes16?: undefined;
235
+ bytes17?: undefined;
236
+ bytes18?: undefined;
237
+ bytes19?: undefined;
238
+ bytes20?: undefined;
239
+ bytes21?: undefined;
240
+ bytes22?: undefined;
241
+ bytes23?: undefined;
242
+ bytes24?: undefined;
243
+ bytes26?: undefined;
244
+ bytes27?: undefined;
245
+ bytes28?: undefined;
246
+ bytes29?: undefined;
247
+ bytes30?: undefined;
248
+ bytes31?: undefined;
249
249
  int8?: undefined;
250
- int40?: undefined;
251
- int32?: undefined;
252
- int24?: undefined;
253
250
  int16?: undefined;
251
+ int24?: undefined;
252
+ int32?: undefined;
253
+ int40?: undefined;
254
254
  int48?: undefined;
255
255
  int56?: undefined;
256
256
  int64?: undefined;
@@ -278,9 +278,9 @@ export declare class WalletClientSigner implements SmartAccountSigner<WalletClie
278
278
  int240?: undefined;
279
279
  int248?: undefined;
280
280
  int256?: undefined;
281
- uint40?: undefined;
282
- uint24?: undefined;
283
281
  uint16?: undefined;
282
+ uint24?: undefined;
283
+ uint40?: undefined;
284
284
  uint56?: undefined;
285
285
  uint72?: undefined;
286
286
  uint80?: undefined;
@@ -1 +1 @@
1
- export declare const VERSION = "4.31.2";
1
+ export declare const VERSION = "4.33.0";
@@ -1,4 +1,4 @@
1
1
  // This file is autogenerated by inject-version.ts. Any changes will be
2
2
  // overwritten on commit!
3
- export const VERSION = "4.31.2";
3
+ export const VERSION = "4.33.0";
4
4
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.31.2\";\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// This file is autogenerated by inject-version.ts. Any changes will be\n// overwritten on commit!\nexport const VERSION = \"4.33.0\";\n"]}
@@ -2,7 +2,7 @@ import type { Transport } from "viem";
2
2
  import { z } from "zod";
3
3
  import type { BundlerClient } from "./bundlerClient.js";
4
4
  export declare const createPublicErc4337ClientSchema: <TTransport extends Transport = Transport>() => z.ZodType<BundlerClient<TTransport>, z.ZodTypeDef, BundlerClient<TTransport>>;
5
- export declare const ConnectionConfigSchema: z.ZodUnion<[z.ZodObject<{
5
+ export declare const ConnectionConfigSchema: z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
6
6
  rpcUrl: z.ZodOptional<z.ZodNever>;
7
7
  apiKey: z.ZodString;
8
8
  jwt: z.ZodOptional<z.ZodNever>;
@@ -50,7 +50,13 @@ export declare const ConnectionConfigSchema: z.ZodUnion<[z.ZodObject<{
50
50
  rpcUrl: string;
51
51
  jwt: string;
52
52
  apiKey?: undefined;
53
- }>]>;
53
+ }>]>, z.ZodObject<{
54
+ chainAgnosticUrl: z.ZodOptional<z.ZodString>;
55
+ }, "strip", z.ZodTypeAny, {
56
+ chainAgnosticUrl?: string | undefined;
57
+ }, {
58
+ chainAgnosticUrl?: string | undefined;
59
+ }>>;
54
60
  export declare const UserOperationFeeOptionsFieldSchema: z.ZodObject<{
55
61
  min: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
56
62
  max: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>, z.ZodNumber, z.ZodBigInt]>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/client/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,eAAO,MAAM,+BAA+B,+HAYxC,CAAC;AAGL,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqBjC,CAAC;AAGH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;EACY,CAAC;AAE5D,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASlC,CAAC;AAEZ,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMhC,CAAC;AAEd,eAAO,MAAM,6BA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MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMhC,CAAC;AAEd,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAmC,CAAC;AAE9E,eAAO,MAAM,4BAA4B;IAErC;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGI,CAAC"}
@@ -53,7 +53,7 @@ export { noopMiddleware } from "./middleware/noopMiddleware.js";
53
53
  export type * from "./middleware/types.js";
54
54
  export { LocalAccountSigner } from "./signer/local-account.js";
55
55
  export { SignerSchema, isSigner } from "./signer/schema.js";
56
- export type { SmartAccountAuthenticator, SmartAccountSigner, } from "./signer/types.js";
56
+ export type { SmartAccountAuthenticator, SmartAccountSigner, AuthorizationRequest, } from "./signer/types.js";
57
57
  export { wrapSignatureWith6492 } from "./signer/utils.js";
58
58
  export { WalletClientSigner } from "./signer/wallet-client.js";
59
59
  export { split, type SplitTransportParams } from "./transport/split.js";
@@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,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACxE,mBAAmB,YAAY,CAAC;AAChC,mBAAmB,kBAAkB,CAAC;AACtC,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,mBAAmB,EACnB,8BAA8B,EAC9B,SAAS,EACT,SAAS,EACT,cAAc,EACd,sBAAsB,EACtB,8BAA8B,EAC9B,sBAAsB,EACtB,WAAW,EACX,eAAe,EACf,iCAAiC,EACjC,cAAc,EACd,YAAY,EACZ,cAAc,EACd,qBAAqB,EACrB,IAAI,EACJ,iBAAiB,EACjB,SAAS,EACT,QAAQ,GACT,MAAM,kBAAkB,CAAC"}
@@ -1,6 +1,5 @@
1
- import { type HDAccount, type HDOptions, type Hex, type LocalAccount, type PrivateKeyAccount, type SignableMessage, type TypedDataDefinition } from "viem";
2
- import type { SmartAccountSigner } from "./types.js";
3
- import type { Authorization } from "viem/experimental";
1
+ import { type HDAccount, type HDOptions, type Hex, type LocalAccount, type PrivateKeyAccount, type SignableMessage, type SignedAuthorization, type TypedDataDefinition } from "viem";
2
+ import type { AuthorizationRequest, SmartAccountSigner } from "./types.js";
4
3
  /**
5
4
  * Represents a local account signer and provides methods to sign messages and transactions, as well as static methods to create the signer from mnemonic or private key.
6
5
  */
@@ -86,31 +85,31 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
86
85
  [x: `bytes9[${string}]`]: undefined;
87
86
  [x: `bytes10[${string}]`]: undefined;
88
87
  [x: `bytes25[${string}]`]: undefined;
89
- [x: `bytes31[${string}]`]: undefined;
90
- [x: `bytes30[${string}]`]: undefined;
91
- [x: `bytes29[${string}]`]: undefined;
92
- [x: `bytes28[${string}]`]: undefined;
93
- [x: `bytes27[${string}]`]: undefined;
94
- [x: `bytes26[${string}]`]: undefined;
95
- [x: `bytes24[${string}]`]: undefined;
96
- [x: `bytes23[${string}]`]: undefined;
97
- [x: `bytes22[${string}]`]: undefined;
98
- [x: `bytes21[${string}]`]: undefined;
99
- [x: `bytes20[${string}]`]: undefined;
100
- [x: `bytes19[${string}]`]: undefined;
101
- [x: `bytes18[${string}]`]: undefined;
102
- [x: `bytes17[${string}]`]: undefined;
103
- [x: `bytes16[${string}]`]: undefined;
104
- [x: `bytes15[${string}]`]: undefined;
105
- [x: `bytes14[${string}]`]: undefined;
106
- [x: `bytes13[${string}]`]: undefined;
107
88
  [x: `bytes12[${string}]`]: undefined;
89
+ [x: `bytes13[${string}]`]: undefined;
90
+ [x: `bytes14[${string}]`]: undefined;
91
+ [x: `bytes15[${string}]`]: undefined;
92
+ [x: `bytes16[${string}]`]: undefined;
93
+ [x: `bytes17[${string}]`]: undefined;
94
+ [x: `bytes18[${string}]`]: undefined;
95
+ [x: `bytes19[${string}]`]: undefined;
96
+ [x: `bytes20[${string}]`]: undefined;
97
+ [x: `bytes21[${string}]`]: undefined;
98
+ [x: `bytes22[${string}]`]: undefined;
99
+ [x: `bytes23[${string}]`]: undefined;
100
+ [x: `bytes24[${string}]`]: undefined;
101
+ [x: `bytes26[${string}]`]: undefined;
102
+ [x: `bytes27[${string}]`]: undefined;
103
+ [x: `bytes28[${string}]`]: undefined;
104
+ [x: `bytes29[${string}]`]: undefined;
105
+ [x: `bytes30[${string}]`]: undefined;
106
+ [x: `bytes31[${string}]`]: undefined;
108
107
  [x: `int[${string}]`]: undefined;
109
108
  [x: `int8[${string}]`]: undefined;
110
- [x: `int40[${string}]`]: undefined;
111
- [x: `int32[${string}]`]: undefined;
112
- [x: `int24[${string}]`]: undefined;
113
109
  [x: `int16[${string}]`]: undefined;
110
+ [x: `int24[${string}]`]: undefined;
111
+ [x: `int32[${string}]`]: undefined;
112
+ [x: `int40[${string}]`]: undefined;
114
113
  [x: `int48[${string}]`]: undefined;
115
114
  [x: `int56[${string}]`]: undefined;
116
115
  [x: `int64[${string}]`]: undefined;
@@ -139,9 +138,9 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
139
138
  [x: `int248[${string}]`]: undefined;
140
139
  [x: `int256[${string}]`]: undefined;
141
140
  [x: `uint[${string}]`]: undefined;
142
- [x: `uint40[${string}]`]: undefined;
143
- [x: `uint24[${string}]`]: undefined;
144
141
  [x: `uint16[${string}]`]: undefined;
142
+ [x: `uint24[${string}]`]: undefined;
143
+ [x: `uint40[${string}]`]: undefined;
145
144
  [x: `uint56[${string}]`]: undefined;
146
145
  [x: `uint72[${string}]`]: undefined;
147
146
  [x: `uint80[${string}]`]: undefined;
@@ -188,30 +187,30 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
188
187
  bytes9?: undefined;
189
188
  bytes10?: undefined;
190
189
  bytes25?: undefined;
191
- bytes31?: undefined;
192
- bytes30?: undefined;
193
- bytes29?: undefined;
194
- bytes28?: undefined;
195
- bytes27?: undefined;
196
- bytes26?: undefined;
197
- bytes24?: undefined;
198
- bytes23?: undefined;
199
- bytes22?: undefined;
200
- bytes21?: undefined;
201
- bytes20?: undefined;
202
- bytes19?: undefined;
203
- bytes18?: undefined;
204
- bytes17?: undefined;
205
- bytes16?: undefined;
206
- bytes15?: undefined;
207
- bytes14?: undefined;
208
- bytes13?: undefined;
209
190
  bytes12?: undefined;
191
+ bytes13?: undefined;
192
+ bytes14?: undefined;
193
+ bytes15?: undefined;
194
+ bytes16?: undefined;
195
+ bytes17?: undefined;
196
+ bytes18?: undefined;
197
+ bytes19?: undefined;
198
+ bytes20?: undefined;
199
+ bytes21?: undefined;
200
+ bytes22?: undefined;
201
+ bytes23?: undefined;
202
+ bytes24?: undefined;
203
+ bytes26?: undefined;
204
+ bytes27?: undefined;
205
+ bytes28?: undefined;
206
+ bytes29?: undefined;
207
+ bytes30?: undefined;
208
+ bytes31?: undefined;
210
209
  int8?: undefined;
211
- int40?: undefined;
212
- int32?: undefined;
213
- int24?: undefined;
214
210
  int16?: undefined;
211
+ int24?: undefined;
212
+ int32?: undefined;
213
+ int40?: undefined;
215
214
  int48?: undefined;
216
215
  int56?: undefined;
217
216
  int64?: undefined;
@@ -239,9 +238,9 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
239
238
  int240?: undefined;
240
239
  int248?: undefined;
241
240
  int256?: undefined;
242
- uint40?: undefined;
243
- uint24?: undefined;
244
241
  uint16?: undefined;
242
+ uint24?: undefined;
243
+ uint40?: undefined;
245
244
  uint56?: undefined;
246
245
  uint72?: undefined;
247
246
  uint80?: undefined;
@@ -281,10 +280,10 @@ export declare class LocalAccountSigner<T extends HDAccount | PrivateKeyAccount
281
280
  * });
282
281
  * ```
283
282
  *
284
- * @param {Authorization<number, false>} unsignedAuthorization - The unsigned authorization to be signed.
285
- * @returns {Promise<Authorization<number, true>>} A promise that resolves to the signed authorization.
283
+ * @param {AuthorizationRequest<number>} unsignedAuthorization - The unsigned authorization to be signed.
284
+ * @returns {Promise<SignedAuthorization<number>>} A promise that resolves to the signed authorization.
286
285
  */
287
- signAuthorization(this: LocalAccountSigner<PrivateKeyAccount>, unsignedAuthorization: Authorization<number, false>): Promise<Authorization<number, true>>;
286
+ signAuthorization(this: LocalAccountSigner<PrivateKeyAccount>, unsignedAuthorization: AuthorizationRequest<number>): Promise<SignedAuthorization<number>>;
288
287
  /**
289
288
  * Returns the address of the inner object in a specific hexadecimal format.
290
289
  *
@@ -1 +1 @@
1
- {"version":3,"file":"local-account.d.ts","sourceRoot":"","sources":["../../../src/signer/local-account.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,GAAG,EACR,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EAEpB,KAAK,mBAAmB,EACzB,MAAM,MAAM,CAAC;AAMd,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa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EH,iBAAiB,CACf,IAAI,EAAE,kBAAkB,CAAC,iBAAiB,CAAC,EAC3C,qBAAqB,EAAE,oBAAoB,CAAC,MAAM,CAAC,GAClD,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAIvC;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,UAAU,QAAa,QAAQ,KAAK,MAAM,EAAE,CAAC,CAEpD;IAEF;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,uBAAuB,CAC5B,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,SAAS,GACf,kBAAkB,CAAC,SAAS,CAAC;IAKhC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,yBAAyB,CAC9B,GAAG,EAAE,GAAG,GACP,kBAAkB,CAAC,iBAAiB,CAAC;IAKxC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,wBAAwB,IAAI,kBAAkB,CAAC,iBAAiB,CAAC;CAIzE"}
@@ -1,6 +1,5 @@
1
1
  import type { Address } from "abitype";
2
- import type { Hex, SignableMessage, TypedData, TypedDataDefinition } from "viem";
3
- import type { Authorization } from "viem/experimental";
2
+ import type { Hex, OneOf, SignableMessage, TypedData, TypedDataDefinition, SignedAuthorization } from "viem";
4
3
  /**
5
4
  * Extends the @interface SmartAccountSigner interface with authentication.
6
5
  *
@@ -12,6 +11,16 @@ export interface SmartAccountAuthenticator<AuthParams, AuthDetails, Inner = any>
12
11
  authenticate: (params: AuthParams) => Promise<AuthDetails>;
13
12
  getAuthDetails: () => Promise<AuthDetails>;
14
13
  }
14
+ export type AuthorizationRequest<uint32 = number> = OneOf<{
15
+ address: Address;
16
+ } | {
17
+ contractAddress: Address;
18
+ }> & {
19
+ /** Chain ID. */
20
+ chainId: uint32;
21
+ /** Nonce of the EOA to delegate to. */
22
+ nonce: uint32;
23
+ };
15
24
  /**
16
25
  * A signer that can sign messages and typed data.
17
26
  *
@@ -23,6 +32,6 @@ export interface SmartAccountSigner<Inner = any> {
23
32
  getAddress: () => Promise<Address>;
24
33
  signMessage: (message: SignableMessage) => Promise<Hex>;
25
34
  signTypedData: <const TTypedData extends TypedData | Record<string, unknown>, TPrimaryType extends keyof TTypedData | "EIP712Domain" = keyof TTypedData>(params: TypedDataDefinition<TTypedData, TPrimaryType>) => Promise<Hex>;
26
- signAuthorization?: (unsignedAuthorization: Authorization<number, false>) => Promise<Authorization<number, true>>;
35
+ signAuthorization?: (unsignedAuthorization: AuthorizationRequest<number>) => Promise<SignedAuthorization<number>>;
27
36
  }
28
37
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/signer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EACV,GAAG,EACH,eAAe,EACf,SAAS,EACT,mBAAmB,EACpB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD;;;;;;GAMG;AACH,MAAM,WAAW,yBAAyB,CAAC,UAAU,EAAE,WAAW,EAAE,KAAK,GAAG,GAAG,CAC7E,SAAQ,kBAAkB,CAAC,KAAK,CAAC;IACjC,YAAY,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IAE3D,cAAc,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,CAAC;CAC5C;AAID;;;;GAIG;AACH,MAAM,WAAW,kBAAkB,CAAC,KAAK,GAAG,GAAG;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,KAAK,CAAC;IAEb,UAAU,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAEnC,WAAW,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAExD,aAAa,EAAE,CACb,KAAK,CAAC,UAAU,SAAS,SAAS,GAAG,M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AK,CAAC;IAEb,UAAU,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAEnC,WAAW,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAExD,aAAa,EAAE,CACb,KAAK,CAAC,UAAU,SAAS,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5D,YAAY,SAAS,MAAM,UAAU,GAAG,cAAc,GAAG,MAAM,UAAU,EAEzE,MAAM,EAAE,mBAAmB,CAAC,UAAU,EAAE,YAAY,CAAC,KAClD,OAAO,CAAC,GAAG,CAAC,CAAC;IAElB,iBAAiB,CAAC,EAAE,CAClB,qBAAqB,EAAE,oBAAoB,CAAC,MAAM,CAAC,KAChD,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;CAC3C"}
@@ -125,31 +125,31 @@ export declare class WalletClientSigner implements SmartAccountSigner<WalletClie
125
125
  [x: `bytes9[${string}]`]: undefined;
126
126
  [x: `bytes10[${string}]`]: undefined;
127
127
  [x: `bytes25[${string}]`]: undefined;
128
- [x: `bytes31[${string}]`]: undefined;
129
- [x: `bytes30[${string}]`]: undefined;
130
- [x: `bytes29[${string}]`]: undefined;
131
- [x: `bytes28[${string}]`]: undefined;
132
- [x: `bytes27[${string}]`]: undefined;
133
- [x: `bytes26[${string}]`]: undefined;
134
- [x: `bytes24[${string}]`]: undefined;
135
- [x: `bytes23[${string}]`]: undefined;
136
- [x: `bytes22[${string}]`]: undefined;
137
- [x: `bytes21[${string}]`]: undefined;
138
- [x: `bytes20[${string}]`]: undefined;
139
- [x: `bytes19[${string}]`]: undefined;
140
- [x: `bytes18[${string}]`]: undefined;
141
- [x: `bytes17[${string}]`]: undefined;
142
- [x: `bytes16[${string}]`]: undefined;
143
- [x: `bytes15[${string}]`]: undefined;
144
- [x: `bytes14[${string}]`]: undefined;
145
- [x: `bytes13[${string}]`]: undefined;
146
128
  [x: `bytes12[${string}]`]: undefined;
129
+ [x: `bytes13[${string}]`]: undefined;
130
+ [x: `bytes14[${string}]`]: undefined;
131
+ [x: `bytes15[${string}]`]: undefined;
132
+ [x: `bytes16[${string}]`]: undefined;
133
+ [x: `bytes17[${string}]`]: undefined;
134
+ [x: `bytes18[${string}]`]: undefined;
135
+ [x: `bytes19[${string}]`]: undefined;
136
+ [x: `bytes20[${string}]`]: undefined;
137
+ [x: `bytes21[${string}]`]: undefined;
138
+ [x: `bytes22[${string}]`]: undefined;
139
+ [x: `bytes23[${string}]`]: undefined;
140
+ [x: `bytes24[${string}]`]: undefined;
141
+ [x: `bytes26[${string}]`]: undefined;
142
+ [x: `bytes27[${string}]`]: undefined;
143
+ [x: `bytes28[${string}]`]: undefined;
144
+ [x: `bytes29[${string}]`]: undefined;
145
+ [x: `bytes30[${string}]`]: undefined;
146
+ [x: `bytes31[${string}]`]: undefined;
147
147
  [x: `int[${string}]`]: undefined;
148
148
  [x: `int8[${string}]`]: undefined;
149
- [x: `int40[${string}]`]: undefined;
150
- [x: `int32[${string}]`]: undefined;
151
- [x: `int24[${string}]`]: undefined;
152
149
  [x: `int16[${string}]`]: undefined;
150
+ [x: `int24[${string}]`]: undefined;
151
+ [x: `int32[${string}]`]: undefined;
152
+ [x: `int40[${string}]`]: undefined;
153
153
  [x: `int48[${string}]`]: undefined;
154
154
  [x: `int56[${string}]`]: undefined;
155
155
  [x: `int64[${string}]`]: undefined;
@@ -178,9 +178,9 @@ export declare class WalletClientSigner implements SmartAccountSigner<WalletClie
178
178
  [x: `int248[${string}]`]: undefined;
179
179
  [x: `int256[${string}]`]: undefined;
180
180
  [x: `uint[${string}]`]: undefined;
181
- [x: `uint40[${string}]`]: undefined;
182
- [x: `uint24[${string}]`]: undefined;
183
181
  [x: `uint16[${string}]`]: undefined;
182
+ [x: `uint24[${string}]`]: undefined;
183
+ [x: `uint40[${string}]`]: undefined;
184
184
  [x: `uint56[${string}]`]: undefined;
185
185
  [x: `uint72[${string}]`]: undefined;
186
186
  [x: `uint80[${string}]`]: undefined;
@@ -227,30 +227,30 @@ export declare class WalletClientSigner implements SmartAccountSigner<WalletClie
227
227
  bytes9?: undefined;
228
228
  bytes10?: undefined;
229
229
  bytes25?: undefined;
230
- bytes31?: undefined;
231
- bytes30?: undefined;
232
- bytes29?: undefined;
233
- bytes28?: undefined;
234
- bytes27?: undefined;
235
- bytes26?: undefined;
236
- bytes24?: undefined;
237
- bytes23?: undefined;
238
- bytes22?: undefined;
239
- bytes21?: undefined;
240
- bytes20?: undefined;
241
- bytes19?: undefined;
242
- bytes18?: undefined;
243
- bytes17?: undefined;
244
- bytes16?: undefined;
245
- bytes15?: undefined;
246
- bytes14?: undefined;
247
- bytes13?: undefined;
248
230
  bytes12?: undefined;
231
+ bytes13?: undefined;
232
+ bytes14?: undefined;
233
+ bytes15?: undefined;
234
+ bytes16?: undefined;
235
+ bytes17?: undefined;
236
+ bytes18?: undefined;
237
+ bytes19?: undefined;
238
+ bytes20?: undefined;
239
+ bytes21?: undefined;
240
+ bytes22?: undefined;
241
+ bytes23?: undefined;
242
+ bytes24?: undefined;
243
+ bytes26?: undefined;
244
+ bytes27?: undefined;
245
+ bytes28?: undefined;
246
+ bytes29?: undefined;
247
+ bytes30?: undefined;
248
+ bytes31?: undefined;
249
249
  int8?: undefined;
250
- int40?: undefined;
251
- int32?: undefined;
252
- int24?: undefined;
253
250
  int16?: undefined;
251
+ int24?: undefined;
252
+ int32?: undefined;
253
+ int40?: undefined;
254
254
  int48?: undefined;
255
255
  int56?: undefined;
256
256
  int64?: undefined;
@@ -278,9 +278,9 @@ export declare class WalletClientSigner implements SmartAccountSigner<WalletClie
278
278
  int240?: undefined;
279
279
  int248?: undefined;
280
280
  int256?: undefined;
281
- uint40?: undefined;
282
- uint24?: undefined;
283
281
  uint16?: undefined;
282
+ uint24?: undefined;
283
+ uint40?: undefined;
284
284
  uint56?: undefined;
285
285
  uint72?: undefined;
286
286
  uint80?: undefined;
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "4.31.2";
1
+ export declare const VERSION = "4.33.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aa-sdk/core",
3
3
  "license": "MIT",
4
- "version": "4.31.2",
4
+ "version": "4.33.0",
5
5
  "description": "viem based SDK that enables interactions with ERC-4337 Smart Accounts. ABIs are based off the definitions generated in @account-abstraction/contracts",
6
6
  "author": "Alchemy",
7
7
  "type": "module",
@@ -37,7 +37,6 @@
37
37
  "build": "yarn clean && yarn build:esm && yarn build:types",
38
38
  "build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm",
39
39
  "build:types": "tsc --project tsconfig.build.json --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap",
40
- "docs:gen": "node ../../doc-gen/dist/esm/cli.js generate --in ./src/index.ts --out ../../site/pages/reference/aa-sdk/core",
41
40
  "fern:gen": "node ../../doc-gen/dist/esm/cli.js generate --in ./src/index.ts --out ../../docs/pages/reference/aa-sdk/core --fern",
42
41
  "clean": "rm -rf ./dist",
43
42
  "test": "vitest",
@@ -56,7 +55,7 @@
56
55
  "zod": "^3.22.4"
57
56
  },
58
57
  "peerDependencies": {
59
- "viem": "^2.22.6"
58
+ "viem": "^2.29.2"
60
59
  },
61
60
  "repository": {
62
61
  "type": "git",
@@ -66,5 +65,5 @@
66
65
  "url": "https://github.com/alchemyplatform/aa-sdk/issues"
67
66
  },
68
67
  "homepage": "https://github.com/alchemyplatform/aa-sdk#readme",
69
- "gitHead": "4608a09a027b32ac5e4532a8c84afeeac6293cf8"
68
+ "gitHead": "ef2c269bcfa2115b6103f342ac4d846f1b4db991"
70
69
  }
@@ -19,28 +19,34 @@ export const createPublicErc4337ClientSchema = <
19
19
  });
20
20
 
21
21
  // [!region ConnectionConfigSchema]
22
- export const ConnectionConfigSchema = z.union([
22
+ // TODO: in v5 either remove this or simplify it (either way this should be moved out of aa-sdk/core)
23
+ export const ConnectionConfigSchema = z.intersection(
24
+ z.union([
25
+ z.object({
26
+ rpcUrl: z.never().optional(),
27
+ apiKey: z.string(),
28
+ jwt: z.never().optional(),
29
+ }),
30
+ z.object({
31
+ rpcUrl: z.never().optional(),
32
+ apiKey: z.never().optional(),
33
+ jwt: z.string(),
34
+ }),
35
+ z.object({
36
+ rpcUrl: z.string(),
37
+ apiKey: z.never().optional(),
38
+ jwt: z.never().optional(),
39
+ }),
40
+ z.object({
41
+ rpcUrl: z.string(),
42
+ apiKey: z.never().optional(),
43
+ jwt: z.string(),
44
+ }),
45
+ ]),
23
46
  z.object({
24
- rpcUrl: z.never().optional(),
25
- apiKey: z.string(),
26
- jwt: z.never().optional(),
27
- }),
28
- z.object({
29
- rpcUrl: z.never().optional(),
30
- apiKey: z.never().optional(),
31
- jwt: z.string(),
32
- }),
33
- z.object({
34
- rpcUrl: z.string(),
35
- apiKey: z.never().optional(),
36
- jwt: z.never().optional(),
37
- }),
38
- z.object({
39
- rpcUrl: z.string(),
40
- apiKey: z.never().optional(),
41
- jwt: z.string(),
42
- }),
43
- ]);
47
+ chainAgnosticUrl: z.string().optional(),
48
+ })
49
+ );
44
50
  // [!endregion ConnectionConfigSchema]
45
51
 
46
52
  export const UserOperationFeeOptionsFieldSchema =
@@ -39,7 +39,7 @@ export class BaseError extends ViemBaseError {
39
39
  ...(args.metaMessages ? [...args.metaMessages, ""] : []),
40
40
  ...(docsPath
41
41
  ? [
42
- `Docs: https://accountkit.alchemy.com${docsPath}${
42
+ `Docs: https://www.alchemy.com/docs/wallets${docsPath}${
43
43
  args.docsSlug ? `#${args.docsSlug}` : ""
44
44
  }`,
45
45
  ]
package/src/index.ts CHANGED
@@ -110,6 +110,7 @@ export { SignerSchema, isSigner } from "./signer/schema.js";
110
110
  export type {
111
111
  SmartAccountAuthenticator,
112
112
  SmartAccountSigner,
113
+ AuthorizationRequest,
113
114
  } from "./signer/types.js";
114
115
  export { wrapSignatureWith6492 } from "./signer/utils.js";
115
116
  export { WalletClientSigner } from "./signer/wallet-client.js";
@@ -5,6 +5,7 @@ import {
5
5
  type LocalAccount,
6
6
  type PrivateKeyAccount,
7
7
  type SignableMessage,
8
+ type SignedAuthorization,
8
9
  type TypedData,
9
10
  type TypedDataDefinition,
10
11
  } from "viem";
@@ -13,8 +14,7 @@ import {
13
14
  mnemonicToAccount,
14
15
  privateKeyToAccount,
15
16
  } from "viem/accounts";
16
- import type { SmartAccountSigner } from "./types.js";
17
- import type { Authorization } from "viem/experimental";
17
+ import type { AuthorizationRequest, SmartAccountSigner } from "./types.js";
18
18
 
19
19
  /**
20
20
  * Represents a local account signer and provides methods to sign messages and transactions, as well as static methods to create the signer from mnemonic or private key.
@@ -112,15 +112,15 @@ export class LocalAccountSigner<
112
112
  * });
113
113
  * ```
114
114
  *
115
- * @param {Authorization<number, false>} unsignedAuthorization - The unsigned authorization to be signed.
116
- * @returns {Promise<Authorization<number, true>>} A promise that resolves to the signed authorization.
115
+ * @param {AuthorizationRequest<number>} unsignedAuthorization - The unsigned authorization to be signed.
116
+ * @returns {Promise<SignedAuthorization<number>>} A promise that resolves to the signed authorization.
117
117
  */
118
118
 
119
119
  signAuthorization(
120
120
  this: LocalAccountSigner<PrivateKeyAccount>,
121
- unsignedAuthorization: Authorization<number, false>
122
- ): Promise<Authorization<number, true>> {
123
- return this.inner.experimental_signAuthorization(unsignedAuthorization);
121
+ unsignedAuthorization: AuthorizationRequest<number>
122
+ ): Promise<SignedAuthorization<number>> {
123
+ return this.inner.signAuthorization(unsignedAuthorization);
124
124
  }
125
125
 
126
126
  /**
@@ -1,11 +1,12 @@
1
1
  import type { Address } from "abitype";
2
2
  import type {
3
3
  Hex,
4
+ OneOf,
4
5
  SignableMessage,
5
6
  TypedData,
6
7
  TypedDataDefinition,
8
+ SignedAuthorization,
7
9
  } from "viem";
8
- import type { Authorization } from "viem/experimental";
9
10
 
10
11
  // [!region SmartAccountAuthenticator]
11
12
  /**
@@ -24,6 +25,21 @@ export interface SmartAccountAuthenticator<AuthParams, AuthDetails, Inner = any>
24
25
  // [!endregion SmartAccountAuthenticator]
25
26
 
26
27
  // [!region SmartAccountSigner]
28
+ // TODO: This is a temporary type to be removed when viem is updated
29
+ export type AuthorizationRequest<uint32 = number> = OneOf<
30
+ | {
31
+ address: Address;
32
+ }
33
+ | {
34
+ contractAddress: Address;
35
+ }
36
+ > & {
37
+ /** Chain ID. */
38
+ chainId: uint32;
39
+ /** Nonce of the EOA to delegate to. */
40
+ nonce: uint32;
41
+ };
42
+
27
43
  /**
28
44
  * A signer that can sign messages and typed data.
29
45
  *
@@ -45,7 +61,7 @@ export interface SmartAccountSigner<Inner = any> {
45
61
  ) => Promise<Hex>;
46
62
 
47
63
  signAuthorization?: (
48
- unsignedAuthorization: Authorization<number, false>
49
- ) => Promise<Authorization<number, true>>;
64
+ unsignedAuthorization: AuthorizationRequest<number>
65
+ ) => Promise<SignedAuthorization<number>>;
50
66
  }
51
67
  // [!endregion SmartAccountSigner]
package/src/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // This file is autogenerated by inject-version.ts. Any changes will be
2
2
  // overwritten on commit!
3
- export const VERSION = "4.31.2";
3
+ export const VERSION = "4.33.0";