@account-kit/infra 4.30.0 → 4.31.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.
Files changed (41) hide show
  1. package/dist/esm/actions/types.d.ts +5 -0
  2. package/dist/esm/actions/types.js.map +1 -1
  3. package/dist/esm/chains.d.ts +2 -0
  4. package/dist/esm/chains.js +46 -0
  5. package/dist/esm/chains.js.map +1 -1
  6. package/dist/esm/client/smartAccountClient.d.ts +8 -1
  7. package/dist/esm/client/smartAccountClient.js +1 -0
  8. package/dist/esm/client/smartAccountClient.js.map +1 -1
  9. package/dist/esm/gas-manager.d.ts +46 -1
  10. package/dist/esm/gas-manager.js +18 -0
  11. package/dist/esm/gas-manager.js.map +1 -1
  12. package/dist/esm/index.d.ts +1 -1
  13. package/dist/esm/index.js +1 -1
  14. package/dist/esm/index.js.map +1 -1
  15. package/dist/esm/middleware/gasManager.d.ts +14 -5
  16. package/dist/esm/middleware/gasManager.js +133 -10
  17. package/dist/esm/middleware/gasManager.js.map +1 -1
  18. package/dist/esm/version.d.ts +1 -1
  19. package/dist/esm/version.js +1 -1
  20. package/dist/esm/version.js.map +1 -1
  21. package/dist/types/actions/types.d.ts +5 -0
  22. package/dist/types/actions/types.d.ts.map +1 -1
  23. package/dist/types/chains.d.ts +2 -0
  24. package/dist/types/chains.d.ts.map +1 -1
  25. package/dist/types/client/smartAccountClient.d.ts +8 -1
  26. package/dist/types/client/smartAccountClient.d.ts.map +1 -1
  27. package/dist/types/gas-manager.d.ts +46 -1
  28. package/dist/types/gas-manager.d.ts.map +1 -1
  29. package/dist/types/index.d.ts +1 -1
  30. package/dist/types/index.d.ts.map +1 -1
  31. package/dist/types/middleware/gasManager.d.ts +14 -5
  32. package/dist/types/middleware/gasManager.d.ts.map +1 -1
  33. package/dist/types/version.d.ts +1 -1
  34. package/package.json +4 -4
  35. package/src/actions/types.ts +5 -0
  36. package/src/chains.ts +48 -0
  37. package/src/client/smartAccountClient.ts +9 -1
  38. package/src/gas-manager.ts +36 -1
  39. package/src/index.ts +2 -0
  40. package/src/middleware/gasManager.ts +224 -15
  41. package/src/version.ts +1 -1
@@ -45,6 +45,11 @@ export type RequestGasAndPaymasterAndDataRequest = [
45
45
  {
46
46
  policyId: string | string[];
47
47
  entryPoint: Address;
48
+ erc20Context?: {
49
+ tokenAddress: Address;
50
+ permit?: Hex;
51
+ maxTokenAmount?: BigInt;
52
+ };
48
53
  dummySignature: Hex;
49
54
  userOperation: UserOperationRequest;
50
55
  overrides?: UserOperationOverrides;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/actions/types.ts"],"names":[],"mappings":"AAQA,MAAM,CAAN,IAAY,iBAUX;AAVD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,oCAAe,CAAA;IACf,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB;;;OAGG;IACH,gDAA2B,CAAA;AAC7B,CAAC,EAVW,iBAAiB,KAAjB,iBAAiB,QAU5B;AAED,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,2CAAqB,CAAA;AACvB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B","sourcesContent":["import type {\n UserOperationStruct,\n UserOperationRequest,\n UserOperationOverrides,\n EntryPointVersion,\n} from \"@aa-sdk/core\";\nimport type { Address, Hash, Hex } from \"viem\";\n\nexport enum SimulateAssetType {\n NATIVE = \"NATIVE\",\n ERC20 = \"ERC20\",\n ERC721 = \"ERC721\",\n ERC1155 = \"ERC1155\",\n /**\n * Special contracts that don't follow ERC 721/1155. Currently limited to\n * CryptoKitties and CryptoPunks.\n */\n SPECIAL_NFT = \"SPECIAL_NFT\",\n}\n\nexport enum SimulateChangeType {\n APPROVE = \"APPROVE\",\n TRANSFER = \"TRANSFER\",\n}\n\nexport type SimulateUserOperationAssetChangesRequest = [\n UserOperationStruct,\n entryPoint: Address,\n blockNumber?: Hash\n];\n\nexport type SimulateUserOperationAssetChangesResponse = {\n changes: SimulateAssetChange[];\n error?: SimulateAssetChangesError;\n};\n\nexport interface SimulateAssetChangesError extends Record<string, any> {\n message: string;\n}\n\nexport interface SimulateAssetChange {\n assetType: SimulateAssetType;\n changeType: SimulateChangeType;\n from: Address;\n to: Address;\n rawAmount?: string;\n amount?: string;\n contactAddress: Address;\n tokenId?: string;\n decimals: number;\n symbol: string;\n name?: string;\n logo?: string;\n}\n\nexport type RequestGasAndPaymasterAndDataRequest = [\n {\n policyId: string | string[];\n entryPoint: Address;\n dummySignature: Hex;\n userOperation: UserOperationRequest;\n overrides?: UserOperationOverrides;\n }\n];\n\nexport type RequestGasAndPaymasterAndDataResponse<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n> = Pick<\n UserOperationRequest,\n | \"callGasLimit\"\n | \"preVerificationGas\"\n | \"verificationGasLimit\"\n | \"maxFeePerGas\"\n | \"maxPriorityFeePerGas\"\n> &\n (TEntryPointVersion extends \"0.6.0\"\n ? {\n paymasterAndData: UserOperationRequest<\"0.6.0\">[\"paymasterAndData\"];\n }\n : TEntryPointVersion extends \"0.7.0\"\n ? Pick<\n UserOperationRequest<\"0.7.0\">,\n | \"paymaster\"\n | \"paymasterData\"\n | \"paymasterVerificationGasLimit\"\n | \"paymasterPostOpGasLimit\"\n >\n : never);\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/actions/types.ts"],"names":[],"mappings":"AAQA,MAAM,CAAN,IAAY,iBAUX;AAVD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,oCAAe,CAAA;IACf,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB;;;OAGG;IACH,gDAA2B,CAAA;AAC7B,CAAC,EAVW,iBAAiB,KAAjB,iBAAiB,QAU5B;AAED,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,2CAAqB,CAAA;AACvB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B","sourcesContent":["import type {\n UserOperationStruct,\n UserOperationRequest,\n UserOperationOverrides,\n EntryPointVersion,\n} from \"@aa-sdk/core\";\nimport type { Address, Hash, Hex } from \"viem\";\n\nexport enum SimulateAssetType {\n NATIVE = \"NATIVE\",\n ERC20 = \"ERC20\",\n ERC721 = \"ERC721\",\n ERC1155 = \"ERC1155\",\n /**\n * Special contracts that don't follow ERC 721/1155. Currently limited to\n * CryptoKitties and CryptoPunks.\n */\n SPECIAL_NFT = \"SPECIAL_NFT\",\n}\n\nexport enum SimulateChangeType {\n APPROVE = \"APPROVE\",\n TRANSFER = \"TRANSFER\",\n}\n\nexport type SimulateUserOperationAssetChangesRequest = [\n UserOperationStruct,\n entryPoint: Address,\n blockNumber?: Hash\n];\n\nexport type SimulateUserOperationAssetChangesResponse = {\n changes: SimulateAssetChange[];\n error?: SimulateAssetChangesError;\n};\n\nexport interface SimulateAssetChangesError extends Record<string, any> {\n message: string;\n}\n\nexport interface SimulateAssetChange {\n assetType: SimulateAssetType;\n changeType: SimulateChangeType;\n from: Address;\n to: Address;\n rawAmount?: string;\n amount?: string;\n contactAddress: Address;\n tokenId?: string;\n decimals: number;\n symbol: string;\n name?: string;\n logo?: string;\n}\n\nexport type RequestGasAndPaymasterAndDataRequest = [\n {\n policyId: string | string[];\n entryPoint: Address;\n erc20Context?: {\n tokenAddress: Address;\n permit?: Hex;\n maxTokenAmount?: BigInt;\n };\n dummySignature: Hex;\n userOperation: UserOperationRequest;\n overrides?: UserOperationOverrides;\n }\n];\n\nexport type RequestGasAndPaymasterAndDataResponse<\n TEntryPointVersion extends EntryPointVersion = EntryPointVersion\n> = Pick<\n UserOperationRequest,\n | \"callGasLimit\"\n | \"preVerificationGas\"\n | \"verificationGasLimit\"\n | \"maxFeePerGas\"\n | \"maxPriorityFeePerGas\"\n> &\n (TEntryPointVersion extends \"0.6.0\"\n ? {\n paymasterAndData: UserOperationRequest<\"0.6.0\">[\"paymasterAndData\"];\n }\n : TEntryPointVersion extends \"0.7.0\"\n ? Pick<\n UserOperationRequest<\"0.7.0\">,\n | \"paymaster\"\n | \"paymasterData\"\n | \"paymasterVerificationGasLimit\"\n | \"paymasterPostOpGasLimit\"\n >\n : never);\n"]}
@@ -64,3 +64,5 @@ export declare const mekong: Chain;
64
64
  export declare const openlootSepolia: Chain;
65
65
  export declare const gensynTestnet: Chain;
66
66
  export declare const riseTestnet: Chain;
67
+ export declare const storyMainnet: Chain;
68
+ export declare const storyAeneid: Chain;
@@ -529,4 +529,50 @@ export const riseTestnet = defineChain({
529
529
  },
530
530
  testnet: true,
531
531
  });
532
+ export const storyMainnet = defineChain({
533
+ id: 1514,
534
+ name: "Story Mainnet",
535
+ nativeCurrency: { name: "IP", symbol: "IP", decimals: 18 },
536
+ rpcUrls: {
537
+ default: {
538
+ http: ["https://story-mainnet.g.alchemy.com/v2"],
539
+ },
540
+ public: {
541
+ http: ["https://story-mainnet.g.alchemy.com/v2"],
542
+ },
543
+ alchemy: {
544
+ http: ["https://story-mainnet.g.alchemy.com/v2"],
545
+ },
546
+ },
547
+ blockExplorers: {
548
+ default: {
549
+ name: "Block Explorer",
550
+ url: "https://www.storyscan.io",
551
+ },
552
+ },
553
+ testnet: false,
554
+ });
555
+ export const storyAeneid = defineChain({
556
+ id: 1315,
557
+ name: "Story Aeneid",
558
+ nativeCurrency: { name: "IP", symbol: "IP", decimals: 18 },
559
+ rpcUrls: {
560
+ default: {
561
+ http: ["https://story-aeneid.g.alchemy.com/v2"],
562
+ },
563
+ public: {
564
+ http: ["https://story-aeneid.g.alchemy.com/v2"],
565
+ },
566
+ alchemy: {
567
+ http: ["https://story-aeneid.g.alchemy.com/v2"],
568
+ },
569
+ },
570
+ blockExplorers: {
571
+ default: {
572
+ name: "Block Explorer",
573
+ url: "https://aeneid.storyscan.io",
574
+ },
575
+ },
576
+ testnet: true,
577
+ });
532
578
  //# sourceMappingURL=chains.js.map
@@ -1 +1 @@
1
-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AAC,uCAAuC,CAAC;SAChD;QACD,MAAM,EAAE;YACN,IAAI,EAAE,CAAC,uCAAuC,CAAC;SAChD;QACD,OAAO,EAAE;YACP,IAAI,EAAE,CAAC,uCAAuC,CAAC;SAChD;KACF;IACD,cAAc,EAAE;QACd,OAAO,EAAE;YACP,IAAI,EAAE,gBAAgB;YACtB,GAAG,EAAE,uCAAuC;SAC7C;KACF;IACD,OAAO,EAAE,IAAI;CACd,CAAC,CAAC","sourcesContent":["import type { Chain } from \"viem\";\n\nimport { defineChain } from \"viem\";\nimport {\n arbitrum as vab,\n arbitrumGoerli as vabg,\n arbitrumSepolia as vabs,\n base as vbase,\n baseGoerli as vbaseg,\n baseSepolia as vbases,\n fraxtal as vfrax,\n goerli as vgo,\n mainnet as vmain,\n optimism as vop,\n optimismGoerli as vopg,\n optimismSepolia as vops,\n polygon as vpg,\n polygonAmoy as vpga,\n polygonMumbai as vpgm,\n sepolia as vsep,\n arbitrumNova as vabn,\n zora as vzora,\n zoraSepolia as vzoras,\n} from \"viem/chains\";\n\nexport type AlchemyChainConfig = {\n chain: Chain;\n rpcBaseUrl: string;\n};\n\n/**\n * Defines an Alchemy chain configuration by adding an Alchemy-specific RPC base URL to the chain's RPC URLs.\n *\n * @example\n * ```ts\n * import { defineAlchemyChain } from \"@account-kit/infra\";\n * import { sepolia } from \"viem/chains\";\n *\n * const chain = defineAlchemyChain({\n * chain: sepolia,\n * rpcBaseUrl: \"https://eth-sepolia.g.alchemy.com/v2\"\n * });\n * ```\n *\n * @param {AlchemyChainConfig} params The parameters for defining the Alchemy chain\n * @param {Chain} params.chain The original chain configuration\n * @param {string} params.rpcBaseUrl The Alchemy-specific RPC base URL\n * @returns {Chain} The updated chain configuration with the Alchemy RPC URL added\n */\nexport const defineAlchemyChain = ({\n chain,\n rpcBaseUrl,\n}: {\n chain: Chain;\n rpcBaseUrl: string;\n}): Chain => {\n return {\n ...chain,\n rpcUrls: {\n ...chain.rpcUrls,\n alchemy: {\n http: [rpcBaseUrl],\n },\n },\n };\n};\n\nexport const arbitrum: Chain = {\n ...vab,\n rpcUrls: {\n ...vab.rpcUrls,\n alchemy: {\n http: [\"https://arb-mainnet.g.alchemy.com/v2\"],\n },\n },\n};\n\nexport const arbitrumGoerli: Chain = {\n ...vabg,\n rpcUrls: {\n ...vabg.rpcUrls,\n alchemy: {\n http: [\"https://arb-goerli.g.alchemy.com/v2\"],\n },\n },\n};\n\nexport const arbitrumSepolia: Chain = {\n ...vabs,\n rpcUrls: {\n ...vabs.rpcUrls,\n alchemy: {\n http: [\"https://arb-sepolia.g.alchemy.com/v2\"],\n },\n },\n};\nexport const goerli: Chain = {\n ...vgo,\n rpcUrls: {\n ...vgo.rpcUrls,\n alchemy: {\n http: [\"https://eth-goerli.g.alchemy.com/v2\"],\n },\n },\n};\nexport const mainnet: Chain = {\n ...vmain,\n rpcUrls: {\n ...vmain.rpcUrls,\n alchemy: {\n http: [\"https://eth-mainnet.g.alchemy.com/v2\"],\n },\n },\n};\nexport const optimism: Chain = {\n ...vop,\n rpcUrls: {\n ...vop.rpcUrls,\n alchemy: {\n http: [\"https://opt-mainnet.g.alchemy.com/v2\"],\n },\n },\n};\nexport const optimismGoerli: Chain = {\n ...vopg,\n rpcUrls: {\n ...vopg.rpcUrls,\n alchemy: {\n http: [\"https://opt-goerli.g.alchemy.com/v2\"],\n },\n },\n};\nexport const optimismSepolia: Chain = {\n ...vops,\n rpcUrls: {\n ...vops.rpcUrls,\n alchemy: {\n http: [\"https://opt-sepolia.g.alchemy.com/v2\"],\n },\n },\n};\nexport const sepolia: Chain = {\n ...vsep,\n rpcUrls: {\n ...vsep.rpcUrls,\n alchemy: {\n http: [\"https://eth-sepolia.g.alchemy.com/v2\"],\n },\n },\n};\nexport const base: Chain = {\n ...vbase,\n rpcUrls: {\n ...vbase.rpcUrls,\n alchemy: {\n http: [\"https://base-mainnet.g.alchemy.com/v2\"],\n },\n },\n};\nexport const baseGoerli: Chain = {\n ...vbaseg,\n rpcUrls: {\n ...vbaseg.rpcUrls,\n alchemy: {\n http: [\"https://base-goerli.g.alchemy.com/v2\"],\n },\n },\n};\nexport const baseSepolia: Chain = {\n ...vbases,\n rpcUrls: {\n ...vbases.rpcUrls,\n alchemy: {\n http: [\"https://base-sepolia.g.alchemy.com/v2\"],\n },\n },\n};\n\nexport const polygonMumbai: Chain = {\n ...vpgm,\n rpcUrls: {\n ...vpgm.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mumbai.g.alchemy.com/v2\"],\n },\n },\n};\n\nexport const polygonAmoy: Chain = {\n ...vpga,\n rpcUrls: {\n ...vpga.rpcUrls,\n alchemy: {\n http: [\"https://polygon-amoy.g.alchemy.com/v2\"],\n },\n },\n};\n\nexport const polygon: Chain = {\n ...vpg,\n rpcUrls: {\n ...vpg.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mainnet.g.alchemy.com/v2\"],\n },\n },\n};\n\nexport const fraxtal: Chain = {\n ...vfrax,\n rpcUrls: {\n ...vfrax.rpcUrls,\n },\n};\n\nexport const fraxtalSepolia: Chain = defineChain({\n id: 2523,\n name: \"Fraxtal Sepolia\",\n nativeCurrency: { name: \"Frax Ether\", symbol: \"frxETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.testnet-sepolia.frax.com\"],\n },\n },\n});\n\nexport const zora: Chain = {\n ...vzora,\n rpcUrls: {\n ...vzora.rpcUrls,\n },\n};\n\nexport const zoraSepolia: Chain = {\n ...vzoras,\n rpcUrls: {\n ...vzoras.rpcUrls,\n },\n};\n\nexport const worldChainSepolia: Chain = defineChain({\n id: 4801,\n name: \"World Chain Sepolia\",\n network: \"World Chain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const worldChain: Chain = defineChain({\n id: 480,\n name: \"World Chain\",\n network: \"World Chain\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const shapeSepolia: Chain = defineChain({\n id: 11011,\n name: \"Shape Sepolia\",\n network: \"Shape Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const shape: Chain = defineChain({\n id: 360,\n name: \"Shape\",\n network: \"Shape\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const unichainMainnet: Chain = defineChain({\n id: 130,\n name: \"Unichain Mainnet\",\n network: \"Unichain Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const unichainSepolia: Chain = defineChain({\n id: 1301,\n name: \"Unichain Sepolia\",\n network: \"Unichain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const soneiumMinato: Chain = defineChain({\n id: 1946,\n name: \"Soneium Minato\",\n network: \"Soneium Minato\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const soneiumMainnet: Chain = defineChain({\n id: 1868,\n name: \"Soneium Mainnet\",\n network: \"Soneium Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const opbnbTestnet: Chain = defineChain({\n id: 5611,\n name: \"OPBNB Testnet\",\n network: \"OPBNB Testnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const opbnbMainnet: Chain = defineChain({\n id: 204,\n name: \"OPBNB Mainnet\",\n network: \"OPBNB Mainnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const beraChainBartio: Chain = defineChain({\n id: 80084,\n name: \"BeraChain Bartio\",\n network: \"BeraChain Bartio\",\n nativeCurrency: { name: \"Bera\", symbol: \"BERA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const inkMainnet: Chain = defineChain({\n id: 57073,\n name: \"Ink Mainnet\",\n network: \"Ink Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const inkSepolia: Chain = defineChain({\n id: 763373,\n name: \"Ink Sepolia\",\n network: \"Ink Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const arbitrumNova: Chain = {\n ...vabn,\n rpcUrls: {\n ...vabn.rpcUrls,\n },\n};\n\nexport const monadTestnet: Chain = defineChain({\n id: 10143,\n name: \"Monad Testnet\",\n nativeCurrency: { name: \"Monad\", symbol: \"MON\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://testnet.monadexplorer.com\",\n },\n },\n testnet: true,\n});\n\nexport const mekong: Chain = defineChain({\n id: 7078815900,\n name: \"Mekong Pectra Devnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.mekong.ethpandaops.io\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.mekong.ethpandaops.io\",\n },\n },\n testnet: true,\n});\n\nexport const openlootSepolia: Chain = defineChain({\n id: 905905,\n name: \"Openloot Sepolia\",\n nativeCurrency: { name: \"Openloot\", symbol: \"OL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://openloot-sepolia.explorer.alchemy.com\",\n },\n },\n testnet: true,\n});\n\nexport const gensynTestnet: Chain = defineChain({\n id: 685685,\n name: \"Gensyn Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://gensyn-testnet.explorer.alchemy.com\",\n },\n },\n testnet: true,\n});\n\nexport const riseTestnet: Chain = defineChain({\n id: 11155931,\n name: \"Rise Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.testnet.riselabs.xyz\",\n },\n },\n testnet: true,\n});\n"]}
1
+ {"version":3,"file":"chains.js","sourceRoot":"","sources":["../../src/chains.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EACL,QAAQ,IAAI,GAAG,EACf,cAAc,IAAI,IAAI,EACtB,eAAe,IAAI,IAAI,EACvB,IAAI,IAAI,KAAK,EACb,UAAU,IAAI,MAAM,EACpB,WAAW,IAAI,MAAM,EACrB,OAAO,IAAI,KAAK,EAChB,MAAM,IAAI,GAAG,EACb,OAAO,IAAI,KAAK,EAChB,QAAQ,IAAI,GAAG,EACf,cAAc,IAAI,IAAI,EACtB,eAAe,IAAI,IAAI,EACvB,OAAO,IAAI,GAAG,EACd,WAAW,IAAI,IAAI,EACnB,aAAa,IAAI,IAAI,EACrB,OAAO,IAAI,IAAI,EACf,YAAY,IAAI,IAAI,EACpB,IAAI,IAAI,KAAK,EACb,WAAW,IAAI,MAAM,GACtB,MAAM,aAAa,CAAC;AAOrB;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EACjC,KAAK,EACL,UAAU,GAIX,EAAS,EAAE;IACV,OAAO;QACL,GAAG,KAAK;QACR,OAAO,EAAE;YACP,GAAG,KAAK,CAAC,OAAO;YAChB,OAAO,EAAE;gBACP,IAAI,EAAE,CAAC,UAAU,CAAC;aACnB;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,GAAG,GAAG;IACN,OAAO,EAAE;QACP,GA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AAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC1D,OAAO,EAAE;QACP,OAAO,EAAE;YACP,IAAI,EAAE,CAAC,uCAAuC,CAAC;SAChD;QACD,MAAM,EAAE;YACN,IAAI,EAAE,CAAC,uCAAuC,CAAC;SAChD;QACD,OAAO,EAAE;YACP,IAAI,EAAE,CAAC,uCAAuC,CAAC;SAChD;KACF;IACD,cAAc,EAAE;QACd,OAAO,EAAE;YACP,IAAI,EAAE,gBAAgB;YACtB,GAAG,EAAE,6BAA6B;SACnC;KACF;IACD,OAAO,EAAE,IAAI;CACd,CAAC,CAAC","sourcesContent":["import type { Chain } from \"viem\";\n\nimport { defineChain } from \"viem\";\nimport {\n arbitrum as vab,\n arbitrumGoerli as vabg,\n arbitrumSepolia as vabs,\n base as vbase,\n baseGoerli as vbaseg,\n baseSepolia as vbases,\n fraxtal as vfrax,\n goerli as vgo,\n mainnet as vmain,\n optimism as vop,\n optimismGoerli as vopg,\n optimismSepolia as vops,\n polygon as vpg,\n polygonAmoy as vpga,\n polygonMumbai as vpgm,\n sepolia as vsep,\n arbitrumNova as vabn,\n zora as vzora,\n zoraSepolia as vzoras,\n} from \"viem/chains\";\n\nexport type AlchemyChainConfig = {\n chain: Chain;\n rpcBaseUrl: string;\n};\n\n/**\n * Defines an Alchemy chain configuration by adding an Alchemy-specific RPC base URL to the chain's RPC URLs.\n *\n * @example\n * ```ts\n * import { defineAlchemyChain } from \"@account-kit/infra\";\n * import { sepolia } from \"viem/chains\";\n *\n * const chain = defineAlchemyChain({\n * chain: sepolia,\n * rpcBaseUrl: \"https://eth-sepolia.g.alchemy.com/v2\"\n * });\n * ```\n *\n * @param {AlchemyChainConfig} params The parameters for defining the Alchemy chain\n * @param {Chain} params.chain The original chain configuration\n * @param {string} params.rpcBaseUrl The Alchemy-specific RPC base URL\n * @returns {Chain} The updated chain configuration with the Alchemy RPC URL added\n */\nexport const defineAlchemyChain = ({\n chain,\n rpcBaseUrl,\n}: {\n chain: Chain;\n rpcBaseUrl: string;\n}): Chain => {\n return {\n ...chain,\n rpcUrls: {\n ...chain.rpcUrls,\n alchemy: {\n http: [rpcBaseUrl],\n },\n },\n };\n};\n\nexport const arbitrum: Chain = {\n ...vab,\n rpcUrls: {\n ...vab.rpcUrls,\n alchemy: {\n http: [\"https://arb-mainnet.g.alchemy.com/v2\"],\n },\n },\n};\n\nexport const arbitrumGoerli: Chain = {\n ...vabg,\n rpcUrls: {\n ...vabg.rpcUrls,\n alchemy: {\n http: [\"https://arb-goerli.g.alchemy.com/v2\"],\n },\n },\n};\n\nexport const arbitrumSepolia: Chain = {\n ...vabs,\n rpcUrls: {\n ...vabs.rpcUrls,\n alchemy: {\n http: [\"https://arb-sepolia.g.alchemy.com/v2\"],\n },\n },\n};\nexport const goerli: Chain = {\n ...vgo,\n rpcUrls: {\n ...vgo.rpcUrls,\n alchemy: {\n http: [\"https://eth-goerli.g.alchemy.com/v2\"],\n },\n },\n};\nexport const mainnet: Chain = {\n ...vmain,\n rpcUrls: {\n ...vmain.rpcUrls,\n alchemy: {\n http: [\"https://eth-mainnet.g.alchemy.com/v2\"],\n },\n },\n};\nexport const optimism: Chain = {\n ...vop,\n rpcUrls: {\n ...vop.rpcUrls,\n alchemy: {\n http: [\"https://opt-mainnet.g.alchemy.com/v2\"],\n },\n },\n};\nexport const optimismGoerli: Chain = {\n ...vopg,\n rpcUrls: {\n ...vopg.rpcUrls,\n alchemy: {\n http: [\"https://opt-goerli.g.alchemy.com/v2\"],\n },\n },\n};\nexport const optimismSepolia: Chain = {\n ...vops,\n rpcUrls: {\n ...vops.rpcUrls,\n alchemy: {\n http: [\"https://opt-sepolia.g.alchemy.com/v2\"],\n },\n },\n};\nexport const sepolia: Chain = {\n ...vsep,\n rpcUrls: {\n ...vsep.rpcUrls,\n alchemy: {\n http: [\"https://eth-sepolia.g.alchemy.com/v2\"],\n },\n },\n};\nexport const base: Chain = {\n ...vbase,\n rpcUrls: {\n ...vbase.rpcUrls,\n alchemy: {\n http: [\"https://base-mainnet.g.alchemy.com/v2\"],\n },\n },\n};\nexport const baseGoerli: Chain = {\n ...vbaseg,\n rpcUrls: {\n ...vbaseg.rpcUrls,\n alchemy: {\n http: [\"https://base-goerli.g.alchemy.com/v2\"],\n },\n },\n};\nexport const baseSepolia: Chain = {\n ...vbases,\n rpcUrls: {\n ...vbases.rpcUrls,\n alchemy: {\n http: [\"https://base-sepolia.g.alchemy.com/v2\"],\n },\n },\n};\n\nexport const polygonMumbai: Chain = {\n ...vpgm,\n rpcUrls: {\n ...vpgm.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mumbai.g.alchemy.com/v2\"],\n },\n },\n};\n\nexport const polygonAmoy: Chain = {\n ...vpga,\n rpcUrls: {\n ...vpga.rpcUrls,\n alchemy: {\n http: [\"https://polygon-amoy.g.alchemy.com/v2\"],\n },\n },\n};\n\nexport const polygon: Chain = {\n ...vpg,\n rpcUrls: {\n ...vpg.rpcUrls,\n alchemy: {\n http: [\"https://polygon-mainnet.g.alchemy.com/v2\"],\n },\n },\n};\n\nexport const fraxtal: Chain = {\n ...vfrax,\n rpcUrls: {\n ...vfrax.rpcUrls,\n },\n};\n\nexport const fraxtalSepolia: Chain = defineChain({\n id: 2523,\n name: \"Fraxtal Sepolia\",\n nativeCurrency: { name: \"Frax Ether\", symbol: \"frxETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.testnet-sepolia.frax.com\"],\n },\n },\n});\n\nexport const zora: Chain = {\n ...vzora,\n rpcUrls: {\n ...vzora.rpcUrls,\n },\n};\n\nexport const zoraSepolia: Chain = {\n ...vzoras,\n rpcUrls: {\n ...vzoras.rpcUrls,\n },\n};\n\nexport const worldChainSepolia: Chain = defineChain({\n id: 4801,\n name: \"World Chain Sepolia\",\n network: \"World Chain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://worldchain-sepolia.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const worldChain: Chain = defineChain({\n id: 480,\n name: \"World Chain\",\n network: \"World Chain\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://worldchain-mainnet.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const shapeSepolia: Chain = defineChain({\n id: 11011,\n name: \"Shape Sepolia\",\n network: \"Shape Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://shape-sepolia.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const shape: Chain = defineChain({\n id: 360,\n name: \"Shape\",\n network: \"Shape\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://shape-mainnet.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const unichainMainnet: Chain = defineChain({\n id: 130,\n name: \"Unichain Mainnet\",\n network: \"Unichain Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://unichain-mainnet.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const unichainSepolia: Chain = defineChain({\n id: 1301,\n name: \"Unichain Sepolia\",\n network: \"Unichain Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://unichain-sepolia.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const soneiumMinato: Chain = defineChain({\n id: 1946,\n name: \"Soneium Minato\",\n network: \"Soneium Minato\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://soneium-minato.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const soneiumMainnet: Chain = defineChain({\n id: 1868,\n name: \"Soneium Mainnet\",\n network: \"Soneium Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://soneium-mainnet.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const opbnbTestnet: Chain = defineChain({\n id: 5611,\n name: \"OPBNB Testnet\",\n network: \"OPBNB Testnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://opbnb-testnet.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const opbnbMainnet: Chain = defineChain({\n id: 204,\n name: \"OPBNB Mainnet\",\n network: \"OPBNB Mainnet\",\n nativeCurrency: { name: \"BNB\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://opbnb-mainnet.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const beraChainBartio: Chain = defineChain({\n id: 80084,\n name: \"BeraChain Bartio\",\n network: \"BeraChain Bartio\",\n nativeCurrency: { name: \"Bera\", symbol: \"BERA\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://berachain-bartio.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const inkMainnet: Chain = defineChain({\n id: 57073,\n name: \"Ink Mainnet\",\n network: \"Ink Mainnet\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://ink-mainnet.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const inkSepolia: Chain = defineChain({\n id: 763373,\n name: \"Ink Sepolia\",\n network: \"Ink Sepolia\",\n nativeCurrency: { name: \"Ether\", symbol: \"ETH\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://ink-sepolia.g.alchemy.com/v2\"],\n },\n },\n});\n\nexport const arbitrumNova: Chain = {\n ...vabn,\n rpcUrls: {\n ...vabn.rpcUrls,\n },\n};\n\nexport const monadTestnet: Chain = defineChain({\n id: 10143,\n name: \"Monad Testnet\",\n nativeCurrency: { name: \"Monad\", symbol: \"MON\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://monad-testnet.g.alchemy.com/v2\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://testnet.monadexplorer.com\",\n },\n },\n testnet: true,\n});\n\nexport const mekong: Chain = defineChain({\n id: 7078815900,\n name: \"Mekong Pectra Devnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.mekong.ethpandaops.io\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.mekong.ethpandaops.io\",\n },\n },\n testnet: true,\n});\n\nexport const openlootSepolia: Chain = defineChain({\n id: 905905,\n name: \"Openloot Sepolia\",\n nativeCurrency: { name: \"Openloot\", symbol: \"OL\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://openloot-sepolia.g.alchemy.com/v2\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://openloot-sepolia.explorer.alchemy.com\",\n },\n },\n testnet: true,\n});\n\nexport const gensynTestnet: Chain = defineChain({\n id: 685685,\n name: \"Gensyn Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://gensyn-testnet.g.alchemy.com/v2\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://gensyn-testnet.explorer.alchemy.com\",\n },\n },\n testnet: true,\n});\n\nexport const riseTestnet: Chain = defineChain({\n id: 11155931,\n name: \"Rise Testnet\",\n nativeCurrency: { name: \"eth\", symbol: \"eth\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://rise-testnet.g.alchemy.com/v2\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://explorer.testnet.riselabs.xyz\",\n },\n },\n testnet: true,\n});\n\nexport const storyMainnet: Chain = defineChain({\n id: 1514,\n name: \"Story Mainnet\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://story-mainnet.g.alchemy.com/v2\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://www.storyscan.io\",\n },\n },\n testnet: false,\n});\n\nexport const storyAeneid: Chain = defineChain({\n id: 1315,\n name: \"Story Aeneid\",\n nativeCurrency: { name: \"IP\", symbol: \"IP\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"],\n },\n public: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"],\n },\n alchemy: {\n http: [\"https://story-aeneid.g.alchemy.com/v2\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Block Explorer\",\n url: \"https://aeneid.storyscan.io\",\n },\n },\n testnet: true,\n});\n"]}
@@ -1,5 +1,5 @@
1
1
  import { type Prettify, type SmartAccountClient, type SmartAccountClientActions, type SmartAccountClientConfig, type SmartAccountClientRpcSchema, type SmartContractAccount, type SmartContractAccountWithSigner, type UserOperationContext } from "@aa-sdk/core";
2
- import { type Chain } from "viem";
2
+ import { type Address, type Chain } from "viem";
3
3
  import { type AlchemyTransport } from "../alchemyTransport.js";
4
4
  import { type AlchemySmartAccountClientActions } from "./decorators/smartAccount.js";
5
5
  import type { AlchemyRpcSchema } from "./types.js";
@@ -10,6 +10,13 @@ export type AlchemySmartAccountClientConfig<chain extends Chain | undefined = Ch
10
10
  account?: account;
11
11
  useSimulation?: boolean;
12
12
  policyId?: string | string[];
13
+ policyToken?: {
14
+ address: Address;
15
+ approvalMode?: "NONE" | "PERMIT";
16
+ maxTokenAmount?: bigint;
17
+ erc20Name?: string;
18
+ version?: string;
19
+ };
13
20
  } & Pick<SmartAccountClientConfig<AlchemyTransport, chain, account, context>, "customMiddleware" | "feeEstimator" | "gasEstimator" | "signUserOperation" | "transport" | "chain" | "opts">;
14
21
  export type BaseAlchemyActions<chain extends Chain | undefined = Chain | undefined, account extends SmartContractAccount | undefined = SmartContractAccount | undefined, context extends UserOperationContext | undefined = UserOperationContext | undefined> = SmartAccountClientActions<chain, account, context> & AlchemySmartAccountClientActions<account, context>;
15
22
  export type AlchemySmartAccountClient_Base<chain extends Chain | undefined = Chain | undefined, account extends SmartContractAccount | undefined = SmartContractAccount | undefined, actions extends Record<string, unknown> = Record<string, unknown>, context extends UserOperationContext | undefined = UserOperationContext | undefined> = Prettify<SmartAccountClient<AlchemyTransport, chain, account, actions & BaseAlchemyActions<chain, account, context>, [
@@ -54,6 +54,7 @@ export function createAlchemySmartAccountClient(config) {
54
54
  ...(config.policyId
55
55
  ? alchemyGasAndPaymasterAndDataMiddleware({
56
56
  policyId: config.policyId,
57
+ policyToken: config.policyToken,
57
58
  transport: config.transport,
58
59
  gasEstimatorOverride: config.gasEstimator,
59
60
  feeEstimatorOverride: config.feeEstimator,
@@ -1 +1 @@
1
- {"version":3,"file":"smartAccountClient.js","sourceRoot":"","sources":["../../../src/client/smartAccountClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,GASzB,MAAM,c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C,cAAc,CAAC;SACtB,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACpB,aAAa,CAAC,UAAkB;YAC9B,OAAO,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAChD,CAAC;KACF,CAAC,CAAC,CAAC;IAEN,IAAI,MAAM,CAAC,OAAO,IAAI,wBAAwB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;QAC/D,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,mBAAmB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACtE,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import {\n ChainNotFoundError,\n clientHeaderTrack,\n createSmartAccountClient,\n isSmartAccountWithSigner,\n type Prettify,\n type SmartAccountClient,\n type SmartAccountClientActions,\n type SmartAccountClientConfig,\n type SmartAccountClientRpcSchema,\n type SmartContractAccount,\n type SmartContractAccountWithSigner,\n type UserOperationContext,\n} from \"@aa-sdk/core\";\nimport { type Chain } from \"viem\";\nimport {\n alchemy,\n convertHeadersToObject,\n type AlchemyTransport,\n} from \"../alchemyTransport.js\";\nimport { getDefaultUserOperationFeeOptions } from \"../defaults.js\";\nimport { alchemyFeeEstimator } from \"../middleware/feeEstimator.js\";\nimport { alchemyGasAndPaymasterAndDataMiddleware } from \"../middleware/gasManager.js\";\nimport { alchemyUserOperationSimulator } from \"../middleware/userOperationSimulator.js\";\nimport {\n alchemyActions,\n type AlchemySmartAccountClientActions,\n} from \"./decorators/smartAccount.js\";\nimport type { AlchemyRpcSchema } from \"./types.js\";\nimport { headersUpdate } from \"../alchemyTrackerHeaders.js\";\n\nexport function getSignerTypeHeader<\n TAccount extends SmartContractAccountWithSigner\n>(account: TAccount) {\n return { \"Alchemy-Aa-Sdk-Signer\": account.getSigner().signerType };\n}\n\n// #region AlchemySmartAccountClientConfig\nexport type AlchemySmartAccountClientConfig<\n chain extends Chain | undefined = Chain | undefined,\n account extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n context extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n> = {\n account?: account;\n useSimulation?: boolean;\n policyId?: string | string[];\n} & Pick<\n SmartAccountClientConfig<AlchemyTransport, chain, account, context>,\n | \"customMiddleware\"\n | \"feeEstimator\"\n | \"gasEstimator\"\n | \"signUserOperation\"\n | \"transport\"\n | \"chain\"\n | \"opts\"\n>;\n// #endregion AlchemySmartAccountClientConfig\n\nexport type BaseAlchemyActions<\n chain extends Chain | undefined = Chain | undefined,\n account extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n context extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n> = SmartAccountClientActions<chain, account, context> &\n AlchemySmartAccountClientActions<account, context>;\n\nexport type AlchemySmartAccountClient_Base<\n chain extends Chain | undefined = Chain | undefined,\n account extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n actions extends Record<string, unknown> = Record<string, unknown>,\n context extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n> = Prettify<\n SmartAccountClient<\n AlchemyTransport,\n chain,\n account,\n actions & BaseAlchemyActions<chain, account, context>,\n [...SmartAccountClientRpcSchema, ...AlchemyRpcSchema],\n context\n >\n>;\n\nexport type AlchemySmartAccountClient<\n chain extends Chain | undefined = Chain | undefined,\n account extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n actions extends Record<string, unknown> = Record<string, unknown>,\n context extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n> = Prettify<AlchemySmartAccountClient_Base<chain, account, actions, context>>;\n\nexport function createAlchemySmartAccountClient<\n TChain extends Chain = Chain,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n>(\n params: AlchemySmartAccountClientConfig<TChain, TAccount, TContext>\n): AlchemySmartAccountClient<TChain, TAccount, Record<string, never>, TContext>;\n\n/**\n * Creates an Alchemy smart account client using the provided configuration options, including account details, gas manager configuration, and custom middleware.\n *\n * @example\n * ```ts\n * import { createAlchemySmartAccountClient, alchemy } from \"@account-kit/infra\";\n * import { sepolia } from \"@account-kit/infra/chain\";\n *\n * const client = createAlchemySmartAccountClient({\n * chain: sepolia,\n * transport: alchemy({ apiKey: \"your-api-key\" }),\n * });\n * ```\n *\n * @param {AlchemySmartAccountClientConfig} config The configuration for creating the Alchemy smart account client\n * @returns {AlchemySmartAccountClient} An instance of `AlchemySmartAccountClient` configured based on the provided options\n */\nexport function createAlchemySmartAccountClient(\n config: AlchemySmartAccountClientConfig\n): AlchemySmartAccountClient {\n if (!config.chain) {\n throw new ChainNotFoundError();\n }\n\n const feeOptions =\n config.opts?.feeOptions ?? getDefaultUserOperationFeeOptions(config.chain);\n\n const scaClient = createSmartAccountClient({\n account: config.account,\n transport: config.transport,\n chain: config.chain,\n type: \"AlchemySmartAccountClient\",\n opts: {\n ...config.opts,\n feeOptions,\n },\n feeEstimator: config.feeEstimator ?? alchemyFeeEstimator(config.transport),\n gasEstimator: config.gasEstimator,\n customMiddleware: async (struct, args) => {\n if (isSmartAccountWithSigner(args.account)) {\n config.transport.updateHeaders(getSignerTypeHeader(args.account));\n }\n return config.customMiddleware\n ? config.customMiddleware(struct, args)\n : struct;\n },\n ...(config.policyId\n ? alchemyGasAndPaymasterAndDataMiddleware({\n policyId: config.policyId,\n transport: config.transport,\n gasEstimatorOverride: config.gasEstimator,\n feeEstimatorOverride: config.feeEstimator,\n })\n : {}),\n userOperationSimulator: config.useSimulation\n ? alchemyUserOperationSimulator(config.transport)\n : undefined,\n signUserOperation: config.signUserOperation,\n addBreadCrumb(breadcrumb: string) {\n const oldConfig = config.transport.config;\n const dynamicFetchOptions = config.transport.dynamicFetchOptions;\n const newTransport = alchemy({ ...oldConfig });\n newTransport.updateHeaders(\n headersUpdate(breadcrumb)(\n convertHeadersToObject(dynamicFetchOptions?.headers)\n )\n );\n return createAlchemySmartAccountClient({\n ...config,\n transport: newTransport,\n }) as any;\n },\n })\n .extend(alchemyActions)\n .extend((client_) => ({\n addBreadcrumb(breadcrumb: string) {\n return clientHeaderTrack(client_, breadcrumb);\n },\n }));\n\n if (config.account && isSmartAccountWithSigner(config.account)) {\n config.transport.updateHeaders(getSignerTypeHeader(config.account));\n }\n\n return scaClient;\n}\n"]}
1
+ {"version":3,"file":"smartAccountClient.js","sourceRoot":"","sources":["../../../src/client/smartAccountClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,GASzB,MAAM,cAAc,CAAC;AACtB,OAAO,EAA4B,MAAM,MAAM,CAAC;AAChD,OAAO,EACL,OAAO,EACP,sBAAsB,GAEvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iCAAiC,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,uCAAuC,EAAE,MAAM,6BAA6B,CAAC;AACtF,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EACL,cAAc,GAEf,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,MAAM,UAAU,mBAAmB,CAEjC,OAAiB;IACjB,OAAO,EAAE,uBAAuB,EAAE,OAAO,CAAC,SAAS,EAAE,CAAC,UAAU,EAAE,CAAC;AACrE,CAAC;AAwFD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,+BAA+B,CAC7C,MAAuC;IAEvC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QAClB,MAAM,IAAI,kBAAkB,EAAE,CAAC;IACjC,CAAC;IAED,MAAM,UAAU,GACd,MAAM,CAAC,IAAI,EAAE,UAAU,IAAI,iCAAiC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAE7E,MAAM,SAAS,GAAG,wBA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C,SAAS,CAAC,MAAM,CAAC;YAC1C,MAAM,mBAAmB,GAAG,MAAM,CAAC,SAAS,CAAC,mBAAmB,CAAC;YACjE,MAAM,YAAY,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;YAC/C,YAAY,CAAC,aAAa,CACxB,aAAa,CAAC,UAAU,CAAC,CACvB,sBAAsB,CAAC,mBAAmB,EAAE,OAAO,CAAC,CACrD,CACF,CAAC;YACF,OAAO,+BAA+B,CAAC;gBACrC,GAAG,MAAM;gBACT,SAAS,EAAE,YAAY;aACxB,CAAQ,CAAC;QACZ,CAAC;KACF,CAAC;SACC,MAAM,CAAC,cAAc,CAAC;SACtB,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACpB,aAAa,CAAC,UAAkB;YAC9B,OAAO,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAChD,CAAC;KACF,CAAC,CAAC,CAAC;IAEN,IAAI,MAAM,CAAC,OAAO,IAAI,wBAAwB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;QAC/D,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,mBAAmB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACtE,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import {\n ChainNotFoundError,\n clientHeaderTrack,\n createSmartAccountClient,\n isSmartAccountWithSigner,\n type Prettify,\n type SmartAccountClient,\n type SmartAccountClientActions,\n type SmartAccountClientConfig,\n type SmartAccountClientRpcSchema,\n type SmartContractAccount,\n type SmartContractAccountWithSigner,\n type UserOperationContext,\n} from \"@aa-sdk/core\";\nimport { type Address, type Chain } from \"viem\";\nimport {\n alchemy,\n convertHeadersToObject,\n type AlchemyTransport,\n} from \"../alchemyTransport.js\";\nimport { getDefaultUserOperationFeeOptions } from \"../defaults.js\";\nimport { alchemyFeeEstimator } from \"../middleware/feeEstimator.js\";\nimport { alchemyGasAndPaymasterAndDataMiddleware } from \"../middleware/gasManager.js\";\nimport { alchemyUserOperationSimulator } from \"../middleware/userOperationSimulator.js\";\nimport {\n alchemyActions,\n type AlchemySmartAccountClientActions,\n} from \"./decorators/smartAccount.js\";\nimport type { AlchemyRpcSchema } from \"./types.js\";\nimport { headersUpdate } from \"../alchemyTrackerHeaders.js\";\n\nexport function getSignerTypeHeader<\n TAccount extends SmartContractAccountWithSigner\n>(account: TAccount) {\n return { \"Alchemy-Aa-Sdk-Signer\": account.getSigner().signerType };\n}\n\n// #region AlchemySmartAccountClientConfig\nexport type AlchemySmartAccountClientConfig<\n chain extends Chain | undefined = Chain | undefined,\n account extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n context extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n> = {\n account?: account;\n useSimulation?: boolean;\n policyId?: string | string[];\n policyToken?: {\n address: Address;\n approvalMode?: \"NONE\" | \"PERMIT\";\n maxTokenAmount?: bigint;\n erc20Name?: string;\n version?: string;\n };\n} & Pick<\n SmartAccountClientConfig<AlchemyTransport, chain, account, context>,\n | \"customMiddleware\"\n | \"feeEstimator\"\n | \"gasEstimator\"\n | \"signUserOperation\"\n | \"transport\"\n | \"chain\"\n | \"opts\"\n>;\n// #endregion AlchemySmartAccountClientConfig\n\nexport type BaseAlchemyActions<\n chain extends Chain | undefined = Chain | undefined,\n account extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n context extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n> = SmartAccountClientActions<chain, account, context> &\n AlchemySmartAccountClientActions<account, context>;\n\nexport type AlchemySmartAccountClient_Base<\n chain extends Chain | undefined = Chain | undefined,\n account extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n actions extends Record<string, unknown> = Record<string, unknown>,\n context extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n> = Prettify<\n SmartAccountClient<\n AlchemyTransport,\n chain,\n account,\n actions & BaseAlchemyActions<chain, account, context>,\n [...SmartAccountClientRpcSchema, ...AlchemyRpcSchema],\n context\n >\n>;\n\nexport type AlchemySmartAccountClient<\n chain extends Chain | undefined = Chain | undefined,\n account extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n actions extends Record<string, unknown> = Record<string, unknown>,\n context extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n> = Prettify<AlchemySmartAccountClient_Base<chain, account, actions, context>>;\n\nexport function createAlchemySmartAccountClient<\n TChain extends Chain = Chain,\n TAccount extends SmartContractAccount | undefined =\n | SmartContractAccount\n | undefined,\n TContext extends UserOperationContext | undefined =\n | UserOperationContext\n | undefined\n>(\n params: AlchemySmartAccountClientConfig<TChain, TAccount, TContext>\n): AlchemySmartAccountClient<TChain, TAccount, Record<string, never>, TContext>;\n\n/**\n * Creates an Alchemy smart account client using the provided configuration options, including account details, gas manager configuration, and custom middleware.\n *\n * @example\n * ```ts\n * import { createAlchemySmartAccountClient, alchemy } from \"@account-kit/infra\";\n * import { sepolia } from \"@account-kit/infra/chain\";\n *\n * const client = createAlchemySmartAccountClient({\n * chain: sepolia,\n * transport: alchemy({ apiKey: \"your-api-key\" }),\n * });\n * ```\n *\n * @param {AlchemySmartAccountClientConfig} config The configuration for creating the Alchemy smart account client\n * @returns {AlchemySmartAccountClient} An instance of `AlchemySmartAccountClient` configured based on the provided options\n */\nexport function createAlchemySmartAccountClient(\n config: AlchemySmartAccountClientConfig\n): AlchemySmartAccountClient {\n if (!config.chain) {\n throw new ChainNotFoundError();\n }\n\n const feeOptions =\n config.opts?.feeOptions ?? getDefaultUserOperationFeeOptions(config.chain);\n\n const scaClient = createSmartAccountClient({\n account: config.account,\n transport: config.transport,\n chain: config.chain,\n type: \"AlchemySmartAccountClient\",\n opts: {\n ...config.opts,\n feeOptions,\n },\n feeEstimator: config.feeEstimator ?? alchemyFeeEstimator(config.transport),\n gasEstimator: config.gasEstimator,\n customMiddleware: async (struct, args) => {\n if (isSmartAccountWithSigner(args.account)) {\n config.transport.updateHeaders(getSignerTypeHeader(args.account));\n }\n return config.customMiddleware\n ? config.customMiddleware(struct, args)\n : struct;\n },\n ...(config.policyId\n ? alchemyGasAndPaymasterAndDataMiddleware({\n policyId: config.policyId,\n policyToken: config.policyToken,\n transport: config.transport,\n gasEstimatorOverride: config.gasEstimator,\n feeEstimatorOverride: config.feeEstimator,\n })\n : {}),\n userOperationSimulator: config.useSimulation\n ? alchemyUserOperationSimulator(config.transport)\n : undefined,\n signUserOperation: config.signUserOperation,\n addBreadCrumb(breadcrumb: string) {\n const oldConfig = config.transport.config;\n const dynamicFetchOptions = config.transport.dynamicFetchOptions;\n const newTransport = alchemy({ ...oldConfig });\n newTransport.updateHeaders(\n headersUpdate(breadcrumb)(\n convertHeadersToObject(dynamicFetchOptions?.headers)\n )\n );\n return createAlchemySmartAccountClient({\n ...config,\n transport: newTransport,\n }) as any;\n },\n })\n .extend(alchemyActions)\n .extend((client_) => ({\n addBreadcrumb(breadcrumb: string) {\n return clientHeaderTrack(client_, breadcrumb);\n },\n }));\n\n if (config.account && isSmartAccountWithSigner(config.account)) {\n config.transport.updateHeaders(getSignerTypeHeader(config.account));\n }\n\n return scaClient;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { Address, Chain } from "viem";
1
+ import type { Address, Chain, Hex } from "viem";
2
2
  export declare const AlchemyPaymasterAddressV3 = "0x4f84a207A80c39E9e8BaE717c1F25bA7AD1fB08F";
3
3
  export declare const AlchemyPaymasterAddressV2 = "0x4Fd9098af9ddcB41DA48A1d78F91F1398965addc";
4
4
  export declare const ArbSepoliaPaymasterAddress = "0x0804Afe6EEFb73ce7F93CD0d5e7079a5a8068592";
@@ -19,3 +19,48 @@ export declare const AlchemyPaymasterAddressV1 = "0xc03aac639bb21233e01393819703
19
19
  * @deprecated This chain list in this function is no longer maintained since the ERC-7677 middleware is typically used to resolve the paymaster address
20
20
  */
21
21
  export declare const getAlchemyPaymasterAddress: (chain: Chain) => Address;
22
+ export declare const PermitTypes: {
23
+ readonly EIP712Domain: readonly [{
24
+ readonly name: "name";
25
+ readonly type: "string";
26
+ }, {
27
+ readonly name: "version";
28
+ readonly type: "string";
29
+ }, {
30
+ readonly name: "chainId";
31
+ readonly type: "uint256";
32
+ }, {
33
+ readonly name: "verifyingContract";
34
+ readonly type: "address";
35
+ }];
36
+ readonly Permit: readonly [{
37
+ readonly name: "owner";
38
+ readonly type: "address";
39
+ }, {
40
+ readonly name: "spender";
41
+ readonly type: "address";
42
+ }, {
43
+ readonly name: "value";
44
+ readonly type: "uint256";
45
+ }, {
46
+ readonly name: "nonce";
47
+ readonly type: "uint256";
48
+ }, {
49
+ readonly name: "deadline";
50
+ readonly type: "uint256";
51
+ }];
52
+ };
53
+ export declare const EIP712NoncesAbi: readonly ["function nonces(address owner) external view returns (uint)"];
54
+ export type PermitMessage = {
55
+ owner: Hex;
56
+ spender: Hex;
57
+ value: bigint;
58
+ nonce: bigint;
59
+ deadline: bigint;
60
+ };
61
+ export type PermitDomain = {
62
+ name: string;
63
+ version: string;
64
+ chainId: bigint;
65
+ verifyingContract: Hex;
66
+ };
@@ -43,4 +43,22 @@ export const getAlchemyPaymasterAddress = (chain) => {
43
43
  throw new Error(`Unsupported chain: ${chain}`);
44
44
  }
45
45
  };
46
+ export const PermitTypes = {
47
+ EIP712Domain: [
48
+ { name: "name", type: "string" },
49
+ { name: "version", type: "string" },
50
+ { name: "chainId", type: "uint256" },
51
+ { name: "verifyingContract", type: "address" },
52
+ ],
53
+ Permit: [
54
+ { name: "owner", type: "address" },
55
+ { name: "spender", type: "address" },
56
+ { name: "value", type: "uint256" },
57
+ { name: "nonce", type: "uint256" },
58
+ { name: "deadline", type: "uint256" },
59
+ ],
60
+ };
61
+ export const EIP712NoncesAbi = [
62
+ "function nonces(address owner) external view returns (uint)",
63
+ ];
46
64
  //# sourceMappingURL=gas-manager.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gas-manager.js","sourceRoot":"","sources":["../../src/gas-manager.ts"],"names":[],"mappings":"AACA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CAAC;IACnD,CAAC;AACH,CAAC,CAAC","sourcesContent":["import type { Address, Chain } from \"viem\";\nimport {\n arbitrum,\n arbitrumSepolia,\n base,\n baseSepolia,\n fraxtal,\n fraxtalSepolia,\n mainnet,\n optimism,\n optimismSepolia,\n polygon,\n polygonAmoy,\n polygonMumbai,\n sepolia,\n zora,\n zoraSepolia,\n} from \"./chains.js\";\n\nexport const AlchemyPaymasterAddressV3 =\n \"0x4f84a207A80c39E9e8BaE717c1F25bA7AD1fB08F\";\nexport const AlchemyPaymasterAddressV2 =\n \"0x4Fd9098af9ddcB41DA48A1d78F91F1398965addc\";\nexport const ArbSepoliaPaymasterAddress =\n \"0x0804Afe6EEFb73ce7F93CD0d5e7079a5a8068592\";\nexport const AlchemyPaymasterAddressV1 =\n \"0xc03aac639bb21233e0139381970328db8bceeb67\";\n\n/**\n * Retrieves the Alchemy paymaster address for the given chain. Returns different addresses based on the chain ID.\n *\n * @example\n * ```ts\n * import { sepolia, getAlchemyPaymasterAddress } from \"@account-kit/infra\";\n *\n * const paymasterAddress = getAlchemyPaymasterAddress(sepolia);\n * ```\n *\n * @param {Chain} chain The chain for which the paymaster address is required\n * @returns {Address} The Alchemy paymaster address corresponding to the specified chain\n *\n * @deprecated This chain list in this function is no longer maintained since the ERC-7677 middleware is typically used to resolve the paymaster address\n */\nexport const getAlchemyPaymasterAddress = (chain: Chain): Address => {\n switch (chain.id) {\n case polygonAmoy.id:\n case optimismSepolia.id:\n case baseSepolia.id:\n case zora.id:\n case zoraSepolia.id:\n case fraxtal.id:\n case fraxtalSepolia.id:\n return AlchemyPaymasterAddressV3;\n case mainnet.id:\n case arbitrum.id:\n case optimism.id:\n case polygon.id:\n case base.id:\n return AlchemyPaymasterAddressV2;\n case arbitrumSepolia.id:\n return ArbSepoliaPaymasterAddress;\n case sepolia.id:\n case polygonMumbai.id:\n return AlchemyPaymasterAddressV1;\n default:\n throw new Error(`Unsupported chain: ${chain}`);\n }\n};\n"]}
1
+ {"version":3,"file":"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nC;YACE,MAAM,IAAI,KAAK,CAAC,sBAAsB,KAAK,EAAE,CAAC,CAAC;IACnD,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,YAAY,EAAE;QACZ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;QAChC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE;QACnC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;QACpC,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,SAAS,EAAE;KAC/C;IACD,MAAM,EAAE;QACN,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;QAClC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;QACpC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;QAClC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;QAClC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE;KACtC;CACO,CAAC;AAEX,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,6DAA6D;CACrD,CAAC","sourcesContent":["import type { Address, Chain, Hex } from \"viem\";\nimport {\n arbitrum,\n arbitrumSepolia,\n base,\n baseSepolia,\n fraxtal,\n fraxtalSepolia,\n mainnet,\n optimism,\n optimismSepolia,\n polygon,\n polygonAmoy,\n polygonMumbai,\n sepolia,\n zora,\n zoraSepolia,\n} from \"./chains.js\";\n\nexport const AlchemyPaymasterAddressV3 =\n \"0x4f84a207A80c39E9e8BaE717c1F25bA7AD1fB08F\";\nexport const AlchemyPaymasterAddressV2 =\n \"0x4Fd9098af9ddcB41DA48A1d78F91F1398965addc\";\nexport const ArbSepoliaPaymasterAddress =\n \"0x0804Afe6EEFb73ce7F93CD0d5e7079a5a8068592\";\nexport const AlchemyPaymasterAddressV1 =\n \"0xc03aac639bb21233e0139381970328db8bceeb67\";\n\n/**\n * Retrieves the Alchemy paymaster address for the given chain. Returns different addresses based on the chain ID.\n *\n * @example\n * ```ts\n * import { sepolia, getAlchemyPaymasterAddress } from \"@account-kit/infra\";\n *\n * const paymasterAddress = getAlchemyPaymasterAddress(sepolia);\n * ```\n *\n * @param {Chain} chain The chain for which the paymaster address is required\n * @returns {Address} The Alchemy paymaster address corresponding to the specified chain\n *\n * @deprecated This chain list in this function is no longer maintained since the ERC-7677 middleware is typically used to resolve the paymaster address\n */\nexport const getAlchemyPaymasterAddress = (chain: Chain): Address => {\n switch (chain.id) {\n case polygonAmoy.id:\n case optimismSepolia.id:\n case baseSepolia.id:\n case zora.id:\n case zoraSepolia.id:\n case fraxtal.id:\n case fraxtalSepolia.id:\n return AlchemyPaymasterAddressV3;\n case mainnet.id:\n case arbitrum.id:\n case optimism.id:\n case polygon.id:\n case base.id:\n return AlchemyPaymasterAddressV2;\n case arbitrumSepolia.id:\n return ArbSepoliaPaymasterAddress;\n case sepolia.id:\n case polygonMumbai.id:\n return AlchemyPaymasterAddressV1;\n default:\n throw new Error(`Unsupported chain: ${chain}`);\n }\n};\n\nexport const PermitTypes = {\n EIP712Domain: [\n { name: \"name\", type: \"string\" },\n { name: \"version\", type: \"string\" },\n { name: \"chainId\", type: \"uint256\" },\n { name: \"verifyingContract\", type: \"address\" },\n ],\n Permit: [\n { name: \"owner\", type: \"address\" },\n { name: \"spender\", type: \"address\" },\n { name: \"value\", type: \"uint256\" },\n { name: \"nonce\", type: \"uint256\" },\n { name: \"deadline\", type: \"uint256\" },\n ],\n} as const;\n\nexport const EIP712NoncesAbi = [\n \"function nonces(address owner) external view returns (uint)\",\n] as const;\n\nexport type PermitMessage = {\n owner: Hex;\n spender: Hex;\n value: bigint;\n nonce: bigint;\n deadline: bigint;\n};\n\nexport type PermitDomain = {\n name: string;\n version: string;\n chainId: bigint;\n verifyingContract: Hex;\n};\n"]}
@@ -4,7 +4,7 @@ export type * from "./actions/types.js";
4
4
  export type * from "./alchemyTransport.js";
5
5
  export { alchemy, isAlchemyTransport } from "./alchemyTransport.js";
6
6
  export type * from "./chains.js";
7
- export { arbitrum, arbitrumGoerli, arbitrumNova, arbitrumSepolia, base, baseGoerli, baseSepolia, defineAlchemyChain, fraxtal, fraxtalSepolia, goerli, mainnet, optimism, optimismGoerli, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, shape, shapeSepolia, worldChain, worldChainSepolia, zora, zoraSepolia, beraChainBartio, opbnbMainnet, opbnbTestnet, soneiumMinato, soneiumMainnet, unichainMainnet, unichainSepolia, inkMainnet, inkSepolia, mekong, monadTestnet, openlootSepolia, gensynTestnet, riseTestnet, } from "./chains.js";
7
+ export { arbitrum, arbitrumGoerli, arbitrumNova, arbitrumSepolia, base, baseGoerli, baseSepolia, defineAlchemyChain, fraxtal, fraxtalSepolia, goerli, mainnet, optimism, optimismGoerli, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, shape, shapeSepolia, worldChain, worldChainSepolia, zora, zoraSepolia, beraChainBartio, opbnbMainnet, opbnbTestnet, soneiumMinato, soneiumMainnet, unichainMainnet, unichainSepolia, inkMainnet, inkSepolia, mekong, monadTestnet, openlootSepolia, gensynTestnet, riseTestnet, storyMainnet, storyAeneid, } from "./chains.js";
8
8
  export type * from "./client/decorators/alchemyEnhancedApis.js";
9
9
  export { alchemyEnhancedApiActions } from "./client/decorators/alchemyEnhancedApis.js";
10
10
  export type * from "./client/decorators/smartAccount.js";
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { simulateUserOperationChanges } from "./actions/simulateUserOperationChanges.js";
2
2
  export { alchemy, isAlchemyTransport } from "./alchemyTransport.js";
3
- export { arbitrum, arbitrumGoerli, arbitrumNova, arbitrumSepolia, base, baseGoerli, baseSepolia, defineAlchemyChain, fraxtal, fraxtalSepolia, goerli, mainnet, optimism, optimismGoerli, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, shape, shapeSepolia, worldChain, worldChainSepolia, zora, zoraSepolia, beraChainBartio, opbnbMainnet, opbnbTestnet, soneiumMinato, soneiumMainnet, unichainMainnet, unichainSepolia, inkMainnet, inkSepolia, mekong, monadTestnet, openlootSepolia, gensynTestnet, riseTestnet, } from "./chains.js";
3
+ export { arbitrum, arbitrumGoerli, arbitrumNova, arbitrumSepolia, base, baseGoerli, baseSepolia, defineAlchemyChain, fraxtal, fraxtalSepolia, goerli, mainnet, optimism, optimismGoerli, optimismSepolia, polygon, polygonAmoy, polygonMumbai, sepolia, shape, shapeSepolia, worldChain, worldChainSepolia, zora, zoraSepolia, beraChainBartio, opbnbMainnet, opbnbTestnet, soneiumMinato, soneiumMainnet, unichainMainnet, unichainSepolia, inkMainnet, inkSepolia, mekong, monadTestnet, openlootSepolia, gensynTestnet, riseTestnet, storyMainnet, storyAeneid, } from "./chains.js";
4
4
  export { alchemyEnhancedApiActions } from "./client/decorators/alchemyEnhancedApis.js";
5
5
  export { alchemyActions } from "./client/decorators/smartAccount.js";
6
6
  export { isAlchemySmartAccountClient } from "./client/isAlchemySmartAccountClient.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAGzF,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EACL,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,eAAe,EACf,IAAI,EACJ,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,cAAc,EACd,MAAM,EACN,OAAO,EACP,QAAQ,EACR,cAAc,EACd,eAAe,EACf,OAAO,EACP,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,EACL,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,IAAI,EACJ,WAAW,EACX,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc,EACd,eAAe,EACf,eAAe,EACf,UAAU,EACV,UAAU,EACV,MAAM,EACN,YAAY,EACZ,eAAe,EACf,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AAEvF,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAEtF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AAEjF,OAAO,EAAE,iCAAiC,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EACL,2BAA2B,EAC3B,uCAAuC,GACxC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC","sourcesContent":["export type * from \"./actions/simulateUserOperationChanges.js\";\nexport { simulateUserOperationChanges } from \"./actions/simulateUserOperationChanges.js\";\nexport type * from \"./actions/types.js\";\nexport type * from \"./alchemyTransport.js\";\nexport { alchemy, isAlchemyTransport } from \"./alchemyTransport.js\";\nexport type * from \"./chains.js\";\nexport {\n arbitrum,\n arbitrumGoerli,\n arbitrumNova,\n arbitrumSepolia,\n base,\n baseGoerli,\n baseSepolia,\n defineAlchemyChain,\n fraxtal,\n fraxtalSepolia,\n goerli,\n mainnet,\n optimism,\n optimismGoerli,\n optimismSepolia,\n polygon,\n polygonAmoy,\n polygonMumbai,\n sepolia,\n shape,\n shapeSepolia,\n worldChain,\n worldChainSepolia,\n zora,\n zoraSepolia,\n beraChainBartio,\n opbnbMainnet,\n opbnbTestnet,\n soneiumMinato,\n soneiumMainnet,\n unichainMainnet,\n unichainSepolia,\n inkMainnet,\n inkSepolia,\n mekong,\n monadTestnet,\n openlootSepolia,\n gensynTestnet,\n riseTestnet,\n} from \"./chains.js\";\nexport type * from \"./client/decorators/alchemyEnhancedApis.js\";\nexport { alchemyEnhancedApiActions } from \"./client/decorators/alchemyEnhancedApis.js\";\nexport type * from \"./client/decorators/smartAccount.js\";\nexport { alchemyActions } from \"./client/decorators/smartAccount.js\";\nexport { isAlchemySmartAccountClient } from \"./client/isAlchemySmartAccountClient.js\";\nexport type * from \"./client/rpcClient.js\";\nexport { createAlchemyPublicRpcClient } from \"./client/rpcClient.js\";\nexport type * from \"./client/smartAccountClient.js\";\nexport { createAlchemySmartAccountClient } from \"./client/smartAccountClient.js\";\nexport type * from \"./client/types.js\";\nexport { getDefaultUserOperationFeeOptions } from \"./defaults.js\";\nexport { getAlchemyPaymasterAddress } from \"./gas-manager.js\";\nexport { alchemyFeeEstimator } from \"./middleware/feeEstimator.js\";\nexport type * from \"./middleware/gasManager.js\";\nexport * from \"./alchemyTrackerHeaders.js\";\nexport {\n alchemyGasManagerMiddleware,\n alchemyGasAndPaymasterAndDataMiddleware,\n} from \"./middleware/gasManager.js\";\nexport { alchemyUserOperationSimulator } from \"./middleware/userOperationSimulator.js\";\nexport type * from \"./schema.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AAGzF,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EACL,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,eAAe,EACf,IAAI,EACJ,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,cAAc,EACd,MAAM,EACN,OAAO,EACP,QAAQ,EACR,cAAc,EACd,eAAe,EACf,OAAO,EACP,WAAW,EACX,aAAa,EACb,OAAO,EACP,KAAK,EACL,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,IAAI,EACJ,WAAW,EACX,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc,EACd,eAAe,EACf,eAAe,EACf,UAAU,EACV,UAAU,EACV,MAAM,EACN,YAAY,EACZ,eAAe,EACf,aAAa,EACb,WAAW,EACX,YAAY,EACZ,WAAW,GACZ,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AAEvF,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAEtF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AAEjF,OAAO,EAAE,iCAAiC,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EACL,2BAA2B,EAC3B,uCAAuC,GACxC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC","sourcesContent":["export type * from \"./actions/simulateUserOperationChanges.js\";\nexport { simulateUserOperationChanges } from \"./actions/simulateUserOperationChanges.js\";\nexport type * from \"./actions/types.js\";\nexport type * from \"./alchemyTransport.js\";\nexport { alchemy, isAlchemyTransport } from \"./alchemyTransport.js\";\nexport type * from \"./chains.js\";\nexport {\n arbitrum,\n arbitrumGoerli,\n arbitrumNova,\n arbitrumSepolia,\n base,\n baseGoerli,\n baseSepolia,\n defineAlchemyChain,\n fraxtal,\n fraxtalSepolia,\n goerli,\n mainnet,\n optimism,\n optimismGoerli,\n optimismSepolia,\n polygon,\n polygonAmoy,\n polygonMumbai,\n sepolia,\n shape,\n shapeSepolia,\n worldChain,\n worldChainSepolia,\n zora,\n zoraSepolia,\n beraChainBartio,\n opbnbMainnet,\n opbnbTestnet,\n soneiumMinato,\n soneiumMainnet,\n unichainMainnet,\n unichainSepolia,\n inkMainnet,\n inkSepolia,\n mekong,\n monadTestnet,\n openlootSepolia,\n gensynTestnet,\n riseTestnet,\n storyMainnet,\n storyAeneid,\n} from \"./chains.js\";\nexport type * from \"./client/decorators/alchemyEnhancedApis.js\";\nexport { alchemyEnhancedApiActions } from \"./client/decorators/alchemyEnhancedApis.js\";\nexport type * from \"./client/decorators/smartAccount.js\";\nexport { alchemyActions } from \"./client/decorators/smartAccount.js\";\nexport { isAlchemySmartAccountClient } from \"./client/isAlchemySmartAccountClient.js\";\nexport type * from \"./client/rpcClient.js\";\nexport { createAlchemyPublicRpcClient } from \"./client/rpcClient.js\";\nexport type * from \"./client/smartAccountClient.js\";\nexport { createAlchemySmartAccountClient } from \"./client/smartAccountClient.js\";\nexport type * from \"./client/types.js\";\nexport { getDefaultUserOperationFeeOptions } from \"./defaults.js\";\nexport { getAlchemyPaymasterAddress } from \"./gas-manager.js\";\nexport { alchemyFeeEstimator } from \"./middleware/feeEstimator.js\";\nexport type * from \"./middleware/gasManager.js\";\nexport * from \"./alchemyTrackerHeaders.js\";\nexport {\n alchemyGasManagerMiddleware,\n alchemyGasAndPaymasterAndDataMiddleware,\n} from \"./middleware/gasManager.js\";\nexport { alchemyUserOperationSimulator } from \"./middleware/userOperationSimulator.js\";\nexport type * from \"./schema.js\";\n"]}
@@ -1,4 +1,4 @@
1
- import type { ClientMiddlewareConfig, ClientMiddlewareFn } from "@aa-sdk/core";
1
+ import type { Address, ClientMiddlewareConfig, ClientMiddlewareFn } from "@aa-sdk/core";
2
2
  import type { AlchemyTransport } from "../alchemyTransport.js";
3
3
  /**
4
4
  * Paymaster middleware factory that uses Alchemy's Gas Manager for sponsoring
@@ -16,16 +16,25 @@ import type { AlchemyTransport } from "../alchemyTransport.js";
16
16
  * });
17
17
  * ```
18
18
  *
19
- * @param {string | string[]} policyId the policyId (or list of policyIds) for Alchemy's gas manager
20
- * @returns {Pick<ClientMiddlewareConfig, "dummyPaymasterAndData" | "paymasterAndData">} partial client middleware configuration containing `dummyPaymasterAndData` and `paymasterAndData`
19
+ * @param {string | string[]} policyId - The policyId (or list of policyIds) for Alchemy's gas manager
20
+ * @param {PolicyToken | undefined} policyToken - The policy token configuration
21
+ * @returns {Pick<ClientMiddlewareConfig, "dummyPaymasterAndData" | "paymasterAndData">} Partial client middleware configuration containing `dummyPaymasterAndData` and `paymasterAndData`
21
22
  */
22
- export declare function alchemyGasManagerMiddleware(policyId: string | string[]): Pick<ClientMiddlewareConfig, "dummyPaymasterAndData" | "paymasterAndData">;
23
+ export declare function alchemyGasManagerMiddleware(policyId: string | string[], policyToken?: PolicyToken): Required<Pick<ClientMiddlewareConfig, "dummyPaymasterAndData" | "paymasterAndData">>;
23
24
  interface AlchemyGasAndPaymasterAndDataMiddlewareParams {
24
25
  policyId: string | string[];
26
+ policyToken?: PolicyToken;
25
27
  transport: AlchemyTransport;
26
28
  gasEstimatorOverride?: ClientMiddlewareFn;
27
29
  feeEstimatorOverride?: ClientMiddlewareFn;
28
30
  }
31
+ export type PolicyToken = {
32
+ address: Address;
33
+ maxTokenAmount?: bigint;
34
+ approvalMode?: "NONE" | "PERMIT";
35
+ erc20Name?: string;
36
+ version?: string;
37
+ };
29
38
  /**
30
39
  * Paymaster middleware factory that uses Alchemy's Gas Manager for sponsoring
31
40
  * transactions. Uses Alchemy's custom `alchemy_requestGasAndPaymasterAndData`
@@ -53,7 +62,7 @@ interface AlchemyGasAndPaymasterAndDataMiddlewareParams {
53
62
  * @param {AlchemyGasAndPaymasterAndDataMiddlewareParams.transport} params.transport fallback transport to use for fee estimation when not using the paymaster
54
63
  * @param {AlchemyGasAndPaymasterAndDataMiddlewareParams.gasEstimatorOverride} params.gasEstimatorOverride custom gas estimator middleware
55
64
  * @param {AlchemyGasAndPaymasterAndDataMiddlewareParams.feeEstimatorOverride} params.feeEstimatorOverride custom fee estimator middleware
56
- * @returns {Pick<ClientMiddlewareConfig, "dummyPaymasterAndData" | "paymasterAndData">} partial client middleware configuration containing `dummyPaymasterAndData` and `paymasterAndData`
65
+ * @returns {Pick<ClientMiddlewareConfig, "dummyPaymasterAndData" | "feeEstimator" | "gasEstimator" | "paymasterAndData">} partial client middleware configuration containing `dummyPaymasterAndData`, `feeEstimator`, `gasEstimator`, and `paymasterAndData`
57
66
  */
58
67
  export declare function alchemyGasAndPaymasterAndDataMiddleware(params: AlchemyGasAndPaymasterAndDataMiddlewareParams): Pick<ClientMiddlewareConfig, "dummyPaymasterAndData" | "feeEstimator" | "gasEstimator" | "paymasterAndData">;
59
68
  export {};