diff --git a/.eslintignore b/.eslintignore index 437939ce53..5b84f20786 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,4 +2,5 @@ examples/**/* site/.vitepress/cache/**/* .nx/* -.github/* \ No newline at end of file +.github/* +/.nx/cache \ No newline at end of file diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/on-pull-request.yml index 7520e9dc9e..8b0deb9b83 100644 --- a/.github/workflows/on-pull-request.yml +++ b/.github/workflows/on-pull-request.yml @@ -44,7 +44,7 @@ jobs: - name: Build env: API_KEY: ${{ secrets.API_KEY }} - run: yarn build + run: yarn build:ci - name: Unit Test run: yarn test diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index e936814284..133386a338 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -61,10 +61,7 @@ jobs: - name: Build env: API_KEY: ${{ secrets.API_KEY }} - run: yarn build - - - name: Lint Write - run: yarn lint:write + run: yarn build:ci - name: Build with VitePress working-directory: site diff --git a/lerna.json b/lerna.json index 6dfd83bb01..7a8d5d2b5d 100644 --- a/lerna.json +++ b/lerna.json @@ -1,8 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "useWorkspaces": true, "version": "3.0.0-alpha.0", - "useNx": true, "npmClient": "yarn", "conventionalCommits": true, "conventionalPrerelease": true, diff --git a/nx.json b/nx.json index 6d5ad8901d..1129264803 100644 --- a/nx.json +++ b/nx.json @@ -1,23 +1,23 @@ { - "tasksRunnerOptions": { - "default": { - "runner": "nx/tasks-runners/default", - "options": { - "cacheableOperations": ["build", "test"] - } - } - }, "targetDefaults": { "build": { "dependsOn": ["^build", "generate"], - "outputs": ["{projectRoot}/dist"] + "outputs": ["{projectRoot}/dist"], + "cache": true }, "test": { - "dependsOn": ["build"] + "dependsOn": ["build"], + "cache": true }, "generate": { "dependsOn": ["^build"], - "outputs": ["{projectRoot}/src/plugins"] + "outputs": ["{projectRoot}/src/plugins"], + "cache": true } + }, + "namedInputs": { + "default": ["{projectRoot}/**/*", "sharedGlobals"], + "sharedGlobals": [], + "production": ["default"] } } diff --git a/package.json b/package.json index 808b0bf879..c7b6ca20de 100644 --- a/package.json +++ b/package.json @@ -14,11 +14,12 @@ "scripts": { "generate": "lerna run generate", "postgenerate": "yarn lint:write", - "build": "lerna run build --ignore=alchemy-daapp --ignore=aa-simple-dapp", + "build": "lerna run build --verbose --ignore=alchemy-daapp --ignore=aa-simple-dapp", + "build:ci": "yarn build && yarn lint:write", "build:examples": "lerna run build", "clean": "lerna run clean", - "test": "lerna run test:run", - "test:e2e": "lerna run test:run-e2e --concurrency=1 --ignore=@alchemy/aa-signers", + "test": "lerna run --verbose test:run", + "test:e2e": "lerna run --verbose test:run-e2e --concurrency=1 --ignore=@alchemy/aa-signers", "lint:write": "eslint . --fix && prettier --write --ignore-unknown .", "lint:check": "eslint . && prettier --check .", "prepare": "husky install", @@ -31,9 +32,10 @@ "eslint-config-react-app": "^7.0.1", "eslint-plugin-import": "^2.27.5", "husky": "^8.0.0", - "lerna": "^6.6.1", + "lerna": "^8.0.2", "lint-staged": "^13.2.2", "node-fetch": "^3.3.1", + "nx": "^17.3.0", "prettier": "^2.8.8", "vitest": "^0.31.0" }, diff --git a/packages/accounts/README.md b/packages/accounts/README.md index dd7fa680dd..3e2ade1e64 100644 --- a/packages/accounts/README.md +++ b/packages/accounts/README.md @@ -36,7 +36,7 @@ If you are looking to add a new account type, please follow the following struct export const MyContractAbi = [] as const; // the as const is important so we can get correct typing from viem ``` -4. If you need to extend the [`SmartAccountProvider`](https://accountkit.alchemy.com/packages/aa-core/provider/introduction.html) class, add a file called `provider.ts` and add your implementation for `SmartAccountProvider`. +4. If you need to extend the [`SmartAccountProvider`](https://accountkit.alchemy.com/packages/aa-core/smart-account-client/introduction.html) class, add a file called `provider.ts` and add your implementation for `SmartAccountProvider`. - Ideally, your `Account` impl should _just_ work with the base provider provided by `aa-core`. - If not, consider generalizing the use case and updating SmartAccountProvider diff --git a/packages/accounts/plugingen/phases/plugin-actions/index.ts b/packages/accounts/plugingen/phases/plugin-actions/index.ts index 3a8a242243..6a6bc20fb4 100644 --- a/packages/accounts/plugingen/phases/plugin-actions/index.ts +++ b/packages/accounts/plugingen/phases/plugin-actions/index.ts @@ -15,6 +15,7 @@ export const PluginActionsGenPhase: Phase = async (input) => { addImport("viem", { name: "EncodeFunctionDataParameters", isType: true }); addImport("viem", { name: "Transport", isType: true }); addImport("viem", { name: "Chain", isType: true }); + addImport("viem", { name: "Client", isType: true }); addImport("@alchemy/aa-core", { name: "SmartContractAccount", isType: true, @@ -23,10 +24,6 @@ export const PluginActionsGenPhase: Phase = async (input) => { name: "UserOperationOverrides", isType: true, }); - addImport("@alchemy/aa-core", { - name: "SmartAccountClient", - isType: true, - }); addImport("@alchemy/aa-core", { name: "GetAccountParameter", isType: true, @@ -36,6 +33,8 @@ export const PluginActionsGenPhase: Phase = async (input) => { isType: true, }); addImport("@alchemy/aa-core", { name: "AccountNotFoundError" }); + addImport("@alchemy/aa-core", { name: "isSmartAccountClient" }); + addImport("@alchemy/aa-core", { name: "IncompatibleClientError" }); const providerFunctionDefs: string[] = []; const providerFunctions = executionAbi @@ -58,11 +57,15 @@ export const PluginActionsGenPhase: Phase = async (input) => { n.name }">, "args"> & { overrides?: UserOperationOverrides; } & GetAccountParameter) => Promise `); + const methodName = camelCase(n.name); return dedent` - ${camelCase(n.name)}(${argsParamString}) { + ${methodName}(${argsParamString}) { if (!account) { throw new AccountNotFoundError(); - } + } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError("SmartAccountClient", "${methodName}"); + } const uo = encodeFunctionData({ abi: ${executionAbiConst}, @@ -110,16 +113,10 @@ export const PluginActionsGenPhase: Phase = async (input) => { | SmartContractAccount | undefined >( - client: SmartAccountClient - ) => ${contract.name}Actions = < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined - >( - client: SmartAccountClient - ) => ({ ${providerFunctions.join(",\n")} }); + client: Client + ) => ${ + contract.name + }Actions = (client) => ({ ${providerFunctions.join(",\n")} }); `); return input; diff --git a/packages/accounts/plugingen/phases/plugin-actions/management-actions.ts b/packages/accounts/plugingen/phases/plugin-actions/management-actions.ts index 0573e4c8e3..6820f15777 100644 --- a/packages/accounts/plugingen/phases/plugin-actions/management-actions.ts +++ b/packages/accounts/plugingen/phases/plugin-actions/management-actions.ts @@ -46,12 +46,18 @@ export const ManagementActionsGenPhase: Phase = async (input) => { ` ); + const installMethodName = `install${contract.name}`; + input.content.push(dedent` - install${contract.name}({account = client.account, overrides, ...params}) { + ${installMethodName}({account = client.account, overrides, ...params}) { if (!account) { throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError("SmartAccountClient", "${installMethodName}"); + } + const chain = client.chain; if (!chain) { throw new Error("Chain is required"); diff --git a/packages/accounts/plugingen/phases/plugin-actions/read-actions.ts b/packages/accounts/plugingen/phases/plugin-actions/read-actions.ts index fad3fae8f4..b72ed3a91b 100644 --- a/packages/accounts/plugingen/phases/plugin-actions/read-actions.ts +++ b/packages/accounts/plugingen/phases/plugin-actions/read-actions.ts @@ -21,15 +21,12 @@ export const AccountReadActionsGenPhase: Phase = async (input) => { const argsEncodeString = n.inputs.length > 0 ? "args," : ""; const isViewFunction = n.stateMutability === "view"; + const encodeMethodName = `encode${pascalCase(n.name)}`; accountFunctionActionDefs.push( - dedent`encode${pascalCase( - n.name - )}: (args: Pick, "args">) => Hex` + dedent`${encodeMethodName}: (args: Pick, "args">) => Hex` ); methodContent.push(dedent` - encode${pascalCase(n.name)}(${argsParamString}) { + ${encodeMethodName}(${argsParamString}) { return encodeFunctionData({ abi: ${executionAbiConst}, functionName: "${n.name}", @@ -45,28 +42,23 @@ export const AccountReadActionsGenPhase: Phase = async (input) => { if (isViewFunction) { addImport("viem", { name: "ReadContractReturnType", isType: true }); input.hasReadMethods = true; + const readMethodName = `read${pascalCase(n.name)}`; accountFunctionActionDefs.push( n.inputs.length > 0 - ? dedent`read${pascalCase( - n.name - )}: (args: Pick, "args"> & GetAccountParameter) => Promise>` - : dedent`read${pascalCase( - n.name - )}: (args: GetAccountParameter) => Promise>` + ? dedent`${readMethodName}: (args: Pick, "args"> & GetAccountParameter) => Promise>` + : dedent`${readMethodName}: (args: GetAccountParameter) => Promise>` ); methodContent.push(dedent` - async read${pascalCase(n.name)} (${readArgsParamString}) { + async ${readMethodName} (${readArgsParamString}) { if (!account) { throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError("SmartAccountClient", "${readMethodName}"); + } + return client.readContract({ address: account.address, abi: ${executionAbiConst}, diff --git a/packages/accounts/plugingen/phases/plugin-generator/get-contract-gen.ts b/packages/accounts/plugingen/phases/plugin-generator/get-contract-gen.ts index ff05fe41dc..56cb24db90 100644 --- a/packages/accounts/plugingen/phases/plugin-generator/get-contract-gen.ts +++ b/packages/accounts/plugingen/phases/plugin-generator/get-contract-gen.ts @@ -4,10 +4,6 @@ import type { Phase } from "../../types"; export const GetContractGenPhase: Phase = async (input) => { const { content, contract, addImport } = input; - addImport("@alchemy/aa-core", { - name: "SmartAccountClient", - isType: true, - }); addImport("viem", { name: "getContract", isType: false }); addImport("viem", { name: "GetContractReturnType", isType: true }); addImport("viem", { name: "Address", isType: true }); diff --git a/packages/accounts/src/index.ts b/packages/accounts/src/index.ts index ba67e6ef1e..082458ebf3 100644 --- a/packages/accounts/src/index.ts +++ b/packages/accounts/src/index.ts @@ -5,6 +5,7 @@ export type * from "./light-account/account.js"; export { createLightAccount } from "./light-account/account.js"; export { transferOwnership as transferLightAccountOwnership } from "./light-account/actions/transferOwnership.js"; +export { createLightAccountClient } from "./light-account/createLightAccountClient.js"; export { getLightAccountVersion } from "./light-account/getLightAccountVersion.js"; export type * from "./light-account/lightAccountClientDecorator.js"; export { lightAccountClientActions } from "./light-account/lightAccountClientDecorator.js"; diff --git a/packages/accounts/src/light-account/account.test.ts b/packages/accounts/src/light-account/account.test.ts index d63b589026..976f88c191 100644 --- a/packages/accounts/src/light-account/account.test.ts +++ b/packages/accounts/src/light-account/account.test.ts @@ -1,11 +1,10 @@ import { LocalAccountSigner, - createPublicErc4337FromClient, polygonMumbai, type BatchUserOperationCallData, type SmartAccountSigner, } from "@alchemy/aa-core"; -import { createPublicClient, custom, type Chain } from "viem"; +import { custom, type Chain } from "viem"; import { createLightAccountClient } from "./createLightAccountClient.js"; const chain = polygonMumbai; @@ -89,17 +88,13 @@ const givenConnectedProvider = ({ owner, accountAddress: "0xb856DBD4fA1A79a46D426f537455e7d3E79ab7c4", }, - client: createPublicErc4337FromClient( - createPublicClient({ - transport: custom({ - request: async ({ method }) => { - if (method === "eth_getStorageAt") { - return "0xae8c656ad28F2B59a196AB61815C16A0AE1c3cba"; // v1.1.0 address - } - return; - }, - }), - chain, - }) - ), + transport: custom({ + request: async ({ method }) => { + if (method === "eth_getStorageAt") { + return "0xae8c656ad28F2B59a196AB61815C16A0AE1c3cba"; // v1.1.0 address + } + return; + }, + }), + chain, }); diff --git a/packages/accounts/src/light-account/account.ts b/packages/accounts/src/light-account/account.ts index f2a62789e3..197c029536 100644 --- a/packages/accounts/src/light-account/account.ts +++ b/packages/accounts/src/light-account/account.ts @@ -1,12 +1,13 @@ import { + createBundlerClient, getAccountAddress, getDefaultEntryPointAddress, toSmartContractAccount, type Address, type Hex, type OwnedSmartContractAccount, - type PublicErc4337Client, type SmartAccountSigner, + type ToSmartContractAccountParams, type UpgradeToAndCallParams, } from "@alchemy/aa-core"; import { @@ -43,8 +44,10 @@ export type LightAccount< export type CreateLightAccountParams< TTransport extends Transport = Transport, TOwner extends SmartAccountSigner = SmartAccountSigner -> = { - client: PublicErc4337Client; +> = Pick< + ToSmartContractAccountParams<"LightAccount", TTransport>, + "transport" | "chain" +> & { owner: TOwner; index?: bigint; factoryAddress?: Address; @@ -62,16 +65,22 @@ export async function createLightAccount< ): Promise>; export async function createLightAccount({ - client, + transport, + chain, owner: owner_, accountAddress, initCode, version = "v1.1.0", - entrypointAddress = getDefaultEntryPointAddress(client.chain), - factoryAddress = getDefaultLightAccountFactoryAddress(client.chain, version), + entrypointAddress = getDefaultEntryPointAddress(chain), + factoryAddress = getDefaultLightAccountFactoryAddress(chain, version), index: index_ = 0n, }: CreateLightAccountParams): Promise { let owner = owner_; + const client = createBundlerClient({ + transport, + chain, + }); + const getAccountInitCode = async () => { if (initCode) return initCode; @@ -154,7 +163,8 @@ export async function createLightAccount({ }; const account = await toSmartContractAccount({ - client, + transport, + chain, entrypointAddress, accountAddress: address, source: "LightAccount", diff --git a/packages/accounts/src/light-account/actions/transferOwnership.ts b/packages/accounts/src/light-account/actions/transferOwnership.ts index f59b816662..13ed26c70c 100644 --- a/packages/accounts/src/light-account/actions/transferOwnership.ts +++ b/packages/accounts/src/light-account/actions/transferOwnership.ts @@ -1,11 +1,12 @@ import { AccountNotFoundError, + IncompatibleClientError, + isSmartAccountClient, type GetAccountParameter, type Hex, - type SmartAccountClient, type SmartAccountSigner, } from "@alchemy/aa-core"; -import type { Chain, Transport } from "viem"; +import type { Chain, Client, Transport } from "viem"; import type { LightAccount } from "../account"; export type TransferLightAccountOwnershipParams< @@ -26,7 +27,7 @@ export const transferOwnership: < | LightAccount | undefined >( - client: SmartAccountClient, + client: Client, args: TransferLightAccountOwnershipParams ) => Promise = async ( client, @@ -36,6 +37,13 @@ export const transferOwnership: < throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "transferOwnership" + ); + } + const data = account.encodeTransferOwnership(await newOwner.getAddress()); const result = await client.sendUserOperation({ uo: { diff --git a/packages/accounts/src/light-account/createLightAccountClient.ts b/packages/accounts/src/light-account/createLightAccountClient.ts index 37eca8cd7e..2c6a6eab36 100644 --- a/packages/accounts/src/light-account/createLightAccountClient.ts +++ b/packages/accounts/src/light-account/createLightAccountClient.ts @@ -1,5 +1,5 @@ import { - createSmartAccountClientFromExisting, + createSmartAccountClient, type SmartAccountClient, type SmartAccountClientActions, type SmartAccountClientConfig, @@ -22,9 +22,16 @@ export type CreateLightAccountClientParams< TChain extends Chain | undefined = Chain | undefined, TOwner extends SmartAccountSigner = SmartAccountSigner > = { - client: CreateLightAccountParams["client"]; - account: Omit, "client">; -} & Omit, "transport" | "account">; + transport: CreateLightAccountParams["transport"]; + chain: CreateLightAccountParams["chain"]; + account: Omit< + CreateLightAccountParams, + "transport" | "chain" + >; +} & Omit< + SmartAccountClientConfig, + "transport" | "account" | "chain" +>; export function createLightAccountClient< TChain extends Chain | undefined = Chain | undefined, @@ -43,18 +50,20 @@ export function createLightAccountClient< export async function createLightAccountClient({ account, - client, + transport, + chain, ...clientConfig }: CreateLightAccountClientParams): Promise { const lightAccount = await createLightAccount({ - client, ...account, + transport, + chain, }); - return createSmartAccountClientFromExisting({ + return createSmartAccountClient({ ...clientConfig, - client, - chain: client.chain, + transport, + chain: chain, account: lightAccount, }).extend(lightAccountClientActions); } diff --git a/packages/accounts/src/light-account/e2e-tests/light-account.e2e.test.ts b/packages/accounts/src/light-account/e2e-tests/light-account.e2e.test.ts index b3d0984e04..1b449b3e85 100644 --- a/packages/accounts/src/light-account/e2e-tests/light-account.e2e.test.ts +++ b/packages/accounts/src/light-account/e2e-tests/light-account.e2e.test.ts @@ -2,13 +2,19 @@ import { LocalAccountSigner, LogLevel, Logger, - createPublicErc4337Client, + createBundlerClient, createSmartAccountClientFromExisting, sepolia, type SmartAccountSigner, type UserOperationFeeOptions, } from "@alchemy/aa-core"; -import { isAddress, type Address, type Chain, type HDAccount } from "viem"; +import { + http, + isAddress, + type Address, + type Chain, + type HDAccount, +} from "viem"; import { generatePrivateKey } from "viem/accounts"; import { multiOwnerPluginActions, @@ -239,9 +245,9 @@ describe("Light Account Tests", () => { }); const upgradedProvider = createSmartAccountClientFromExisting({ - client: createPublicErc4337Client({ + client: createBundlerClient({ chain, - rpcUrl: `${chain.rpcUrls.alchemy.http[0]}/${API_KEY!}`, + transport: http(`${chain.rpcUrls.alchemy.http[0]}/${API_KEY!}`), }), account: await createMAAccount(), }).extend(multiOwnerPluginActions); @@ -270,13 +276,9 @@ const givenConnectedProvider = async ({ feeOptions?: UserOperationFeeOptions; version?: LightAccountVersion; }) => { - const publicClient = createPublicErc4337Client({ - chain, - rpcUrl: `${chain.rpcUrls.alchemy.http[0]}/${API_KEY!}`, - }); - return createLightAccountClient({ - client: publicClient, + transport: http(`${chain.rpcUrls.alchemy.http[0]}/${API_KEY!}`), + chain: chain, account: { owner, accountAddress, diff --git a/packages/accounts/src/light-account/lightAccountClientDecorator.ts b/packages/accounts/src/light-account/lightAccountClientDecorator.ts index cf30551549..6416f4cf22 100644 --- a/packages/accounts/src/light-account/lightAccountClientDecorator.ts +++ b/packages/accounts/src/light-account/lightAccountClientDecorator.ts @@ -1,10 +1,9 @@ import type { GetAccountParameter, Hex, - SmartAccountClient, SmartAccountSigner, } from "@alchemy/aa-core"; -import type { Chain, Transport } from "viem"; +import type { Chain, Client, Transport } from "viem"; import type { LightAccount } from "./account"; import { transferOwnership } from "./actions/transferOwnership.js"; @@ -30,7 +29,7 @@ export const lightAccountClientActions: < | LightAccount | undefined >( - client: SmartAccountClient + client: Client ) => LightAccountClientActions = (client) => ({ transferOwnership: async (args) => transferOwnership(client, args), }); diff --git a/packages/accounts/src/msca/account-loupe/decorator.ts b/packages/accounts/src/msca/account-loupe/decorator.ts index e07dc3b121..2d15bbc255 100644 --- a/packages/accounts/src/msca/account-loupe/decorator.ts +++ b/packages/accounts/src/msca/account-loupe/decorator.ts @@ -1,10 +1,11 @@ import { AccountNotFoundError, + IncompatibleClientError, + isSmartAccountClient, type GetAccountParameter, - type SmartAccountClient, type SmartContractAccount, } from "@alchemy/aa-core"; -import type { Address, Chain, Hash, Transport } from "viem"; +import type { Address, Chain, Client, Hash, Transport } from "viem"; import { IAccountLoupeAbi } from "../abis/IAccountLoupe.js"; import type { ExecutionFunctionConfig, @@ -57,7 +58,7 @@ export const accountLoupeActions: < | SmartContractAccount | undefined >( - client: SmartAccountClient + client: Client ) => AccountLoupeActions = (client) => ({ getExecutionFunctionConfig: async ({ selector, @@ -67,6 +68,13 @@ export const accountLoupeActions: < throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "getExecutionFunctionConfig" + ); + } + return client.readContract({ address: account.address, abi: IAccountLoupeAbi, @@ -80,6 +88,13 @@ export const accountLoupeActions: < throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "getExecutionHooks" + ); + } + return client.readContract({ address: account.address, abi: IAccountLoupeAbi, @@ -92,6 +107,14 @@ export const accountLoupeActions: < if (!account) { throw new AccountNotFoundError(); } + + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "getPreValidationHooks" + ); + } + return client.readContract({ address: account.address, abi: IAccountLoupeAbi, @@ -105,6 +128,13 @@ export const accountLoupeActions: < throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "getInstalledPlugins" + ); + } + return client.readContract({ address: account.address, abi: IAccountLoupeAbi, diff --git a/packages/accounts/src/msca/account/multiOwnerAccount.ts b/packages/accounts/src/msca/account/multiOwnerAccount.ts index b0e6b0b74f..72c0b0f533 100644 --- a/packages/accounts/src/msca/account/multiOwnerAccount.ts +++ b/packages/accounts/src/msca/account/multiOwnerAccount.ts @@ -1,16 +1,17 @@ import { + createBundlerClient, getAccountAddress, getDefaultEntryPointAddress, toSmartContractAccount, type Address, type OwnedSmartContractAccount, - type PublicErc4337Client, type SmartAccountSigner, } from "@alchemy/aa-core"; import { concatHex, encodeFunctionData, hexToBigInt, + type Chain, type Hex, type Transport, } from "viem"; @@ -31,7 +32,8 @@ export type CreateMultiOwnerModularAccountParams< TTransport extends Transport = Transport, TOwner extends SmartAccountSigner = SmartAccountSigner > = { - client: PublicErc4337Client; + transport: TTransport; + chain: Chain; owner: TOwner; index?: bigint; factoryAddress?: Address; @@ -50,17 +52,22 @@ export async function createMultiOwnerModularAccount< ): Promise>; export async function createMultiOwnerModularAccount({ - client, + transport, + chain, owner: owner_, accountAddress, initCode, - entrypointAddress = getDefaultEntryPointAddress(client.chain), + entrypointAddress = getDefaultEntryPointAddress(chain), excludeDefaultTokenReceiverPlugin = false, - factoryAddress = getDefaultMultiOwnerMSCAFactoryAddress(client.chain), + factoryAddress = getDefaultMultiOwnerMSCAFactoryAddress(chain), owners = [], index = 0n, }: CreateMultiOwnerModularAccountParams): Promise { let owner = owner_; + const client = createBundlerClient({ + transport, + chain, + }); const getAccountInitCode = async () => { if (initCode) { return initCode; @@ -97,7 +104,8 @@ export async function createMultiOwnerModularAccount({ }); const baseAccount = await toSmartContractAccount({ - client, + transport, + chain, entrypointAddress, accountAddress, source: `ModularAccount${ diff --git a/packages/accounts/src/msca/account/sessionKey.ts b/packages/accounts/src/msca/account/sessionKey.ts deleted file mode 100644 index bd1c185b32..0000000000 --- a/packages/accounts/src/msca/account/sessionKey.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { type SmartAccountSigner } from "@alchemy/aa-core"; -import { type Address, type Transport } from "viem"; -import { multiOwnerMessageSigner } from "../plugins/multi-owner/signer.js"; -import { SessionKeyPlugin } from "../plugins/session-key/plugin.js"; -import { SessionKeySigner } from "../plugins/session-key/signer.js"; -import { - createMultiOwnerModularAccount, - type CreateMultiOwnerModularAccountParams, - type MultiOwnerModularAccount, -} from "./multiOwnerAccount.js"; - -export type MultiOwnerSessionKeyAccount = - Omit>, "source"> & { - source: "SessionKeyModularAccount"; - isSessionKeyActive: (pluginAddress?: Address) => Promise; - }; - -export type CreateMultiOwnerSessionKeyAccountParams< - TTransport extends Transport = Transport, - TOwner extends SmartAccountSigner = SmartAccountSigner -> = CreateMultiOwnerModularAccountParams & { - storageType?: "local-storage" | "session-storage"; - storageKey?: string; -}; - -export async function createMultiOwnerModularAccountWithSessionKey< - TTransport extends Transport = Transport, - TOwner extends SmartAccountSigner = SmartAccountSigner ->( - config: CreateMultiOwnerSessionKeyAccountParams -): Promise>; - -export async function createMultiOwnerModularAccountWithSessionKey({ - storageKey, - storageType, - ...config -}: CreateMultiOwnerSessionKeyAccountParams) { - const account = await createMultiOwnerModularAccount(config); - - const sessionKeySigner = new SessionKeySigner({ - fallbackSigner: account.getOwner(), - storageKey, - storageType, - }); - - const isSessionKeyActive = async (pluginAddress?: Address) => { - // TODO: check if the account actually has the plugin installed - // either via account loupe or checking if the supports interface call passes on the account - const contract = SessionKeyPlugin.getContract(config.client, pluginAddress); - - const sessionKey = await sessionKeySigner.getAddress(); - - // if this throws, then session key or the plugin is not installed - if ( - await contract.read - .isSessionKeyOf([account.address, sessionKey]) - .catch(() => false) - ) { - // TODO: Technically the key could be over its usage limit, but we'll come back to that later because - // that requires the provider trying to validate a UO first - return true; - } - - return sessionKeySigner.isKeyActive(); - }; - - const withSessionKey = await createMultiOwnerModularAccount({ - ...config, - owner: sessionKeySigner, - }); - - return { - ...withSessionKey, - source: "SessionKeyModularAccount", - isSessionKeyActive, - ...multiOwnerMessageSigner( - config.client, - account.address, - withSessionKey.getOwner - ), - }; -} diff --git a/packages/accounts/src/msca/plugin-manager/decorator.ts b/packages/accounts/src/msca/plugin-manager/decorator.ts index 1b5586e7b3..a141ca0c0a 100644 --- a/packages/accounts/src/msca/plugin-manager/decorator.ts +++ b/packages/accounts/src/msca/plugin-manager/decorator.ts @@ -1,9 +1,8 @@ import type { SendUserOperationResult, - SmartAccountClient, SmartContractAccount, } from "@alchemy/aa-core"; -import type { Chain, Transport } from "viem"; +import type { Chain, Client, Transport } from "viem"; import { installPlugin, type InstallPluginParams } from "./installPlugin.js"; import { uninstallPlugin, @@ -30,7 +29,7 @@ export const pluginManagerActions: < | SmartContractAccount | undefined >( - client: SmartAccountClient + client: Client ) => PluginManagerActions = (client) => ({ installPlugin: async (params) => installPlugin(client, params), uninstallPlugin: async (params) => uninstallPlugin(client, params), diff --git a/packages/accounts/src/msca/plugin-manager/installPlugin.ts b/packages/accounts/src/msca/plugin-manager/installPlugin.ts index bb983ae978..8ea99478d0 100644 --- a/packages/accounts/src/msca/plugin-manager/installPlugin.ts +++ b/packages/accounts/src/msca/plugin-manager/installPlugin.ts @@ -1,5 +1,7 @@ import { AccountNotFoundError, + IncompatibleClientError, + isSmartAccountClient, type GetAccountParameter, type SmartAccountClient, type SmartContractAccount, @@ -11,6 +13,7 @@ import { keccak256, type Address, type Chain, + type Client, type Hash, type Transport, } from "viem"; @@ -36,7 +39,7 @@ export async function installPlugin< | SmartContractAccount | undefined >( - client: SmartAccountClient, + client: Client, { overrides, account = client.account, @@ -47,6 +50,10 @@ export async function installPlugin< throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError("SmartAccountClient", "installPlugin"); + } + const callData = await encodeInstallPluginUserOperation(client, params); return client.sendUserOperation({ uo: callData, overrides, account }); } diff --git a/packages/accounts/src/msca/plugin-manager/uninstallPlugin.ts b/packages/accounts/src/msca/plugin-manager/uninstallPlugin.ts index 4431ff2027..0d7b0a5a62 100644 --- a/packages/accounts/src/msca/plugin-manager/uninstallPlugin.ts +++ b/packages/accounts/src/msca/plugin-manager/uninstallPlugin.ts @@ -1,7 +1,8 @@ import { AccountNotFoundError, + IncompatibleClientError, + isSmartAccountClient, type GetAccountParameter, - type SmartAccountClient, type SmartContractAccount, type UserOperationOverrides, } from "@alchemy/aa-core"; @@ -9,6 +10,7 @@ import { encodeFunctionData, type Address, type Chain, + type Client, type Hash, type Transport, } from "viem"; @@ -31,7 +33,7 @@ export async function uninstallPlugin< | SmartContractAccount | undefined >( - client: SmartAccountClient, + client: Client, { overrides, account = client.account, @@ -42,6 +44,10 @@ export async function uninstallPlugin< throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError("SmartAccountClient", "uninstallPlugin"); + } + const callData = await encodeUninstallPluginUserOperation(params); return client.sendUserOperation({ uo: callData, overrides, account }); } diff --git a/packages/accounts/src/msca/plugins/multi-owner/plugin.ts b/packages/accounts/src/msca/plugins/multi-owner/plugin.ts index a3f45884ff..03c4860f3a 100644 --- a/packages/accounts/src/msca/plugins/multi-owner/plugin.ts +++ b/packages/accounts/src/msca/plugins/multi-owner/plugin.ts @@ -12,15 +12,16 @@ import { type Hex, type ReadContractReturnType, } from "viem"; +import { type Plugin } from "../types.js"; import { AccountNotFoundError, - type SmartAccountClient, + isSmartAccountClient, + IncompatibleClientError, type SmartContractAccount, type UserOperationOverrides, type GetAccountParameter, type SendUserOperationResult, } from "@alchemy/aa-core"; -import { type Plugin } from "../types.js"; import { installPlugin as installPlugin_ } from "../../plugin-manager/installPlugin.js"; import { type FunctionReference } from "../../account-loupe/types.js"; @@ -169,20 +170,15 @@ export const multiOwnerPluginActions: < | SmartContractAccount | undefined >( - client: SmartAccountClient -) => MultiOwnerPluginActions = < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined ->( - client: SmartAccountClient -) => ({ + client: Client +) => MultiOwnerPluginActions = (client) => ({ updateOwners({ args, overrides, account = client.account }) { if (!account) { throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError("SmartAccountClient", "updateOwners"); + } const uo = encodeFunctionData({ abi: MultiOwnerPluginExecutionFunctionAbi, @@ -197,6 +193,13 @@ export const multiOwnerPluginActions: < throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "installMultiOwnerPlugin" + ); + } + const chain = client.chain; if (!chain) { throw new Error("Chain is required"); @@ -240,6 +243,13 @@ export const multiOwnerPluginActions: < throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "readEip712Domain" + ); + } + return client.readContract({ address: account.address, abi: MultiOwnerPluginExecutionFunctionAbi, @@ -259,6 +269,13 @@ export const multiOwnerPluginActions: < throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "readIsValidSignature" + ); + } + return client.readContract({ address: account.address, abi: MultiOwnerPluginExecutionFunctionAbi, diff --git a/packages/accounts/src/msca/plugins/multi-owner/signer.ts b/packages/accounts/src/msca/plugins/multi-owner/signer.ts index 63f1f123c9..870c84d805 100644 --- a/packages/accounts/src/msca/plugins/multi-owner/signer.ts +++ b/packages/accounts/src/msca/plugins/multi-owner/signer.ts @@ -1,6 +1,6 @@ import type { Address, - PublicErc4337Client, + BundlerClient, SmartAccountSigner, } from "@alchemy/aa-core"; import { @@ -20,7 +20,7 @@ export const multiOwnerMessageSigner = < TTransport extends Transport, TSigner extends SmartAccountSigner >( - client: PublicErc4337Client, + client: BundlerClient, accountAddress: Address, owner: () => TSigner, pluginAddress: Address = MultiOwnerPlugin.meta.addresses[client.chain.id] diff --git a/packages/accounts/src/msca/plugins/session-key/plugin.ts b/packages/accounts/src/msca/plugins/session-key/plugin.ts index 38f3020841..4bef72c97d 100644 --- a/packages/accounts/src/msca/plugins/session-key/plugin.ts +++ b/packages/accounts/src/msca/plugins/session-key/plugin.ts @@ -12,15 +12,16 @@ import { type Chain, type Hex, } from "viem"; +import { type Plugin } from "../types.js"; import { AccountNotFoundError, - type SmartAccountClient, + isSmartAccountClient, + IncompatibleClientError, type SmartContractAccount, type UserOperationOverrides, type GetAccountParameter, type SendUserOperationResult, } from "@alchemy/aa-core"; -import { type Plugin } from "../types.js"; import { MultiOwnerPlugin } from "../multi-owner/plugin.js"; import { installPlugin as installPlugin_ } from "../../plugin-manager/installPlugin.js"; import { type FunctionReference } from "../../account-loupe/types.js"; @@ -205,20 +206,18 @@ export const sessionKeyPluginActions: < | SmartContractAccount | undefined >( - client: SmartAccountClient -) => SessionKeyPluginActions = < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined ->( - client: SmartAccountClient -) => ({ + client: Client +) => SessionKeyPluginActions = (client) => ({ executeWithSessionKey({ args, overrides, account = client.account }) { if (!account) { throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "executeWithSessionKey" + ); + } const uo = encodeFunctionData({ abi: SessionKeyPluginExecutionFunctionAbi, @@ -232,6 +231,9 @@ export const sessionKeyPluginActions: < if (!account) { throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError("SmartAccountClient", "addSessionKey"); + } const uo = encodeFunctionData({ abi: SessionKeyPluginExecutionFunctionAbi, @@ -245,6 +247,12 @@ export const sessionKeyPluginActions: < if (!account) { throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "removeSessionKey" + ); + } const uo = encodeFunctionData({ abi: SessionKeyPluginExecutionFunctionAbi, @@ -258,6 +266,12 @@ export const sessionKeyPluginActions: < if (!account) { throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "rotateSessionKey" + ); + } const uo = encodeFunctionData({ abi: SessionKeyPluginExecutionFunctionAbi, @@ -271,6 +285,12 @@ export const sessionKeyPluginActions: < if (!account) { throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "updateKeyPermissions" + ); + } const uo = encodeFunctionData({ abi: SessionKeyPluginExecutionFunctionAbi, @@ -285,6 +305,13 @@ export const sessionKeyPluginActions: < throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "installSessionKeyPlugin" + ); + } + const chain = client.chain; if (!chain) { throw new Error("Chain is required"); diff --git a/packages/accounts/src/msca/plugins/token-receiver/plugin.ts b/packages/accounts/src/msca/plugins/token-receiver/plugin.ts index 49c25700a7..bdc9416083 100644 --- a/packages/accounts/src/msca/plugins/token-receiver/plugin.ts +++ b/packages/accounts/src/msca/plugins/token-receiver/plugin.ts @@ -11,15 +11,16 @@ import { type Chain, type Hex, } from "viem"; +import { type Plugin } from "../types.js"; import { AccountNotFoundError, - type SmartAccountClient, + isSmartAccountClient, + IncompatibleClientError, type SmartContractAccount, type UserOperationOverrides, type GetAccountParameter, type SendUserOperationResult, } from "@alchemy/aa-core"; -import { type Plugin } from "../types.js"; import { installPlugin as installPlugin_ } from "../../plugin-manager/installPlugin.js"; import { type FunctionReference } from "../../account-loupe/types.js"; @@ -179,20 +180,15 @@ export const tokenReceiverPluginActions: < | SmartContractAccount | undefined >( - client: SmartAccountClient -) => TokenReceiverPluginActions = < - TTransport extends Transport = Transport, - TChain extends Chain | undefined = Chain | undefined, - TAccount extends SmartContractAccount | undefined = - | SmartContractAccount - | undefined ->( - client: SmartAccountClient -) => ({ + client: Client +) => TokenReceiverPluginActions = (client) => ({ tokensReceived({ args, overrides, account = client.account }) { if (!account) { throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError("SmartAccountClient", "tokensReceived"); + } const uo = encodeFunctionData({ abi: TokenReceiverPluginExecutionFunctionAbi, @@ -206,6 +202,12 @@ export const tokenReceiverPluginActions: < if (!account) { throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "onErc721Received" + ); + } const uo = encodeFunctionData({ abi: TokenReceiverPluginExecutionFunctionAbi, @@ -219,6 +221,12 @@ export const tokenReceiverPluginActions: < if (!account) { throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "onErc1155Received" + ); + } const uo = encodeFunctionData({ abi: TokenReceiverPluginExecutionFunctionAbi, @@ -232,6 +240,12 @@ export const tokenReceiverPluginActions: < if (!account) { throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "onErc1155BatchReceived" + ); + } const uo = encodeFunctionData({ abi: TokenReceiverPluginExecutionFunctionAbi, @@ -250,6 +264,13 @@ export const tokenReceiverPluginActions: < throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "installTokenReceiverPlugin" + ); + } + const chain = client.chain; if (!chain) { throw new Error("Chain is required"); diff --git a/packages/accounts/src/msca/utils.ts b/packages/accounts/src/msca/utils.ts index 6beafcc195..72263fe7d4 100644 --- a/packages/accounts/src/msca/utils.ts +++ b/packages/accounts/src/msca/utils.ts @@ -6,7 +6,6 @@ import { base, baseGoerli, baseSepolia, - createPublicErc4337FromClient, goerli, mainnet, optimism, @@ -23,7 +22,6 @@ import { } from "@alchemy/aa-core"; import type { Address, Chain, Transport } from "viem"; import { - createPublicClient, custom, encodeAbiParameters, encodeFunctionData, @@ -184,12 +182,8 @@ export async function getMSCAUpgradeToData< initializationData: encodedMSCAInitializeData, createMAAccount: async () => createMultiOwnerModularAccount({ - client: createPublicErc4337FromClient( - createPublicClient({ - chain: chain as Chain, - transport: custom(client.transport), - }) - ), + transport: custom(client.transport), + chain: chain as Chain, owner: account.getOwner(), factoryAddress, accountAddress: account.address, diff --git a/packages/accounts/src/nani-account/__tests__/account.test.ts b/packages/accounts/src/nani-account/__tests__/account.test.ts index fa631e1109..f324ab1ca7 100644 --- a/packages/accounts/src/nani-account/__tests__/account.test.ts +++ b/packages/accounts/src/nani-account/__tests__/account.test.ts @@ -1,11 +1,11 @@ import { LocalAccountSigner, - createPublicErc4337Client, polygonMumbai, type Address, type Hex, type SmartAccountSigner, } from "@alchemy/aa-core"; +import { http } from "viem"; import { createNaniAccount } from "../account.js"; import { getDefaultNaniAccountFactoryAddress } from "../utils.js"; @@ -101,11 +101,8 @@ describe("Nani Account Tests", () => { owner, chain, accountAddress: "0x903072d2112412406597eb5DCAA8CeDD71ea141c", + transport: http(`${chain.rpcUrls.alchemy.http[0]}/test`), factoryAddress: getDefaultNaniAccountFactoryAddress(chain), - rpcClient: createPublicErc4337Client({ - chain, - rpcUrl: `${chain.rpcUrls.alchemy.http[0]}/test`, - }), }); }; }); diff --git a/packages/accounts/src/nani-account/account.ts b/packages/accounts/src/nani-account/account.ts index 2250953474..c608742129 100644 --- a/packages/accounts/src/nani-account/account.ts +++ b/packages/accounts/src/nani-account/account.ts @@ -1,12 +1,13 @@ import { BaseSmartContractAccount, + createBundlerClient, toSmartContractAccount, type BaseSmartAccountParams, type BatchUserOperationCallData, type OwnedSmartContractAccount, - type PublicErc4337Client, type SignTypedDataParams, type SmartAccountSigner, + type ToSmartContractAccountParams, type UserOperationCallData, } from "@alchemy/aa-core"; import { @@ -16,6 +17,7 @@ import { hexToBytes, numberToHex, type Address, + type Chain, type FallbackTransport, type Hash, type Hex, @@ -24,13 +26,15 @@ import { import { NaniAccountAbi } from "./abis/NaniAccountAbi.js"; import { NaniAccountFactoryAbi } from "./abis/NaniAccountFactoryAbi.js"; -export interface NaniSmartAccountParams< +export type NaniSmartAccountParams< TTransport extends Transport | FallbackTransport = Transport -> extends BaseSmartAccountParams { +> = Omit, "rpcClient"> & { owner: SmartAccountSigner; index?: bigint; salt?: Hex; -} + transport: TTransport; + chain: Chain; +}; export type NaniAccount = OwnedSmartContractAccount< "NaniAccount", @@ -48,7 +52,12 @@ class NaniAccount_< protected salt?: Hex; constructor(params: NaniSmartAccountParams) { - super(params); + // This is a hack for now, we should kill the SimpleSmart Account when we kill Base Account + const client = createBundlerClient({ + transport: params.transport as TTransport, + chain: params.chain, + }); + super({ ...params, rpcClient: client }); this.index = params.index ?? 0n; this.owner = params.owner; @@ -221,7 +230,8 @@ class NaniAccount_< } export const createNaniAccount = async ( - params: NaniSmartAccountParams + params: Omit, "rpcClient" | "chain"> & + Pick ): Promise => { if (!params.owner) throw new Error("Owner must be provided."); @@ -229,7 +239,8 @@ export const createNaniAccount = async ( const base = await toSmartContractAccount({ source: "NaniAccount", - client: naniAccount.rpcProvider as PublicErc4337Client, + transport: params.transport, + chain: params.chain, accountAddress: params.accountAddress as Address | undefined, entrypointAddress: naniAccount.getEntryPointAddress(), encodeBatchExecute: naniAccount.encodeBatchExecute.bind(naniAccount), diff --git a/packages/accounts/src/nani-account/transferNaniAccountOwnership.ts b/packages/accounts/src/nani-account/transferNaniAccountOwnership.ts index 46314e18ef..9de36d1861 100644 --- a/packages/accounts/src/nani-account/transferNaniAccountOwnership.ts +++ b/packages/accounts/src/nani-account/transferNaniAccountOwnership.ts @@ -1,10 +1,11 @@ import { AccountNotFoundError, + IncompatibleClientError, + isSmartAccountClient, type GetAccountParameter, - type SmartAccountClient, type SmartAccountSigner, } from "@alchemy/aa-core"; -import type { Chain, Hex, Transport } from "viem"; +import type { Chain, Client, Hex, Transport } from "viem"; import type { NaniAccount } from "./account"; /** @@ -22,7 +23,7 @@ export const transferOwnership: < TOwner extends SmartAccountSigner = SmartAccountSigner, TAccount extends NaniAccount | undefined = NaniAccount | undefined >( - client: SmartAccountClient, + client: Client, args: { newOwner: TOwner; waitForTxn?: boolean; @@ -35,6 +36,13 @@ export const transferOwnership: < throw new AccountNotFoundError(); } + if (!isSmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "transferOwnership" + ); + } + const account = account_ as NaniAccount; const data = account.encodeTransferOwnership(await newOwner.getAddress()); diff --git a/packages/alchemy/src/actions/simulateUserOperationChanges.ts b/packages/alchemy/src/actions/simulateUserOperationChanges.ts index 25881ff632..f298729a3f 100644 --- a/packages/alchemy/src/actions/simulateUserOperationChanges.ts +++ b/packages/alchemy/src/actions/simulateUserOperationChanges.ts @@ -1,11 +1,13 @@ import { AccountNotFoundError, + IncompatibleClientError, deepHexlify, type SendUserOperationParameters, type SmartContractAccount, } from "@alchemy/aa-core"; -import type { Chain, Transport } from "viem"; -import type { AlchemySmartAccountClient_Base } from "../client/smartAccountClient"; +import type { Chain, Client, Transport } from "viem"; +import { isAlchemySmartAccountClient } from "../client/isAlchemySmartAccountClient.js"; +import type { AlchemyRpcSchema } from "../client/types"; import type { SimulateUserOperationAssetChangesResponse } from "./types"; export const simulateUserOperationChanges: < @@ -14,7 +16,7 @@ export const simulateUserOperationChanges: < | SmartContractAccount | undefined >( - client: AlchemySmartAccountClient_Base, + client: Client, args: SendUserOperationParameters ) => Promise = async ( client, @@ -24,6 +26,13 @@ export const simulateUserOperationChanges: < throw new AccountNotFoundError(); } + if (!isAlchemySmartAccountClient(client)) { + throw new IncompatibleClientError( + "SmartAccountClient", + "transferOwnership" + ); + } + const uoStruct = deepHexlify( await client.buildUserOperation({ ...params, diff --git a/packages/alchemy/src/chains.ts b/packages/alchemy/src/chains.ts index 859729d822..cfd97fe115 100644 --- a/packages/alchemy/src/chains.ts +++ b/packages/alchemy/src/chains.ts @@ -1,34 +1,19 @@ -import { - arbitrum, - arbitrumGoerli, - arbitrumSepolia, - base, - baseGoerli, - baseSepolia, - goerli, - mainnet, - optimism, - optimismGoerli, - optimismSepolia, - polygon, - polygonMumbai, - sepolia, -} from "@alchemy/aa-core"; import type { Chain } from "viem"; -export const SupportedChains = new Map([ - [polygonMumbai.id, polygonMumbai], - [polygon.id, polygon], - [mainnet.id, mainnet], - [sepolia.id, sepolia], - [goerli.id, goerli], - [arbitrumGoerli.id, arbitrumGoerli], - [arbitrumSepolia.id, arbitrumSepolia], - [arbitrum.id, arbitrum], - [optimism.id, optimism], - [optimismGoerli.id, optimismGoerli], - [optimismSepolia.id, optimismSepolia], - [base.id, base], - [baseGoerli.id, baseGoerli], - [baseSepolia.id, baseSepolia], -]); +export const defineAlchemyChain = ({ + chain, + rpcBaseUrl, +}: { + chain: Chain; + rpcBaseUrl: string; +}): Chain => { + return { + ...chain, + rpcUrls: { + ...chain.rpcUrls, + alchemy: { + http: [rpcBaseUrl], + }, + }, + }; +}; diff --git a/packages/alchemy/src/client/decorators/smartAccount.ts b/packages/alchemy/src/client/decorators/smartAccount.ts index 272b07d152..51683cf68c 100644 --- a/packages/alchemy/src/client/decorators/smartAccount.ts +++ b/packages/alchemy/src/client/decorators/smartAccount.ts @@ -2,10 +2,9 @@ import type { SendUserOperationParameters, SmartContractAccount, } from "@alchemy/aa-core"; -import type { Chain, Transport } from "viem"; +import type { Chain, Client, Transport } from "viem"; import { simulateUserOperationChanges } from "../../actions/simulateUserOperationChanges.js"; import type { SimulateUserOperationAssetChangesResponse } from "../../actions/types.js"; -import type { AlchemySmartAccountClient_Base } from "../smartAccountClient.js"; export type AlchemySmartAccountClientActions< TAccount extends SmartContractAccount | undefined = @@ -24,7 +23,7 @@ export const alchemyActions: < | SmartContractAccount | undefined >( - client: AlchemySmartAccountClient_Base + client: Client ) => AlchemySmartAccountClientActions = (client) => ({ simulateUserOperation: async (args) => simulateUserOperationChanges(client, args), diff --git a/packages/alchemy/src/client/internal/smartAccountClientFromRpc.ts b/packages/alchemy/src/client/internal/smartAccountClientFromRpc.ts index b1198dd3bf..ea86472570 100644 --- a/packages/alchemy/src/client/internal/smartAccountClientFromRpc.ts +++ b/packages/alchemy/src/client/internal/smartAccountClientFromRpc.ts @@ -43,15 +43,13 @@ export function createAlchemySmartAccountClientFromRpcClient({ gasManagerConfig, feeEstimator, gasEstimator, - paymasterAndData, - dummyPaymasterAndData, customMiddleware, client, }: CreateAlchemySmartAccountClientFromRpcClient): AlchemySmartAccountClient { const feeOptions = opts?.feeOptions ?? getDefaultUserOperationFeeOptions(client.chain); - return createSmartAccountClientFromExisting({ + const alchClient = createSmartAccountClientFromExisting({ account, client, opts: { @@ -63,8 +61,6 @@ export function createAlchemySmartAccountClientFromRpcClient({ userOperationSimulator: useSimulation ? alchemyUserOperationSimulator(client) : undefined, - paymasterAndData, - dummyPaymasterAndData, gasEstimator, ...(gasManagerConfig && alchemyGasManagerMiddleware(client, { @@ -83,4 +79,9 @@ export function createAlchemySmartAccountClientFromRpcClient({ }, })), }).extend(alchemyActions); + + return { + ...alchClient, + type: "AlchemySmartAccountClient", + }; } diff --git a/packages/alchemy/src/client/isAlchemySmartAccountClient.ts b/packages/alchemy/src/client/isAlchemySmartAccountClient.ts new file mode 100644 index 0000000000..181b1ade54 --- /dev/null +++ b/packages/alchemy/src/client/isAlchemySmartAccountClient.ts @@ -0,0 +1,20 @@ +import { + isSmartAccountClient, + type SmartContractAccount, +} from "@alchemy/aa-core"; +import type { Chain, Client, Transport } from "viem"; +import type { AlchemySmartAccountClient } from "./smartAccountClient"; + +export const isAlchemySmartAccountClient = < + TTransport extends Transport = Transport, + TChain extends Chain | undefined = Chain | undefined, + TAccount extends SmartContractAccount | undefined = + | SmartContractAccount + | undefined +>( + client: Client +): client is AlchemySmartAccountClient => { + return ( + isSmartAccountClient(client) && client.type === "AlchemySmartAccountClient" + ); +}; diff --git a/packages/alchemy/src/client/lightAccountClient.test.ts b/packages/alchemy/src/client/lightAccountClient.test.ts index 027beaaef3..1e18054e50 100644 --- a/packages/alchemy/src/client/lightAccountClient.test.ts +++ b/packages/alchemy/src/client/lightAccountClient.test.ts @@ -18,13 +18,24 @@ describe("Light Account Client Tests", () => { const chain = polygonMumbai; it("should have a JWT property", async () => { - const spy = vi.spyOn(AACoreModule, "createPublicErc4337Client"); + const spy = vi.spyOn(AACoreModule, "createBundlerClient"); await givenConnectedProvider({ owner, chain }); - expect(spy.mock.calls[0][0].fetchOptions).toMatchInlineSnapshot(` + expect(spy.mock.results[0].value.transport).toMatchInlineSnapshot(` { - "headers": { - "Authorization": "Bearer test", + "fetchOptions": { + "headers": { + "Alchemy-AA-Sdk-Version": "3.0.0-alpha.0", + "Authorization": "Bearer test", + }, }, + "key": "http", + "name": "HTTP JSON-RPC", + "request": [Function], + "retryCount": 3, + "retryDelay": 150, + "timeout": 10000, + "type": "http", + "url": "https://polygon-mumbai.g.alchemy.com/v2/", } `); }); @@ -78,7 +89,7 @@ describe("Light Account Client Tests", () => { "[ { \\"code\\": \\"custom\\", - \\"message\\": \\"chain is not supported by Alchemy\\", + \\"message\\": \\"chain must include an alchemy rpc url. See \`createAlchemyChain\` or use the \`AlchemyChainMap\` exported from \`@alchemy/aa-core\`\\", \\"fatal\\": true, \\"path\\": [ \\"chain\\" diff --git a/packages/alchemy/src/client/lightAccountClient.ts b/packages/alchemy/src/client/lightAccountClient.ts index eccb41efa3..a97be64da8 100644 --- a/packages/alchemy/src/client/lightAccountClient.ts +++ b/packages/alchemy/src/client/lightAccountClient.ts @@ -1,10 +1,11 @@ import { createLightAccount, + lightAccountClientActions, type CreateLightAccountParams, type LightAccount, } from "@alchemy/aa-accounts"; import type { HttpTransport, SmartAccountSigner } from "@alchemy/aa-core"; -import type { Chain, CustomTransport, Transport } from "viem"; +import { custom, type Chain, type CustomTransport, type Transport } from "viem"; import { AlchemyProviderConfigSchema } from "../schema.js"; import { createAlchemySmartAccountClientFromRpcClient } from "./internal/smartAccountClientFromRpc.js"; import { createAlchemyPublicRpcClient } from "./rpcClient.js"; @@ -15,7 +16,10 @@ import { export type AlchemyLightAccountClientConfig< TOwner extends SmartAccountSigner = SmartAccountSigner -> = Omit, "client"> & +> = Omit< + CreateLightAccountParams, + "transport" | "chain" +> & Omit< AlchemySmartAccountClientConfig>, "account" @@ -41,7 +45,7 @@ export const createLightAccountAlchemyClient: < }); const account = await createLightAccount({ - client, + transport: custom(client), ...config, }); @@ -50,5 +54,5 @@ export const createLightAccountAlchemyClient: < client, account, opts, - }); + }).extend(lightAccountClientActions); }; diff --git a/packages/alchemy/src/client/rpcClient.ts b/packages/alchemy/src/client/rpcClient.ts index 157ad9fd7a..03c3e20eb8 100644 --- a/packages/alchemy/src/client/rpcClient.ts +++ b/packages/alchemy/src/client/rpcClient.ts @@ -1,44 +1,32 @@ -import { - Logger, - createPublicErc4337Client, - type ConnectionConfig, -} from "@alchemy/aa-core"; -import type { Chain } from "viem"; -import { SupportedChains } from "../chains.js"; -import { InvalidRpcUrlError } from "../errors/rpcUrl.js"; +import { createBundlerClient, type ConnectionConfig } from "@alchemy/aa-core"; +import { http, type Chain } from "viem"; +import { AlchemyChainSchema } from "../schema.js"; import type { ClientWithAlchemyMethods } from "./types.js"; export const createAlchemyPublicRpcClient = ({ - chain, + chain: chain_, connectionConfig, }: { connectionConfig: ConnectionConfig; chain: Chain; }): ClientWithAlchemyMethods => { - if (!SupportedChains.has(chain.id)) { - Logger.warn( - `[createAlchemyRpcClient] Unsupported chain ${chain.name} (${chain.id}). Some features may not work as expected.` - ); - } + const chain = AlchemyChainSchema.parse(chain_); const rpcUrl = connectionConfig.rpcUrl == null ? `${chain.rpcUrls.alchemy.http[0]}/${connectionConfig.apiKey ?? ""}` : connectionConfig.rpcUrl; - if (!rpcUrl) { - throw new InvalidRpcUrlError({ chain, connectionConfig }); - } - - return createPublicErc4337Client({ + return createBundlerClient({ chain: chain, - rpcUrl, - ...(connectionConfig.jwt != null && { - fetchOptions: { - headers: { - Authorization: `Bearer ${connectionConfig.jwt}`, + transport: http(rpcUrl, { + ...(connectionConfig.jwt != null && { + fetchOptions: { + headers: { + Authorization: `Bearer ${connectionConfig.jwt}`, + }, }, - }, + }), }), }); }; diff --git a/packages/alchemy/src/client/smartAccountClient.ts b/packages/alchemy/src/client/smartAccountClient.ts index a7c919c7af..53b8ed6690 100644 --- a/packages/alchemy/src/client/smartAccountClient.ts +++ b/packages/alchemy/src/client/smartAccountClient.ts @@ -11,7 +11,6 @@ import { getDefaultUserOperationFeeOptions } from "../defaults.js"; import { type AlchemyGasManagerConfig } from "../middleware/gasManager.js"; import { AlchemyProviderConfigSchema } from "../schema.js"; import type { AlchemyProviderConfig } from "../type.js"; -import { type AlchemySmartAccountClientActions } from "./decorators/smartAccount.js"; import { createAlchemySmartAccountClientFromRpcClient } from "./internal/smartAccountClientFromRpc.js"; import { createAlchemyPublicRpcClient } from "./rpcClient.js"; import type { AlchemyRpcSchema } from "./types.js"; @@ -30,11 +29,7 @@ export type AlchemySmartAccountClientConfig< } & AlchemyProviderConfig & Pick< SmartAccountClientConfig, - | "customMiddleware" - | "dummyPaymasterAndData" - | "paymasterAndData" - | "feeEstimator" - | "gasEstimator" + "customMiddleware" | "feeEstimator" | "gasEstimator" >; export type AlchemySmartAccountClient_Base< @@ -63,15 +58,7 @@ export type AlchemySmartAccountClient< account extends SmartContractAccount | undefined = | SmartContractAccount | undefined -> = Prettify< - AlchemySmartAccountClient_Base< - transport, - chain, - account, - AlchemySmartAccountClientActions & - SmartAccountClientActions - > ->; +> = Prettify>; export function createAlchemySmartAccountClient< TTransport extends Transport = Transport, @@ -83,11 +70,9 @@ export function createAlchemySmartAccountClient< account, gasManagerConfig, useSimulation, - dummyPaymasterAndData, feeEstimator, customMiddleware, gasEstimator, - paymasterAndData, ...config_ }: AlchemySmartAccountClientConfig< TTransport, @@ -99,11 +84,9 @@ export function createAlchemySmartAccountClient({ account, gasManagerConfig, useSimulation, - dummyPaymasterAndData, feeEstimator, customMiddleware, gasEstimator, - paymasterAndData, ...config_ }: AlchemySmartAccountClientConfig): AlchemySmartAccountClient { const config = AlchemyProviderConfigSchema.parse(config_); @@ -124,10 +107,9 @@ export function createAlchemySmartAccountClient({ ...opts, feeOptions, }, - dummyPaymasterAndData, feeEstimator, customMiddleware, gasEstimator, - paymasterAndData, + useSimulation, }); } diff --git a/packages/alchemy/src/client/types.ts b/packages/alchemy/src/client/types.ts index 82929be448..eacea77a6f 100644 --- a/packages/alchemy/src/client/types.ts +++ b/packages/alchemy/src/client/types.ts @@ -1,5 +1,5 @@ import { - type PublicErc4337Client, + type BundlerClient, type UserOperationRequest, } from "@alchemy/aa-core"; import type { Address, Hex, HttpTransport } from "viem"; @@ -53,8 +53,8 @@ export type AlchemyRpcSchema = [ } ]; -export type ClientWithAlchemyMethods = PublicErc4337Client & { - request: PublicErc4337Client["request"] & +export type ClientWithAlchemyMethods = BundlerClient & { + request: BundlerClient["request"] & { request(args: { method: "alchemy_requestPaymasterAndData"; diff --git a/packages/alchemy/src/index.ts b/packages/alchemy/src/index.ts index 42a3251a14..58308eceb4 100644 --- a/packages/alchemy/src/index.ts +++ b/packages/alchemy/src/index.ts @@ -1,7 +1,12 @@ export type * from "./actions/simulateUserOperationChanges.js"; export { simulateUserOperationChanges } from "./actions/simulateUserOperationChanges.js"; export type * from "./actions/types.js"; - +export { defineAlchemyChain } from "./chains.js"; +export type * from "./client/decorators/alchemyEnhancedApis.js"; +export { alchemyEnhancedApiActions } from "./client/decorators/alchemyEnhancedApis.js"; +export type * from "./client/decorators/smartAccount.js"; +export { alchemyActions } from "./client/decorators/smartAccount.js"; +export { isAlchemySmartAccountClient } from "./client/isAlchemySmartAccountClient.js"; export type * from "./client/lightAccountClient.js"; export { createLightAccountAlchemyClient } from "./client/lightAccountClient.js"; export type * from "./client/rpcClient.js"; @@ -9,19 +14,11 @@ export { createAlchemyPublicRpcClient } from "./client/rpcClient.js"; export type * from "./client/smartAccountClient.js"; export { createAlchemySmartAccountClient } from "./client/smartAccountClient.js"; export type * from "./client/types.js"; - -export type * from "./client/decorators/alchemyEnhancedApis.js"; -export { alchemyEnhancedApiActions } from "./client/decorators/alchemyEnhancedApis.js"; -export type * from "./client/decorators/smartAccount.js"; -export { alchemyActions } from "./client/decorators/smartAccount.js"; - +export { getDefaultUserOperationFeeOptions } from "./defaults.js"; export { alchemyFeeEstimator } from "./middleware/feeEstimator.js"; export type * from "./middleware/gasManager.js"; export { alchemyGasManagerMiddleware } from "./middleware/gasManager.js"; export { alchemyUserOperationSimulator } from "./middleware/userOperationSimulator.js"; - -export { SupportedChains } from "./chains.js"; -export { getDefaultUserOperationFeeOptions } from "./defaults.js"; export type * from "./schema.js"; export { AlchemyProviderConfigSchema } from "./schema.js"; export type { AlchemyProviderConfig } from "./type.js"; diff --git a/packages/alchemy/src/schema.ts b/packages/alchemy/src/schema.ts index d0034a885f..78daf7f9b1 100644 --- a/packages/alchemy/src/schema.ts +++ b/packages/alchemy/src/schema.ts @@ -7,7 +7,6 @@ import { import { Alchemy } from "alchemy-sdk"; import type { Chain } from "viem"; import z from "zod"; -import { SupportedChains } from "./chains.js"; export const AlchemyChainSchema = z.custom((chain) => { const _chain = ChainSchema.parse(chain); @@ -19,11 +18,8 @@ export const AlchemyChainSchema = z.custom((chain) => { return false; } - return ( - SupportedChains.get(_chain.id) != null && - chainObject.rpcUrls.alchemy != null - ); -}, "chain is not supported by Alchemy"); + return chainObject.rpcUrls.alchemy != null; +}, "chain must include an alchemy rpc url. See `createAlchemyChain` or use the `AlchemyChainMap` exported from `@alchemy/aa-core`"); export const AlchemyProviderConfigSchema = ConnectionConfigSchema.and( z.object({ diff --git a/packages/core/e2e-tests/simple-account.e2e.test.ts b/packages/core/e2e-tests/simple-account.e2e.test.ts index cc92da7300..ee486ff193 100644 --- a/packages/core/e2e-tests/simple-account.e2e.test.ts +++ b/packages/core/e2e-tests/simple-account.e2e.test.ts @@ -1,11 +1,18 @@ import { polygonMumbai } from "@alchemy/aa-core"; -import { fromHex, isAddress, type Address, type Chain, type Hex } from "viem"; +import { + custom, + fromHex, + http, + isAddress, + type Address, + type Chain, + type Hex, +} from "viem"; import { generatePrivateKey } from "viem/accounts"; import { - createPublicErc4337Client, + createBundlerClient, createSimpleSmartAccount, createSmartAccountClientFromExisting, - getDefaultEntryPointAddress, getDefaultSimpleAccountFactoryAddress, type SmartAccountSigner, type UserOperationFeeOptions, @@ -69,21 +76,6 @@ describe("Simple Account Tests", () => { expect(isAddress(address)).toBe(true); }); - it("should correctly fail to get address if rpc url is invalid", async () => { - await expect( - createSimpleSmartAccount({ - entryPointAddress: getDefaultEntryPointAddress(chain), - chain, - owner, - factoryAddress: getDefaultSimpleAccountFactoryAddress(chain), - rpcClient: createPublicErc4337Client({ - chain, - rpcUrl: "ALCHEMY_RPC_URL", - }), - }) - ).rejects.toThrowErrorMatchingInlineSnapshot('"Invalid RPC URL."'); - }); - it("should correctly handle percentage overrides for buildUserOperation", async () => { const signer = await givenConnectedProvider({ owner, @@ -185,9 +177,9 @@ const givenConnectedProvider = async ({ accountAddress?: Address; feeOptions?: UserOperationFeeOptions; }) => { - const client = createPublicErc4337Client({ + const client = createBundlerClient({ chain, - rpcUrl: `${chain.rpcUrls.alchemy.http[0]}/${API_KEY}`, + transport: http(`${chain.rpcUrls.alchemy.http[0]}/${API_KEY}`), }); return createSmartAccountClientFromExisting({ client, @@ -195,7 +187,7 @@ const givenConnectedProvider = async ({ chain, owner, factoryAddress: getDefaultSimpleAccountFactoryAddress(chain), - rpcClient: client, + transport: custom(client), accountAddress, }), feeEstimator: async (struct) => ({ diff --git a/packages/core/src/account/__tests__/simple.test.ts b/packages/core/src/account/__tests__/simple.test.ts index 64485c32f5..de6c97b081 100644 --- a/packages/core/src/account/__tests__/simple.test.ts +++ b/packages/core/src/account/__tests__/simple.test.ts @@ -1,7 +1,13 @@ -import { polygonMumbai, sepolia, type Chain } from "@alchemy/aa-core"; -import { createPublicClient, custom, http, type Address } from "viem"; +import { polygonMumbai, sepolia } from "@alchemy/aa-core"; +import { + createPublicClient, + custom, + http, + type Address, + type Chain, +} from "viem"; import { describe, it } from "vitest"; -import { createPublicErc4337FromClient } from "../../client/publicErc4337Client.js"; +import { createBundlerClientFromExisting } from "../../client/bundlerClient.js"; import { createSmartAccountClient } from "../../client/smartAccountClient.js"; import { LocalAccountSigner } from "../../signer/local-account.js"; import { type SmartAccountSigner } from "../../signer/types.js"; @@ -16,7 +22,7 @@ describe("Account Simple Tests", async () => { LocalAccountSigner.mnemonicToAccountSigner(dummyMnemonic); const chain = polygonMumbai; - const publicClient = createPublicErc4337FromClient( + const publicClient = createBundlerClientFromExisting( createPublicClient({ chain, transport: custom({ @@ -70,7 +76,7 @@ describe("Account Simple Tests", async () => { chain, owner, factoryAddress: "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef", - rpcClient: "ALCHEMY_RPC_URL", + transport: http("ALCHEMY_RPC_URL"), }) ).rejects.toThrowErrorMatchingInlineSnapshot(` "[ @@ -94,7 +100,7 @@ describe("Account Simple Tests", async () => { chain: "0x1" as unknown as Chain, owner, factoryAddress: "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef", - rpcClient: "ALCHEMY_RPC_URL", + transport: http("ALCHEMY_RPC_URL"), }) ).rejects.toThrowErrorMatchingInlineSnapshot(` "[ @@ -124,7 +130,7 @@ describe("Account Simple Tests", async () => { chain: sepolia, owner: owner, factoryAddress: getDefaultSimpleAccountFactoryAddress(sepolia), - rpcClient: publicClient, + transport: custom(publicClient), // override the account address here so we don't have to resolve the address from the entrypoint accountAddress: "0x1234567890123456789012345678901234567890", initCode: "0xdeadbeef", @@ -153,7 +159,7 @@ describe("Account Simple Tests", async () => { owner, accountAddress: "0x1234567890123456789012345678901234567890", factoryAddress: getDefaultSimpleAccountFactoryAddress(chain), - rpcClient: publicClient, + transport: http(`${chain.rpcUrls.alchemy.http[0]}/${"test"}`), }), }); }); diff --git a/packages/core/src/account/base.ts b/packages/core/src/account/base.ts index d5a69fe27a..619e2b50fd 100644 --- a/packages/core/src/account/base.ts +++ b/packages/core/src/account/base.ts @@ -1,6 +1,7 @@ import type { Address } from "abitype"; import { getContract, + http, trim, type GetContractReturnType, type Hash, @@ -11,9 +12,9 @@ import { } from "viem"; import { EntryPointAbi } from "../abis/EntryPointAbi.js"; import { - createPublicErc4337Client, - type PublicErc4337Client, -} from "../client/publicErc4337Client.js"; + createBundlerClient, + type BundlerClient, +} from "../client/bundlerClient.js"; import { Logger } from "../logger.js"; import type { SmartAccountSigner } from "../signer/types.js"; import { wrapSignatureWith6492 } from "../signer/utils.js"; @@ -51,8 +52,8 @@ export abstract class BaseSmartContractAccount< >; protected entryPointAddress: Address; readonly rpcProvider: - | PublicErc4337Client - | PublicErc4337Client; + | BundlerClient + | BundlerClient; constructor(params_: BaseSmartAccountParams) { const params = createBaseSmartAccountParamsSchema< @@ -84,19 +85,20 @@ export abstract class BaseSmartContractAccount< : undefined; this.rpcProvider = rpcUrl - ? createPublicErc4337Client({ + ? createBundlerClient({ chain: params.chain, - rpcUrl, - fetchOptions: { - ...fetchOptions, - headers: { - ...fetchOptions?.headers, - "Alchemy-Aa-Sdk-Signer": params.owner?.signerType || "unknown", - "Alchemy-Aa-Sdk-Factory-Address": params.factoryAddress, + transport: http(rpcUrl, { + fetchOptions: { + ...fetchOptions, + headers: { + ...fetchOptions?.headers, + "Alchemy-Aa-Sdk-Signer": params.owner?.signerType || "unknown", + "Alchemy-Aa-Sdk-Factory-Address": params.factoryAddress, + }, }, - }, + }), }) - : (params.rpcClient as PublicErc4337Client); + : (params.rpcClient as BundlerClient); this.accountAddress = params.accountAddress; this.factoryAddress = params.factoryAddress; diff --git a/packages/core/src/account/schema.ts b/packages/core/src/account/schema.ts index 835aadcefe..8484145f28 100644 --- a/packages/core/src/account/schema.ts +++ b/packages/core/src/account/schema.ts @@ -35,7 +35,12 @@ export const SimpleSmartAccountParamsSchema = < TTransport extends Transport = Transport, TOwner extends SmartAccountSigner = SmartAccountSigner >() => - createBaseSmartAccountParamsSchema().extend({ - owner: z.custom(isSigner), - index: z.bigint().optional(), - }); + createBaseSmartAccountParamsSchema() + .omit({ + rpcClient: true, + }) + .extend({ + transport: z.custom(), + owner: z.custom(isSigner), + index: z.bigint().optional(), + }); diff --git a/packages/core/src/account/simple.ts b/packages/core/src/account/simple.ts index a5ddba6261..da0b23ecb2 100644 --- a/packages/core/src/account/simple.ts +++ b/packages/core/src/account/simple.ts @@ -9,7 +9,7 @@ import { } from "viem"; import { SimpleAccountAbi } from "../abis/SimpleAccountAbi.js"; import { SimpleAccountFactoryAbi } from "../abis/SimpleAccountFactoryAbi.js"; -import type { PublicErc4337Client } from "../client/publicErc4337Client.js"; +import { createBundlerClient } from "../client/bundlerClient.js"; import type { SmartAccountSigner } from "../signer/types.js"; import type { BatchUserOperationCallData } from "../types.js"; import { BaseSmartContractAccount } from "./base.js"; @@ -17,6 +17,7 @@ import { SimpleSmartAccountParamsSchema } from "./schema.js"; import { toSmartContractAccount, type OwnedSmartContractAccount, + type ToSmartContractAccountParams, } from "./smartContractAccount.js"; import type { SimpleSmartAccountParams } from "./types.js"; @@ -29,7 +30,12 @@ class SimpleSmartContractAccount< constructor(params: SimpleSmartAccountParams) { SimpleSmartAccountParamsSchema().parse(params); - super(params); + // This is a hack for now, we should kill the SimpleSmart Account when we kill Base Account + const client = createBundlerClient({ + transport: params.transport as TTransport, + chain: params.chain, + }); + super({ ...params, rpcClient: client }); this.owner = params.owner as TOwner; this.index = params.index ?? 0n; } @@ -103,7 +109,11 @@ export const createSimpleSmartAccount = async < TTransport extends Transport = Transport, TOwner extends SmartAccountSigner = SmartAccountSigner >( - params: SimpleSmartAccountParams + params: Omit< + SimpleSmartAccountParams, + "rpcClient" | "chain" + > & + Pick ): Promise> => { if (!params.owner) throw new Error("Owner must be provided."); @@ -116,7 +126,8 @@ export const createSimpleSmartAccount = async < const base = await toSmartContractAccount({ source: "SimpleAccount", - client: simpleAccount.rpcProvider as PublicErc4337Client, + transport: params.transport, + chain: params.chain, encodeBatchExecute: simpleAccount.encodeBatchExecute.bind(simpleAccount), encodeExecute: (tx) => simpleAccount.encodeExecute.bind(simpleAccount)( diff --git a/packages/core/src/account/smartContractAccount.ts b/packages/core/src/account/smartContractAccount.ts index 6faf97c07f..387864bbd6 100644 --- a/packages/core/src/account/smartContractAccount.ts +++ b/packages/core/src/account/smartContractAccount.ts @@ -3,6 +3,7 @@ import { hexToBytes, trim, type Address, + type Chain, type CustomSource, type Hex, type LocalAccount, @@ -14,6 +15,7 @@ import { } from "viem"; import { toAccount } from "viem/accounts"; import { EntryPointAbi } from "../abis/EntryPointAbi.js"; +import { createBundlerClient } from "../client/bundlerClient.js"; import { Logger } from "../logger.js"; import type { SmartAccountSigner } from "../signer/types.js"; import { wrapSignatureWith6492 } from "../signer/utils.js"; @@ -74,10 +76,11 @@ export type SmartContractAccount = export type ToSmartContractAccountParams< Name extends string = string, TTransport extends Transport = Transport, - client extends PublicClient = PublicClient + TChain extends Chain = Chain > = { source: Name; - client: client; + transport: TTransport; + chain: TChain; // TODO: we may want to revisit this so that it's an object // which includes the EP version and its UO hashing algo entrypointAddress: Address; @@ -85,7 +88,7 @@ export type ToSmartContractAccountParams< getAccountInitCode: () => Promise; getDummySignature: () => Hex; encodeExecute: (tx: Tx) => Promise; - encodeBatchExecute: (txs: Tx[]) => Promise; + encodeBatchExecute?: (txs: Tx[]) => Promise; // if not provided, will default to just using signMessage over the Hex signUserOperationHash?: (uoHash: Hex) => Promise; encodeUpgradeToAndCall?: (params: UpgradeToAndCallParams) => Promise; @@ -147,9 +150,11 @@ export const getAccountAddress = async ({ export async function toSmartContractAccount< Name extends string = string, - TTransport extends Transport = Transport + TTransport extends Transport = Transport, + TChain extends Chain = Chain >({ - client, + transport, + chain, source, entrypointAddress, accountAddress, @@ -161,9 +166,13 @@ export async function toSmartContractAccount< getDummySignature, signUserOperationHash, encodeUpgradeToAndCall, -}: ToSmartContractAccountParams): Promise< +}: ToSmartContractAccountParams): Promise< SmartContractAccount > { + const client = createBundlerClient({ + transport, + chain, + }); const entrypoint = getContract({ address: entrypointAddress, abi: EntryPointAbi, @@ -299,7 +308,11 @@ export async function toSmartContractAccount< // and allow for generating the UO hash based on the EP version signUserOperationHash: signUserOperationHash_, getFactoryAddress, - encodeBatchExecute, + encodeBatchExecute: + encodeBatchExecute ?? + (() => { + throw new Error("Account does not support batch execution"); + }), encodeExecute, getDummySignature, getInitCode, diff --git a/packages/core/src/account/types.ts b/packages/core/src/account/types.ts index 5f439cf75c..93a5e9bf6a 100644 --- a/packages/core/src/account/types.ts +++ b/packages/core/src/account/types.ts @@ -2,7 +2,7 @@ import type { Address } from "abitype"; import type { Hash, Hex, HttpTransport, Transport } from "viem"; import type { SignTypedDataParameters } from "viem/accounts"; import type { z } from "zod"; -import type { PublicErc4337Client } from "../client/publicErc4337Client"; +import type { BundlerClient } from "../client/bundlerClient"; import type { SmartAccountSigner } from "../signer/types"; import type { BatchUserOperationCallData } from "../types"; import type { @@ -41,8 +41,8 @@ export interface ISmartContractAccount< * The RPC provider the account uses to make RPC calls */ readonly rpcProvider: - | PublicErc4337Client - | PublicErc4337Client; + | BundlerClient + | BundlerClient; /** * @returns the init code for the account diff --git a/packages/core/src/actions/publicErc4337/estimateUserOperationGas.ts b/packages/core/src/actions/bundler/estimateUserOperationGas.ts similarity index 74% rename from packages/core/src/actions/publicErc4337/estimateUserOperationGas.ts rename to packages/core/src/actions/bundler/estimateUserOperationGas.ts index 7027a31978..239f4fc393 100644 --- a/packages/core/src/actions/publicErc4337/estimateUserOperationGas.ts +++ b/packages/core/src/actions/bundler/estimateUserOperationGas.ts @@ -1,12 +1,12 @@ import type { Address, Chain, Client, Transport } from "viem"; -import type { Erc4337RpcSchema } from "../../client/decorators/publicErc4337Client"; +import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient"; import type { UserOperationEstimateGasResponse, UserOperationRequest, } from "../../types"; export const estimateUserOperationGas = async < - TClient extends Client + TClient extends Client >( client: TClient, args: { diff --git a/packages/core/src/actions/publicErc4337/getSupportedEntrypoints.ts b/packages/core/src/actions/bundler/getSupportedEntrypoints.ts similarity index 60% rename from packages/core/src/actions/publicErc4337/getSupportedEntrypoints.ts rename to packages/core/src/actions/bundler/getSupportedEntrypoints.ts index 7bcaf184c0..494d71d97d 100644 --- a/packages/core/src/actions/publicErc4337/getSupportedEntrypoints.ts +++ b/packages/core/src/actions/bundler/getSupportedEntrypoints.ts @@ -1,8 +1,8 @@ import type { Address, Chain, Client, Transport } from "viem"; -import type { Erc4337RpcSchema } from "../../client/decorators/publicErc4337Client"; +import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient"; export const getSupportedEntryPoints = async < - TClient extends Client + TClient extends Client >( client: TClient ): Promise => { diff --git a/packages/core/src/actions/publicErc4337/getUserOperationByHash.ts b/packages/core/src/actions/bundler/getUserOperationByHash.ts similarity index 69% rename from packages/core/src/actions/publicErc4337/getUserOperationByHash.ts rename to packages/core/src/actions/bundler/getUserOperationByHash.ts index 7908e7d988..a423aad876 100644 --- a/packages/core/src/actions/publicErc4337/getUserOperationByHash.ts +++ b/packages/core/src/actions/bundler/getUserOperationByHash.ts @@ -1,9 +1,9 @@ import type { Chain, Client, Hex, Transport } from "viem"; -import type { Erc4337RpcSchema } from "../../client/decorators/publicErc4337Client"; +import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient"; import type { UserOperationResponse } from "../../types"; export const getUserOperationByHash = async < - TClient extends Client + TClient extends Client >( client: TClient, args: { diff --git a/packages/core/src/actions/publicErc4337/getUserOperationReceipt.ts b/packages/core/src/actions/bundler/getUserOperationReceipt.ts similarity index 69% rename from packages/core/src/actions/publicErc4337/getUserOperationReceipt.ts rename to packages/core/src/actions/bundler/getUserOperationReceipt.ts index d57556d9b4..84e9bbc4e8 100644 --- a/packages/core/src/actions/publicErc4337/getUserOperationReceipt.ts +++ b/packages/core/src/actions/bundler/getUserOperationReceipt.ts @@ -1,9 +1,9 @@ import type { Chain, Client, Hex, Transport } from "viem"; -import type { Erc4337RpcSchema } from "../../client/decorators/publicErc4337Client"; +import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient"; import type { UserOperationReceipt } from "../../types"; export const getUserOperationReceipt = async < - TClient extends Client + TClient extends Client >( client: TClient, args: { diff --git a/packages/core/src/actions/publicErc4337/sendRawUserOperation.ts b/packages/core/src/actions/bundler/sendRawUserOperation.ts similarity index 71% rename from packages/core/src/actions/publicErc4337/sendRawUserOperation.ts rename to packages/core/src/actions/bundler/sendRawUserOperation.ts index 3866f573a6..d327e19e05 100644 --- a/packages/core/src/actions/publicErc4337/sendRawUserOperation.ts +++ b/packages/core/src/actions/bundler/sendRawUserOperation.ts @@ -1,9 +1,9 @@ import type { Address, Chain, Client, Hex, Transport } from "viem"; -import type { Erc4337RpcSchema } from "../../client/decorators/publicErc4337Client"; +import type { BundlerRpcSchema } from "../../client/decorators/bundlerClient"; import type { UserOperationRequest } from "../../types"; export const sendRawUserOperation = async < - TClient extends Client + TClient extends Client >( client: TClient, args: { diff --git a/packages/core/src/actions/smartAccount/buildUserOperation.ts b/packages/core/src/actions/smartAccount/buildUserOperation.ts index 17064e6fc3..0f352df65c 100644 --- a/packages/core/src/actions/smartAccount/buildUserOperation.ts +++ b/packages/core/src/actions/smartAccount/buildUserOperation.ts @@ -1,7 +1,8 @@ -import type { Chain, Transport } from "viem"; +import type { Chain, Client, Transport } from "viem"; import type { SmartContractAccount } from "../../account/smartContractAccount.js"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient.js"; +import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; import { AccountNotFoundError } from "../../errors/account.js"; +import { IncompatibleClientError } from "../../errors/client.js"; import type { UserOperationStruct } from "../../types.js"; import type { Deferrable } from "../../utils/index.js"; import { _runMiddlewareStack } from "./internal/runMiddlewareStack.js"; @@ -14,7 +15,7 @@ export const buildUserOperation: < | SmartContractAccount | undefined >( - client: BaseSmartAccountClient, + client: Client, args: SendUserOperationParameters ) => Promise = async (client, args) => { const { account = client.account, overrides, uo } = args; @@ -22,6 +23,13 @@ export const buildUserOperation: < throw new AccountNotFoundError(); } + if (!isBaseSmartAccountClient(client)) { + throw new IncompatibleClientError( + "BaseSmartAccountClient", + "buildUserOperation" + ); + } + return _runMiddlewareStack(client, { uo: { initCode: account.getInitCode(), diff --git a/packages/core/src/actions/smartAccount/buildUserOperationFromTx.ts b/packages/core/src/actions/smartAccount/buildUserOperationFromTx.ts index 47fc9a32f3..54e5757b2d 100644 --- a/packages/core/src/actions/smartAccount/buildUserOperationFromTx.ts +++ b/packages/core/src/actions/smartAccount/buildUserOperationFromTx.ts @@ -1,11 +1,13 @@ import { type Chain, + type Client, type SendTransactionParameters, type Transport, } from "viem"; import type { SmartContractAccount } from "../../account/smartContractAccount.js"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient.js"; +import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; import { AccountNotFoundError } from "../../errors/account.js"; +import { IncompatibleClientError } from "../../errors/client.js"; import type { UserOperationOverrides, UserOperationStruct, @@ -20,7 +22,7 @@ export const buildUserOperationFromTx: < | undefined, TChainOverride extends Chain | undefined = Chain | undefined >( - client: BaseSmartAccountClient, + client: Client, args: SendTransactionParameters ) => Promise = async (client, args) => { const { account = client.account, ...request } = args; @@ -32,6 +34,13 @@ export const buildUserOperationFromTx: < throw new Error("Transaction is missing `to` address set on request"); } + if (!isBaseSmartAccountClient(client)) { + throw new IncompatibleClientError( + "BaseSmartAccountClient", + "buildUserOperationFromTx" + ); + } + const _overrides: UserOperationOverrides = { maxFeePerGas: request.maxFeePerGas ? request.maxFeePerGas : undefined, maxPriorityFeePerGas: request.maxPriorityFeePerGas diff --git a/packages/core/src/actions/smartAccount/buildUserOperationFromTxs.ts b/packages/core/src/actions/smartAccount/buildUserOperationFromTxs.ts index 14747fcaca..b99b8216ff 100644 --- a/packages/core/src/actions/smartAccount/buildUserOperationFromTxs.ts +++ b/packages/core/src/actions/smartAccount/buildUserOperationFromTxs.ts @@ -1,7 +1,8 @@ -import { fromHex, type Chain, type Transport } from "viem"; +import { fromHex, type Chain, type Client, type Transport } from "viem"; import type { SmartContractAccount } from "../../account/smartContractAccount"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient"; +import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; import { AccountNotFoundError } from "../../errors/account.js"; +import { IncompatibleClientError } from "../../errors/client.js"; import type { UserOperationOverrides } from "../../types"; import { bigIntMax, filterUndefined } from "../../utils/index.js"; import type { @@ -16,7 +17,7 @@ export const buildUserOperationFromTxs: < | SmartContractAccount | undefined >( - client: BaseSmartAccountClient, + client: Client, args: SendTransactionsParameters ) => Promise = async ( client, @@ -27,6 +28,13 @@ export const buildUserOperationFromTxs: < throw new AccountNotFoundError(); } + if (!isBaseSmartAccountClient(client)) { + throw new IncompatibleClientError( + "BaseSmartAccountClient", + "buildUserOperationFromTxs" + ); + } + const batch = requests.map((request) => { if (!request.to) { throw new Error( diff --git a/packages/core/src/actions/smartAccount/checkGasSponsorshipEligibility.ts b/packages/core/src/actions/smartAccount/checkGasSponsorshipEligibility.ts index 04d23ca1ea..8d4704bd6b 100644 --- a/packages/core/src/actions/smartAccount/checkGasSponsorshipEligibility.ts +++ b/packages/core/src/actions/smartAccount/checkGasSponsorshipEligibility.ts @@ -1,6 +1,7 @@ -import type { Chain, Transport } from "viem"; +import type { Chain, Client, Transport } from "viem"; import type { SmartContractAccount } from "../../account/smartContractAccount.js"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient.js"; +import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; +import { IncompatibleClientError } from "../../errors/client.js"; import type { UserOperationStruct } from "../../types.js"; import { buildUserOperation } from "./buildUserOperation.js"; import type { SendUserOperationParameters } from "./types"; @@ -12,9 +13,16 @@ export const checkGasSponsorshipEligibility: < | SmartContractAccount | undefined >( - client: BaseSmartAccountClient, + client: Client, args: SendUserOperationParameters ) => Promise = async (client, args) => { + if (!isBaseSmartAccountClient(client)) { + throw new IncompatibleClientError( + "BaseSmartAccountClient", + "checkGasSponsorshipEligibility" + ); + } + return buildUserOperation(client, args) .then( (userOperationStruct: UserOperationStruct) => diff --git a/packages/core/src/actions/smartAccount/dropAndReplaceUserOperation.ts b/packages/core/src/actions/smartAccount/dropAndReplaceUserOperation.ts index abc837f399..2ca3e779f2 100644 --- a/packages/core/src/actions/smartAccount/dropAndReplaceUserOperation.ts +++ b/packages/core/src/actions/smartAccount/dropAndReplaceUserOperation.ts @@ -1,8 +1,9 @@ -import type { Chain, Transport } from "viem"; +import type { Chain, Client, Transport } from "viem"; import type { SmartContractAccount } from "../../account/smartContractAccount"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient"; +import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; import type { SendUserOperationResult } from "../../client/types"; import { AccountNotFoundError } from "../../errors/account.js"; +import { IncompatibleClientError } from "../../errors/client.js"; import type { UserOperationOverrides, UserOperationStruct } from "../../types"; import { bigIntMax, bigIntPercent } from "../../utils/index.js"; import { _runMiddlewareStack } from "./internal/runMiddlewareStack.js"; @@ -16,13 +17,19 @@ export const dropAndReplaceUserOperation: < | SmartContractAccount | undefined >( - client: BaseSmartAccountClient, + client: Client, args: DropAndReplaceUserOperationParameters ) => Promise = async (client, args) => { const { account = client.account, uoToDrop, overrides } = args; if (!account) { throw new AccountNotFoundError(); } + if (!isBaseSmartAccountClient(client)) { + throw new IncompatibleClientError( + "BaseSmartAccountClient", + "dropAndReplaceUserOperation" + ); + } const uoToSubmit = { initCode: uoToDrop.initCode, diff --git a/packages/core/src/actions/smartAccount/getAddress.ts b/packages/core/src/actions/smartAccount/getAddress.ts index 88a2623c9e..70d666f8ce 100644 --- a/packages/core/src/actions/smartAccount/getAddress.ts +++ b/packages/core/src/actions/smartAccount/getAddress.ts @@ -1,10 +1,9 @@ import type { Address } from "abitype"; -import type { Chain, Transport } from "viem"; +import type { Chain, Client, Transport } from "viem"; import type { GetAccountParameter, SmartContractAccount, } from "../../account/smartContractAccount"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient"; import { AccountNotFoundError } from "../../errors/account.js"; export const getAddress: < @@ -14,7 +13,7 @@ export const getAddress: < | SmartContractAccount | undefined >( - client: BaseSmartAccountClient, + client: Client, args: GetAccountParameter ) => Address = (client, args) => { const { account } = args ?? { account: client.account }; diff --git a/packages/core/src/actions/smartAccount/sendTransaction.ts b/packages/core/src/actions/smartAccount/sendTransaction.ts index 8057b83b91..8876d850a0 100644 --- a/packages/core/src/actions/smartAccount/sendTransaction.ts +++ b/packages/core/src/actions/smartAccount/sendTransaction.ts @@ -1,7 +1,14 @@ -import type { Chain, Hex, SendTransactionParameters, Transport } from "viem"; +import type { + Chain, + Client, + Hex, + SendTransactionParameters, + Transport, +} from "viem"; import type { SmartContractAccount } from "../../account/smartContractAccount.js"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient.js"; +import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; import { AccountNotFoundError } from "../../errors/account.js"; +import { IncompatibleClientError } from "../../errors/client.js"; import { buildUserOperationFromTx } from "./buildUserOperationFromTx.js"; import { _sendUserOperation } from "./internal/sendUserOperation.js"; import { waitForUserOperationTransaction } from "./waitForUserOperationTransacation.js"; @@ -13,7 +20,7 @@ export const sendTransaction: < | undefined, TChainOverride extends Chain | undefined = Chain | undefined >( - client: BaseSmartAccountClient, + client: Client, args: SendTransactionParameters ) => Promise = async (client, args) => { const { account = client.account } = args; @@ -25,6 +32,13 @@ export const sendTransaction: < throw new Error("Transaction is missing `to` address set on request"); } + if (!isBaseSmartAccountClient(client)) { + throw new IncompatibleClientError( + "BaseSmartAccountClient", + "sendTransaction" + ); + } + const uoStruct = await buildUserOperationFromTx(client, args); const { hash } = await _sendUserOperation(client, { account: account as SmartContractAccount, diff --git a/packages/core/src/actions/smartAccount/sendTransactions.ts b/packages/core/src/actions/smartAccount/sendTransactions.ts index 3c917713f9..435be063fe 100644 --- a/packages/core/src/actions/smartAccount/sendTransactions.ts +++ b/packages/core/src/actions/smartAccount/sendTransactions.ts @@ -1,7 +1,8 @@ -import type { Chain, Hex, Transport } from "viem"; +import type { Chain, Client, Hex, Transport } from "viem"; import type { SmartContractAccount } from "../../account/smartContractAccount.js"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient.js"; +import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; import { AccountNotFoundError } from "../../errors/account.js"; +import { IncompatibleClientError } from "../../errors/client.js"; import { buildUserOperationFromTxs } from "./buildUserOperationFromTxs.js"; import { sendUserOperation } from "./sendUserOperation.js"; import type { SendTransactionsParameters } from "./types"; @@ -14,7 +15,7 @@ export const sendTransactions: < | SmartContractAccount | undefined >( - client: BaseSmartAccountClient, + client: Client, args: SendTransactionsParameters ) => Promise = async (client, args) => { const { requests, overrides, account = client.account } = args; @@ -22,6 +23,13 @@ export const sendTransactions: < throw new AccountNotFoundError(); } + if (!isBaseSmartAccountClient(client)) { + throw new IncompatibleClientError( + "BaseSmartAccountClient", + "sendTransactions" + ); + } + const { batch, overrides: _overrides } = await buildUserOperationFromTxs( client, { diff --git a/packages/core/src/actions/smartAccount/sendUserOperation.ts b/packages/core/src/actions/smartAccount/sendUserOperation.ts index 7f96fbad87..3cd8b07f5b 100644 --- a/packages/core/src/actions/smartAccount/sendUserOperation.ts +++ b/packages/core/src/actions/smartAccount/sendUserOperation.ts @@ -1,8 +1,9 @@ -import type { Chain, Transport } from "viem"; +import type { Chain, Client, Transport } from "viem"; import type { SmartContractAccount } from "../../account/smartContractAccount.js"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient.js"; +import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; import type { SendUserOperationResult } from "../../client/types.js"; import { AccountNotFoundError } from "../../errors/account.js"; +import { IncompatibleClientError } from "../../errors/client.js"; import { buildUserOperation } from "./buildUserOperation.js"; import { _sendUserOperation } from "./internal/sendUserOperation.js"; import type { SendUserOperationParameters } from "./types.js"; @@ -14,7 +15,7 @@ export const sendUserOperation: < | SmartContractAccount | undefined >( - client: BaseSmartAccountClient, + client: Client, args: SendUserOperationParameters ) => Promise = async (client, args) => { const { account = client.account } = args; @@ -23,6 +24,13 @@ export const sendUserOperation: < throw new AccountNotFoundError(); } + if (!isBaseSmartAccountClient(client)) { + throw new IncompatibleClientError( + "BaseSmartAccountClient", + "sendUserOperation" + ); + } + const uoStruct = await buildUserOperation(client, args); return _sendUserOperation(client, { account, uoStruct }); }; diff --git a/packages/core/src/actions/smartAccount/signMessage.ts b/packages/core/src/actions/smartAccount/signMessage.ts index e8961b4852..3bc4546a92 100644 --- a/packages/core/src/actions/smartAccount/signMessage.ts +++ b/packages/core/src/actions/smartAccount/signMessage.ts @@ -1,9 +1,8 @@ -import type { Chain, Hex, SignableMessage, Transport } from "viem"; +import type { Chain, Client, Hex, SignableMessage, Transport } from "viem"; import type { GetAccountParameter, SmartContractAccount, } from "../../account/smartContractAccount"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient"; import { AccountNotFoundError } from "../../errors/account.js"; export type SignMessageParameters< @@ -19,7 +18,7 @@ export const signMessage: < | SmartContractAccount | undefined >( - client: BaseSmartAccountClient, + client: Client, args: SignMessageParameters ) => Promise = async (client, { account = client.account, message }) => { if (!account) { diff --git a/packages/core/src/actions/smartAccount/signMessageWith6492.ts b/packages/core/src/actions/smartAccount/signMessageWith6492.ts index 0b0c543598..475c77f476 100644 --- a/packages/core/src/actions/smartAccount/signMessageWith6492.ts +++ b/packages/core/src/actions/smartAccount/signMessageWith6492.ts @@ -1,6 +1,5 @@ -import type { Chain, Hex, Transport } from "viem"; +import type { Chain, Client, Hex, Transport } from "viem"; import type { SmartContractAccount } from "../../account/smartContractAccount"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient"; import { AccountNotFoundError } from "../../errors/account.js"; import type { SignMessageParameters } from "./signMessage"; @@ -11,7 +10,7 @@ export const signMessageWith6492: < | SmartContractAccount | undefined >( - client: BaseSmartAccountClient, + client: Client, args: SignMessageParameters ) => Promise = async (client, { account = client.account, message }) => { if (!account) { diff --git a/packages/core/src/actions/smartAccount/signTypedData.ts b/packages/core/src/actions/smartAccount/signTypedData.ts index 7c78b2ff86..70418e11d7 100644 --- a/packages/core/src/actions/smartAccount/signTypedData.ts +++ b/packages/core/src/actions/smartAccount/signTypedData.ts @@ -1,5 +1,6 @@ import type { Chain, + Client, Hex, Transport, TypedData, @@ -9,7 +10,6 @@ import type { GetAccountParameter, SmartContractAccount, } from "../../account/smartContractAccount"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient"; import { AccountNotFoundError } from "../../errors/account.js"; export type SignTypedDataParameters< @@ -31,7 +31,7 @@ export const signTypedData: < | SmartContractAccount | undefined >( - client: BaseSmartAccountClient, + client: Client, args: SignTypedDataParameters ) => Promise = async (client, { account = client.account, typedData }) => { if (!account) { diff --git a/packages/core/src/actions/smartAccount/signTypedDataWith6492.ts b/packages/core/src/actions/smartAccount/signTypedDataWith6492.ts index 3289dabd34..7f161e2b0b 100644 --- a/packages/core/src/actions/smartAccount/signTypedDataWith6492.ts +++ b/packages/core/src/actions/smartAccount/signTypedDataWith6492.ts @@ -1,6 +1,5 @@ -import type { Chain, Hex, Transport, TypedData } from "viem"; +import type { Chain, Client, Hex, Transport, TypedData } from "viem"; import type { SmartContractAccount } from "../../account/smartContractAccount"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient"; import { AccountNotFoundError } from "../../errors/account.js"; import type { SignTypedDataParameters } from "./signTypedData"; @@ -13,7 +12,7 @@ export const signTypedDataWith6492: < | undefined, TPrimaryType extends string = string >( - client: BaseSmartAccountClient, + client: Client, args: SignTypedDataParameters ) => Promise = async (client, { account = client.account, typedData }) => { if (!account) { diff --git a/packages/core/src/actions/smartAccount/upgradeAccount.ts b/packages/core/src/actions/smartAccount/upgradeAccount.ts index 049ff02216..fdec444ac1 100644 --- a/packages/core/src/actions/smartAccount/upgradeAccount.ts +++ b/packages/core/src/actions/smartAccount/upgradeAccount.ts @@ -1,7 +1,8 @@ -import type { Chain, Hash, Transport } from "viem"; +import type { Chain, Client, Hash, Transport } from "viem"; import type { SmartContractAccount } from "../../account/smartContractAccount.js"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient.js"; +import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; import { AccountNotFoundError } from "../../errors/account.js"; +import { IncompatibleClientError } from "../../errors/client.js"; import { sendUserOperation } from "./sendUserOperation.js"; import type { UpgradeAccountParams } from "./types.js"; import { waitForUserOperationTransaction } from "./waitForUserOperationTransacation.js"; @@ -13,7 +14,7 @@ export const upgradeAccount: < | SmartContractAccount | undefined >( - client: BaseSmartAccountClient, + client: Client, args: UpgradeAccountParams ) => Promise = async (client, args) => { const { account = client.account, upgradeTo, overrides, waitForTx } = args; @@ -22,6 +23,13 @@ export const upgradeAccount: < throw new AccountNotFoundError(); } + if (!isBaseSmartAccountClient(client)) { + throw new IncompatibleClientError( + "BaseSmartAccountClient", + "upgradeAccount" + ); + } + const { implAddress: accountImplAddress, initializationData } = upgradeTo; const encodeUpgradeData = await account.encodeUpgradeToAndCall({ diff --git a/packages/core/src/actions/smartAccount/waitForUserOperationTransacation.ts b/packages/core/src/actions/smartAccount/waitForUserOperationTransacation.ts index a7f53981cb..02418cc261 100644 --- a/packages/core/src/actions/smartAccount/waitForUserOperationTransacation.ts +++ b/packages/core/src/actions/smartAccount/waitForUserOperationTransacation.ts @@ -1,6 +1,7 @@ -import type { Chain, Hex, Transport } from "viem"; +import type { Chain, Client, Hex, Transport } from "viem"; import { getTransaction } from "viem/actions"; -import type { BaseSmartAccountClient } from "../../client/smartAccountClient.js"; +import { isBaseSmartAccountClient } from "../../client/isSmartAccountClient.js"; +import { IncompatibleClientError } from "../../errors/client.js"; import { Logger } from "../../logger.js"; import type { WaitForUserOperationTxParameters } from "./types.js"; @@ -8,11 +9,18 @@ export const waitForUserOperationTransaction: < TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined >( - client: BaseSmartAccountClient, + client: Client, args: WaitForUserOperationTxParameters ) => Promise = async (client, args) => { const { hash } = args; + if (!isBaseSmartAccountClient(client)) { + throw new IncompatibleClientError( + "BaseSmartAccountClient", + "upgradeAccount" + ); + } + for (let i = 0; i < client.txMaxRetries; i++) { const txRetryIntervalWithJitterMs = client.txRetryIntervalMs * Math.pow(client.txRetryMulitplier, i) + diff --git a/packages/core/src/chain/index.ts b/packages/core/src/chains/index.ts similarity index 100% rename from packages/core/src/chain/index.ts rename to packages/core/src/chains/index.ts diff --git a/packages/core/src/client/bundlerClient.ts b/packages/core/src/client/bundlerClient.ts new file mode 100644 index 0000000000..ebe5afe16d --- /dev/null +++ b/packages/core/src/client/bundlerClient.ts @@ -0,0 +1,99 @@ +import { + createClient, + http, + publicActions, + type Chain, + type Client, + type FallbackTransport, + type HttpTransportConfig, + type PublicActions, + type PublicClient, + type PublicClientConfig, + type PublicRpcSchema, + type Transport, +} from "viem"; +import { VERSION } from "../version.js"; +import { + bundlerActions, + type BundlerActions, + type BundlerRpcSchema, +} from "./decorators/bundlerClient.js"; + +export type BundlerClient = Client< + T, + Chain, + undefined, + [...PublicRpcSchema, ...BundlerRpcSchema], + PublicActions & BundlerActions +>; + +export const createBundlerClientFromExisting: < + T extends Transport | FallbackTransport = Transport +>( + client: PublicClient +) => BundlerClient = ( + client: PublicClient +): BundlerClient => { + return client.extend(bundlerActions); +}; + +/** + * Creates a PublicClient with methods for calling Bundler RPC methods + * @returns + */ +export function createBundlerClient( + args: PublicClientConfig & { type?: string } +): BundlerClient; + +export function createBundlerClient( + args: PublicClientConfig & { type?: string } +): BundlerClient { + if (!args.chain) { + throw new Error("Chain must be provided"); + } + const { + key = "bundler-public", + name = "Public Bundler Client", + type = "bundlerClient", + } = args; + + const { transport, ...opts } = args; + const resolvedTransport = transport({ + chain: args.chain, + pollingInterval: opts.pollingInterval, + }); + + const baseParameters = { + ...args, + key, + name, + type, + }; + + const client = (() => { + if (resolvedTransport.config.type === "http") { + const { url, fetchOptions } = resolvedTransport.value as { + fetchOptions: HttpTransportConfig["fetchOptions"]; + url: string; + }; + + return createClient({ + ...baseParameters, + transport: http(url, { + ...resolvedTransport.config, + fetchOptions: { + ...fetchOptions, + headers: { + ...fetchOptions?.headers, + "Alchemy-AA-Sdk-Version": VERSION, + }, + }, + }), + }); + } + + return createClient(baseParameters); + })(); + + return client.extend(publicActions).extend(bundlerActions); +} diff --git a/packages/core/src/client/decorators/publicErc4337Client.ts b/packages/core/src/client/decorators/bundlerClient.ts similarity index 57% rename from packages/core/src/client/decorators/publicErc4337Client.ts rename to packages/core/src/client/decorators/bundlerClient.ts index 745259ad77..7bbd95e54f 100644 --- a/packages/core/src/client/decorators/publicErc4337Client.ts +++ b/packages/core/src/client/decorators/bundlerClient.ts @@ -6,19 +6,19 @@ import type { PublicRpcSchema, Transport, } from "viem"; -import { estimateUserOperationGas } from "../../actions/publicErc4337/estimateUserOperationGas.js"; -import { getSupportedEntryPoints } from "../../actions/publicErc4337/getSupportedEntrypoints.js"; -import { getUserOperationByHash } from "../../actions/publicErc4337/getUserOperationByHash.js"; -import { getUserOperationReceipt } from "../../actions/publicErc4337/getUserOperationReceipt.js"; -import { sendRawUserOperation } from "../../actions/publicErc4337/sendRawUserOperation.js"; +import { estimateUserOperationGas } from "../../actions/bundler/estimateUserOperationGas.js"; +import { getSupportedEntryPoints } from "../../actions/bundler/getSupportedEntrypoints.js"; +import { getUserOperationByHash } from "../../actions/bundler/getUserOperationByHash.js"; +import { getUserOperationReceipt } from "../../actions/bundler/getUserOperationReceipt.js"; +import { sendRawUserOperation } from "../../actions/bundler/sendRawUserOperation.js"; import type { UserOperationEstimateGasResponse, UserOperationReceipt, UserOperationRequest, UserOperationResponse, -} from "../../types"; +} from "../../types.js"; -export type Erc4337RpcSchema = [ +export type BundlerRpcSchema = [ { Method: "eth_sendUserOperation"; Parameters: [UserOperationRequest, Address]; @@ -46,7 +46,7 @@ export type Erc4337RpcSchema = [ } ]; -export type Erc4337Actions = { +export type BundlerActions = { /** * calls `eth_estimateUserOperationGas` and returns the result * @@ -95,16 +95,16 @@ export type Erc4337Actions = { getSupportedEntryPoints(): Promise; }; -export const erc4337ClientActions: < +export const bundlerActions: < TClient extends Client< Transport, Chain | undefined, any, - [...PublicRpcSchema, ...Erc4337RpcSchema] + [...PublicRpcSchema, ...BundlerRpcSchema] > >( client: TClient -) => Erc4337Actions = (client) => ({ +) => BundlerActions = (client) => ({ estimateUserOperationGas: async (request, entryPoint) => estimateUserOperationGas(client, { request, entryPoint }), sendRawUserOperation: async (request, entryPoint) => @@ -115,56 +115,3 @@ export const erc4337ClientActions: < getUserOperationReceipt: async (hash) => getUserOperationReceipt(client, { hash }), }); - -// export const erc4337ClientActions = (client: Client) => { -// const clientAdapter = client as Client< -// Transport, -// Chain | undefined, -// undefined, -// [...PublicRpcSchema, ...Erc4337RpcSchema], -// PublicActions -// >; - -// return { -// estimateUserOperationGas( -// request: UserOperationRequest, -// entryPoint: string -// ): Promise { -// return clientAdapter.request({ -// method: "eth_estimateUserOperationGas", -// params: [request, entryPoint as Address], -// }); -// }, - -// sendRawUserOperation( -// request: UserOperationRequest, -// entryPoint: string -// ): Promise { -// return clientAdapter.request({ -// method: "eth_sendUserOperation", -// params: [request, entryPoint as Address], -// }); -// }, - -// getUserOperationByHash(hash: Hash): Promise { -// return clientAdapter.request({ -// method: "eth_getUserOperationByHash", -// params: [hash], -// }); -// }, - -// getUserOperationReceipt(hash: Hash): Promise { -// return clientAdapter.request({ -// method: "eth_getUserOperationReceipt", -// params: [hash], -// }); -// }, - -// getSupportedEntryPoints(): Promise { -// return clientAdapter.request({ -// method: "eth_supportedEntryPoints", -// params: [], -// }); -// }, -// }; -// }; diff --git a/packages/core/src/client/decorators/smartAccountClient.ts b/packages/core/src/client/decorators/smartAccountClient.ts index 53365a0643..3cf4744789 100644 --- a/packages/core/src/client/decorators/smartAccountClient.ts +++ b/packages/core/src/client/decorators/smartAccountClient.ts @@ -1,6 +1,7 @@ import type { Address, Chain, + Client, Hex, SendTransactionParameters, Transport, @@ -41,7 +42,6 @@ import { upgradeAccount } from "../../actions/smartAccount/upgradeAccount.js"; import { waitForUserOperationTransaction } from "../../actions/smartAccount/waitForUserOperationTransacation.js"; import type { UserOperationStruct } from "../../types"; import type { IsUndefined } from "../../utils"; -import type { BaseSmartAccountClient } from "../smartAccountClient"; import type { SendUserOperationResult } from "../types"; export type BaseSmartAccountClientActions< @@ -100,14 +100,14 @@ export type BaseSmartAccountClientActions< getAddress: (args: GetAccountParameter) => Address; }); -export const smartAccountClientDecorator: < +export const smartAccountClientActions: < TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined, TAccount extends SmartContractAccount | undefined = | SmartContractAccount | undefined >( - client: BaseSmartAccountClient + client: Client ) => BaseSmartAccountClientActions = (client) => ({ buildUserOperation: (args) => buildUserOperation(client, args), buildUserOperationFromTx: (args) => buildUserOperationFromTx(client, args), diff --git a/packages/core/src/client/isSmartAccountClient.ts b/packages/core/src/client/isSmartAccountClient.ts new file mode 100644 index 0000000000..66fe6a514b --- /dev/null +++ b/packages/core/src/client/isSmartAccountClient.ts @@ -0,0 +1,50 @@ +import type { Chain, Client, Transport } from "viem"; +import type { SmartContractAccount } from "../account/smartContractAccount"; +import type { + BaseSmartAccountClient, + SmartAccountClient, +} from "./smartAccountClient"; + +/** + * Use this method to assert that a client is a BaseSmartAccountClient. + * Useful for narrowing the type of the client down when used within the + * smart account client decorators + * + * @param client a viem client + * @returns + */ +export function isSmartAccountClient< + TTransport extends Transport = Transport, + TChain extends Chain | undefined = Chain | undefined, + TAccount extends SmartContractAccount | undefined = + | SmartContractAccount + | undefined +>( + client: Client +): client is SmartAccountClient { + return ( + client && "middleware" in client && client.type === "SmartAccountClient" + ); +} + +/** + * Use this method to assert that a client is a BaseSmartAccountClient. + * Useful for narrowing the type of the client down when used within the + * smart account action decorators + * + * @param client a viem client + * @returns + */ +export function isBaseSmartAccountClient< + TTransport extends Transport = Transport, + TChain extends Chain | undefined = Chain | undefined, + TAccount extends SmartContractAccount | undefined = + | SmartContractAccount + | undefined +>( + client: Client +): client is BaseSmartAccountClient { + return ( + client && "middleware" in client && client.type === "SmartAccountClient" + ); +} diff --git a/packages/core/src/client/publicErc4337Client.ts b/packages/core/src/client/publicErc4337Client.ts deleted file mode 100644 index 15e5fe1120..0000000000 --- a/packages/core/src/client/publicErc4337Client.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { - createPublicClient, - http, - type Chain, - type Client, - type FallbackTransport, - type HttpTransport, - type HttpTransportConfig, - type PublicActions, - type PublicClient, - type PublicRpcSchema, - type Transport, -} from "viem"; -import { VERSION } from "../version.js"; -import { - erc4337ClientActions, - type Erc4337Actions, - type Erc4337RpcSchema, -} from "./decorators/publicErc4337Client.js"; - -export type PublicErc4337Client = Client< - T, - Chain, - undefined, - [...PublicRpcSchema, ...Erc4337RpcSchema], - PublicActions & Erc4337Actions ->; - -export const createPublicErc4337FromClient: < - T extends Transport | FallbackTransport = Transport ->( - client: PublicClient -) => PublicErc4337Client = < - T extends Transport | FallbackTransport = Transport ->( - client: PublicClient -): PublicErc4337Client => { - return client.extend(erc4337ClientActions); -}; - -/** - * Creates a PublicClient with methods for calling Bundler RPC methods - * @returns - */ -export const createPublicErc4337Client = ({ - chain, - rpcUrl, - fetchOptions, -}: { - chain: Chain; - rpcUrl: string; - fetchOptions?: HttpTransportConfig["fetchOptions"]; -}): PublicErc4337Client => { - const client = createPublicErc4337FromClient( - createPublicClient({ - chain, - transport: http(rpcUrl, { - fetchOptions: { - ...fetchOptions, - headers: { - ...fetchOptions?.headers, - "Alchemy-AA-Sdk-Version": VERSION, - }, - }, - }), - }) - ); - - return client; -}; diff --git a/packages/core/src/client/schema.ts b/packages/core/src/client/schema.ts index f0e6cdb2d5..16a7f91a08 100644 --- a/packages/core/src/client/schema.ts +++ b/packages/core/src/client/schema.ts @@ -2,12 +2,12 @@ import type { Transport } from "viem"; import { z } from "zod"; import { BigNumberishRangeSchema, PercentageSchema } from "../utils/index.js"; -import type { PublicErc4337Client } from "./publicErc4337Client.js"; +import type { BundlerClient } from "./bundlerClient.js"; export const createPublicErc4337ClientSchema = < TTransport extends Transport = Transport >() => - z.custom>((provider) => { + z.custom>((provider) => { return ( provider != null && typeof provider === "object" && diff --git a/packages/core/src/client/smartAccountClient.test.ts b/packages/core/src/client/smartAccountClient.test.ts index 127dd231a0..39923a9fa6 100644 --- a/packages/core/src/client/smartAccountClient.test.ts +++ b/packages/core/src/client/smartAccountClient.test.ts @@ -1,7 +1,7 @@ import { polygonMumbai } from "@alchemy/aa-core"; import { custom, type Transaction } from "viem"; import type { SpyInstance } from "vitest"; -import * as receiptActions from "../actions/publicErc4337/getUserOperationReceipt.js"; +import * as receiptActions from "../actions/bundler/getUserOperationReceipt.js"; import type { UserOperationReceipt } from "../types.js"; import { getDefaultEntryPointAddress } from "../utils/index.js"; import { @@ -47,6 +47,7 @@ describe("SmartAccountClient Tests", async () => { return; }, }), + chain, account, }); diff --git a/packages/core/src/client/smartAccountClient.ts b/packages/core/src/client/smartAccountClient.ts index d811fa6874..e4a94ff534 100644 --- a/packages/core/src/client/smartAccountClient.ts +++ b/packages/core/src/client/smartAccountClient.ts @@ -1,7 +1,5 @@ import { - createClient, custom, - publicActions, type Chain, type Client, type ClientConfig, @@ -16,16 +14,15 @@ import type { SmartContractAccount } from "../account/smartContractAccount.js"; import { middlewareActions } from "../middleware/actions.js"; import type { ClientMiddleware } from "../middleware/types.js"; import type { Prettify } from "../utils/index.js"; +import { createBundlerClient, type BundlerClient } from "./bundlerClient.js"; import { - erc4337ClientActions, - type Erc4337Actions, - type Erc4337RpcSchema, -} from "./decorators/publicErc4337Client.js"; + type BundlerActions, + type BundlerRpcSchema, +} from "./decorators/bundlerClient.js"; import { - smartAccountClientDecorator, + smartAccountClientActions, type BaseSmartAccountClientActions, } from "./decorators/smartAccountClient.js"; -import type { PublicErc4337Client } from "./publicErc4337Client.js"; import { SmartAccountClientOptsSchema } from "./schema.js"; type SmartAccountClientOpts = z.output; @@ -47,7 +44,7 @@ export type SmartAccountClientConfig< >; export type SmartAccountClientRpcSchema = [ - ...Erc4337RpcSchema, + ...BundlerRpcSchema, ...PublicRpcSchema ]; @@ -57,7 +54,7 @@ export type SmartAccountClientActions< | SmartContractAccount | undefined > = BaseSmartAccountClientActions & - Erc4337Actions & + BundlerActions & PublicActions; export type SmartAccountClient< @@ -84,9 +81,9 @@ export type BaseSmartAccountClient< transport, chain, account, - [...Erc4337RpcSchema, ...PublicRpcSchema], + [...BundlerRpcSchema, ...PublicRpcSchema], { middleware: ClientMiddleware } & SmartAccountClientOpts & - Erc4337Actions & + BundlerActions & PublicActions > >; @@ -111,11 +108,11 @@ export function createSmartAccountClient( ...params } = config; - const client = createClient({ + const client = createBundlerClient({ ...params, key, name, - type: "SmartAccountProvider", + type: "SmartAccountClient", // TODO: our OG provider also has handlers for some various RPC methods // we should support those here as well transport, @@ -125,10 +122,8 @@ export function createSmartAccountClient( .extend(() => ({ ...SmartAccountClientOptsSchema.parse(config.opts ?? {}), })) - .extend(publicActions) - .extend(erc4337ClientActions) .extend(middlewareActions(config)) - .extend((client) => smartAccountClientDecorator(client)); + .extend(smartAccountClientActions); } export function createSmartAccountClientFromExisting< @@ -137,7 +132,7 @@ export function createSmartAccountClientFromExisting< TAccount extends SmartContractAccount | undefined = | SmartContractAccount | undefined, - TClient extends PublicErc4337Client = PublicErc4337Client, + TClient extends BundlerClient = BundlerClient, TActions extends SmartAccountClientActions< TChain, TAccount @@ -146,13 +141,13 @@ export function createSmartAccountClientFromExisting< >( config: Omit< SmartAccountClientConfig, - "transport" + "transport" | "chain" > & { client: TClient } ): SmartAccountClient; export function createSmartAccountClientFromExisting( - config: Omit & { - client: PublicErc4337Client; + config: Omit & { + client: BundlerClient; } ): SmartAccountClient { return createSmartAccountClient({ diff --git a/packages/core/src/ens/utils.ts b/packages/core/src/ens/utils.ts index 737a073187..d1f224103f 100644 --- a/packages/core/src/ens/utils.ts +++ b/packages/core/src/ens/utils.ts @@ -1,6 +1,6 @@ import type { Chain } from "viem/chains"; import * as chains from "viem/chains"; -import { mainnet } from "../chain/index.js"; +import { mainnet } from "../chains/index.js"; export const ChainsById: Map = new Map( Object.values(chains).map((x) => [x.id, x]) diff --git a/packages/core/src/errors/account.ts b/packages/core/src/errors/account.ts index fb23dcad0a..6eab6e5d2a 100644 --- a/packages/core/src/errors/account.ts +++ b/packages/core/src/errors/account.ts @@ -1,9 +1,7 @@ -import { BaseError } from "viem"; -import { VERSION } from "../version.js"; +import { BaseError } from "./base.js"; export class AccountNotFoundError extends BaseError { override name = "AccountNotFoundError"; - override version = VERSION; // TODO: extend this further using docs path as well constructor() { diff --git a/packages/core/src/errors/base.ts b/packages/core/src/errors/base.ts new file mode 100644 index 0000000000..2d7f9b5ccf --- /dev/null +++ b/packages/core/src/errors/base.ts @@ -0,0 +1,7 @@ +import { BaseError as ViemBaseError } from "viem"; +import { VERSION } from "../version.js"; + +export class BaseError extends ViemBaseError { + override name = "AASDKError"; + override version = VERSION; +} diff --git a/packages/core/src/errors/client.ts b/packages/core/src/errors/client.ts new file mode 100644 index 0000000000..3c49312736 --- /dev/null +++ b/packages/core/src/errors/client.ts @@ -0,0 +1,13 @@ +import { BaseError } from "./base.js"; + +export class IncompatibleClientError extends BaseError { + override name = "IncompatibleClientError"; + constructor(expectedClient: string, method: string) { + super( + [ + `Client is not a ${expectedClient}.`, + `Create one with \`createSmartAccountClient\` first before using \`${method}\``, + ].join("\n") + ); + } +} diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 11495901f5..94dc810b33 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -5,53 +5,96 @@ export * as chains from "viem/chains"; export { EntryPointAbi } from "./abis/EntryPointAbi.js"; export { SimpleAccountAbi } from "./abis/SimpleAccountAbi.js"; export { SimpleAccountFactoryAbi } from "./abis/SimpleAccountFactoryAbi.js"; - export { BaseSmartContractAccount } from "./account/base.js"; export { createSimpleSmartAccount } from "./account/simple.js"; export type { SimpleSmartAccount } from "./account/simple.js"; +export type * from "./account/smartContractAccount.js"; +export { + getAccountAddress, + parseFactoryAddressFromAccountInitCode, + toSmartContractAccount, +} from "./account/smartContractAccount.js"; export type { BaseSmartAccountParams, SignTypedDataParams, } from "./account/types.js"; - +export { buildUserOperation } from "./actions/smartAccount/buildUserOperation.js"; +export { buildUserOperationFromTx } from "./actions/smartAccount/buildUserOperationFromTx.js"; +export { buildUserOperationFromTxs } from "./actions/smartAccount/buildUserOperationFromTxs.js"; +export { checkGasSponsorshipEligibility } from "./actions/smartAccount/checkGasSponsorshipEligibility.js"; +export { dropAndReplaceUserOperation } from "./actions/smartAccount/dropAndReplaceUserOperation.js"; +export { sendTransaction } from "./actions/smartAccount/sendTransaction.js"; +export { sendTransactions } from "./actions/smartAccount/sendTransactions.js"; +export { sendUserOperation } from "./actions/smartAccount/sendUserOperation.js"; +export type * from "./actions/smartAccount/types.js"; +export { waitForUserOperationTransaction } from "./actions/smartAccount/waitForUserOperationTransacation.js"; +export { + arbitrum, + arbitrumGoerli, + arbitrumSepolia, + base, + baseGoerli, + baseSepolia, + goerli, + mainnet, + optimism, + optimismGoerli, + optimismSepolia, + polygon, + polygonMumbai, + sepolia, +} from "./chains/index.js"; +export type * from "./client/bundlerClient.js"; +export { + createBundlerClient, + createBundlerClientFromExisting, +} from "./client/bundlerClient.js"; +export type * from "./client/decorators/bundlerClient.js"; +export { bundlerActions } from "./client/decorators/bundlerClient.js"; +export type * from "./client/decorators/smartAccountClient.js"; +export { smartAccountClientActions as smartAccountClientDecorator } from "./client/decorators/smartAccountClient.js"; +export { isSmartAccountClient } from "./client/isSmartAccountClient.js"; +export { + ConnectionConfigSchema, + SmartAccountClientOptsSchema as SmartAccountProviderOptsSchema, + createPublicErc4337ClientSchema, +} from "./client/schema.js"; +export type * from "./client/smartAccountClient.js"; +export { + createSmartAccountClient, + createSmartAccountClientFromExisting, +} from "./client/smartAccountClient.js"; +export type * from "./client/types.js"; +export { + convertChainIdToCoinType, + convertCoinTypeToChain, + convertCoinTypeToChainId, +} from "./ens/utils.js"; +export { AccountNotFoundError } from "./errors/account.js"; +export { IncompatibleClientError } from "./errors/client.js"; +export { LogLevel, Logger } from "./logger.js"; +export { middlewareActions } from "./middleware/actions.js"; +export { defaultFeeEstimator } from "./middleware/defaults/feeEstimator.js"; +export { defaultGasEstimator } from "./middleware/defaults/gasEstimator.js"; +export { overridePaymasterDataMiddleware } from "./middleware/defaults/overridePaymasterData.js"; +export { defaultPaymasterAndData } from "./middleware/defaults/paymasterAndData.js"; +export { noopMiddleware } from "./middleware/noopMiddleware.js"; +export type * from "./middleware/types.js"; export { LocalAccountSigner } from "./signer/local-account.js"; export { SignerSchema, isSigner } from "./signer/schema.js"; export type { SmartAccountAuthenticator, SmartAccountSigner, } from "./signer/types.js"; - export { verifyEIP6492Signature, wrapSignatureWith6492, } from "./signer/utils.js"; export { WalletClientSigner } from "./signer/wallet-client.js"; - -export type * from "./client/decorators/publicErc4337Client.js"; -export { erc4337ClientActions } from "./client/decorators/publicErc4337Client.js"; -export type * from "./client/publicErc4337Client.js"; -export { - createPublicErc4337Client, - createPublicErc4337FromClient, -} from "./client/publicErc4337Client.js"; -export { createPublicErc4337ClientSchema } from "./client/schema.js"; -export type * from "./client/types.js"; - -export { - convertChainIdToCoinType, - convertCoinTypeToChain, - convertCoinTypeToChainId, -} from "./ens/utils.js"; - -export { - ConnectionConfigSchema, - SmartAccountClientOptsSchema as SmartAccountProviderOptsSchema, -} from "./client/schema.js"; -export type * from "./client/types.js"; - export type * from "./types.js"; export type * from "./utils/index.js"; export { + AlchemyChainMap, ChainSchema, applyUserOpFeeOption, applyUserOpOverride, @@ -71,58 +114,3 @@ export { isPercentage, resolveProperties, } from "./utils/index.js"; - -export { LogLevel, Logger } from "./logger.js"; - -export type * from "./account/smartContractAccount.js"; -export { - getAccountAddress, - parseFactoryAddressFromAccountInitCode, - toSmartContractAccount, -} from "./account/smartContractAccount.js"; - -export { buildUserOperation } from "./actions/smartAccount/buildUserOperation.js"; -export { buildUserOperationFromTx } from "./actions/smartAccount/buildUserOperationFromTx.js"; -export { buildUserOperationFromTxs } from "./actions/smartAccount/buildUserOperationFromTxs.js"; -export { checkGasSponsorshipEligibility } from "./actions/smartAccount/checkGasSponsorshipEligibility.js"; -export { dropAndReplaceUserOperation } from "./actions/smartAccount/dropAndReplaceUserOperation.js"; -export { sendTransaction } from "./actions/smartAccount/sendTransaction.js"; -export { sendTransactions } from "./actions/smartAccount/sendTransactions.js"; -export { sendUserOperation } from "./actions/smartAccount/sendUserOperation.js"; -export type * from "./actions/smartAccount/types.js"; -export { waitForUserOperationTransaction } from "./actions/smartAccount/waitForUserOperationTransacation.js"; - -export type * from "./client/decorators/smartAccountClient.js"; -export { smartAccountClientDecorator } from "./client/decorators/smartAccountClient.js"; -export type * from "./client/smartAccountClient.js"; -export { - createSmartAccountClient, - createSmartAccountClientFromExisting, -} from "./client/smartAccountClient.js"; - -export { middlewareActions } from "./middleware/actions.js"; -export { defaultFeeEstimator } from "./middleware/defaults/feeEstimator.js"; -export { defaultGasEstimator } from "./middleware/defaults/gasEstimator.js"; -export { overridePaymasterDataMiddleware } from "./middleware/defaults/overridePaymasterData.js"; -export { defaultPaymasterAndData } from "./middleware/defaults/paymasterAndData.js"; -export { noopMiddleware } from "./middleware/noopMiddleware.js"; -export type * from "./middleware/types.js"; - -export { AccountNotFoundError } from "./errors/account.js"; - -export { - arbitrum, - arbitrumGoerli, - arbitrumSepolia, - base, - baseGoerli, - baseSepolia, - goerli, - mainnet, - optimism, - optimismGoerli, - optimismSepolia, - polygon, - polygonMumbai, - sepolia, -} from "./chain/index.js"; diff --git a/packages/core/src/middleware/actions.ts b/packages/core/src/middleware/actions.ts index 33f4216ec7..1c9a9d9fb8 100644 --- a/packages/core/src/middleware/actions.ts +++ b/packages/core/src/middleware/actions.ts @@ -7,9 +7,9 @@ import type { } from "viem"; import type { SmartContractAccount } from "../account/smartContractAccount.js"; import type { - Erc4337Actions, - Erc4337RpcSchema, -} from "../client/decorators/publicErc4337Client.js"; + BundlerActions, + BundlerRpcSchema, +} from "../client/decorators/bundlerClient.js"; import { defaultFeeEstimator } from "./defaults/feeEstimator.js"; import { defaultGasEstimator } from "./defaults/gasEstimator.js"; import { defaultPaymasterAndData } from "./defaults/paymasterAndData.js"; @@ -26,8 +26,8 @@ export type MiddlewareClient< TTransport, TChain, TAccount, - [...Erc4337RpcSchema, ...PublicRpcSchema], - PublicActions & Erc4337Actions + [...BundlerRpcSchema, ...PublicRpcSchema], + PublicActions & BundlerActions >; export const middlewareActions = diff --git a/packages/core/src/utils/defaults.ts b/packages/core/src/utils/defaults.ts index 2c1fa81642..12a7aec137 100644 --- a/packages/core/src/utils/defaults.ts +++ b/packages/core/src/utils/defaults.ts @@ -14,7 +14,7 @@ import { polygon, polygonMumbai, sepolia, -} from "../chain/index.js"; +} from "../chains/index.js"; import type { UserOperationFeeOptions } from "../types"; /** diff --git a/packages/core/src/utils/index.ts b/packages/core/src/utils/index.ts index 127984ee64..8213f4b330 100644 --- a/packages/core/src/utils/index.ts +++ b/packages/core/src/utils/index.ts @@ -1,7 +1,7 @@ import type { Address, Chain, Hash, Hex } from "viem"; import { encodeAbiParameters, hexToBigInt, keccak256, toHex } from "viem"; import * as chains from "viem/chains"; -import * as alchemyChains from "../chain/index.js"; +import * as alchemyChains from "../chains/index.js"; import type { BigNumberish, Percentage, @@ -10,7 +10,7 @@ import type { } from "../types.js"; import { BigNumberishSchema, PercentageSchema } from "./schema.js"; -const AlchemyChainMap = new Map( +export const AlchemyChainMap = new Map( Object.values(alchemyChains).map((c) => [c.id, c]) ); diff --git a/packages/core/src/utils/testUtils.ts b/packages/core/src/utils/testUtils.ts index 1a2481e595..50de3d36ab 100644 --- a/packages/core/src/utils/testUtils.ts +++ b/packages/core/src/utils/testUtils.ts @@ -4,13 +4,11 @@ import { type SmartContractAccount, } from "../account/smartContractAccount.js"; import { - createPublicErc4337FromClient, - type PublicErc4337Client, -} from "../client/publicErc4337Client.js"; + createBundlerClientFromExisting, + type BundlerClient, +} from "../client/bundlerClient.js"; -export const createDummySmartContractAccount = async < - C extends PublicErc4337Client ->( +export const createDummySmartContractAccount = async ( client: C, entrypoint: Address ): Promise => { @@ -18,7 +16,8 @@ export const createDummySmartContractAccount = async < source: "dummy", accountAddress: "0x1234567890123456789012345678901234567890", entrypointAddress: entrypoint, - client: client, + chain: client.chain, + transport: custom(client), signMessage: async () => "0xdeadbeef", signTypedData: async () => "0xdeadbeef", getAccountInitCode: async () => @@ -31,7 +30,7 @@ export const createDummySmartContractAccount = async < }; export const createTestClient = (chain: Chain) => { - return createPublicErc4337FromClient( + return createBundlerClientFromExisting( createPublicClient({ chain, transport: custom({ diff --git a/packages/ethers/src/__tests__/provider-adapter.test.ts b/packages/ethers/src/__tests__/provider-adapter.test.ts index b596dc8d41..5636725e08 100644 --- a/packages/ethers/src/__tests__/provider-adapter.test.ts +++ b/packages/ethers/src/__tests__/provider-adapter.test.ts @@ -1,11 +1,11 @@ import { - createPublicErc4337Client, createSimpleSmartAccount, getChain, getDefaultSimpleAccountFactoryAddress, } from "@alchemy/aa-core"; import { Wallet } from "@ethersproject/wallet"; import { Alchemy, Network, type AlchemyProvider } from "alchemy-sdk"; +import { http } from "viem"; import { EthersProviderAdapter } from "../../src/provider-adapter.js"; import { convertWalletToAccountSigner } from "../utils.js"; @@ -49,10 +49,9 @@ const givenConnectedProvider = async ({ owner: convertWalletToAccountSigner(owner), accountAddress: "0x856185aedfab56809e6686d2d6d0c039d615bd9c", factoryAddress: getDefaultSimpleAccountFactoryAddress(chain), - rpcClient: createPublicErc4337Client({ - chain, - rpcUrl: `${chain.rpcUrls.alchemy.http[0]}/${alchemyProvider.apiKey}`, - }), + transport: http( + `${chain.rpcUrls.alchemy.http[0]}/${alchemyProvider.apiKey}` + ), }) ); }; diff --git a/packages/ethers/src/account-signer.ts b/packages/ethers/src/account-signer.ts index 6aa3f6f9ff..bafc3c9ea8 100644 --- a/packages/ethers/src/account-signer.ts +++ b/packages/ethers/src/account-signer.ts @@ -1,7 +1,7 @@ import { resolveProperties, type BatchUserOperationCallData, - type PublicErc4337Client, + type BundlerClient, type SmartContractAccount, type UserOperationCallData, type UserOperationOverrides, @@ -105,8 +105,8 @@ export class AccountSigner< ); } - getPublicErc4337Client(): PublicErc4337Client { - return this.provider.getPublicErc4337Client(); + getPublicErc4337Client(): BundlerClient { + return this.provider.getBundlerClient(); } connect(provider: EthersProviderAdapter): AccountSigner { diff --git a/packages/ethers/src/provider-adapter.ts b/packages/ethers/src/provider-adapter.ts index 671b5fb34f..8d82919890 100644 --- a/packages/ethers/src/provider-adapter.ts +++ b/packages/ethers/src/provider-adapter.ts @@ -1,8 +1,8 @@ import { - createPublicErc4337FromClient, + createBundlerClientFromExisting, createSmartAccountClient, getChain, - type PublicErc4337Client, + type BundlerClient, type SmartAccountClient, type SmartContractAccount, } from "@alchemy/aa-core"; @@ -62,8 +62,8 @@ export class EthersProviderAdapter extends JsonRpcProvider { return new AccountSigner(this, account); } - getPublicErc4337Client(): PublicErc4337Client { - return createPublicErc4337FromClient( + getBundlerClient(): BundlerClient { + return createBundlerClientFromExisting( createPublicClient({ transport: custom(this.accountProvider.transport), chain: this.accountProvider.chain!, diff --git a/packages/ethers/src/types.ts b/packages/ethers/src/types.ts index 5b047bc907..4426a8be94 100644 --- a/packages/ethers/src/types.ts +++ b/packages/ethers/src/types.ts @@ -1,6 +1,6 @@ import { type Address, - type PublicErc4337Client, + type BundlerClient, type SmartAccountClient, type SmartContractAccount, } from "@alchemy/aa-core"; @@ -16,6 +16,6 @@ export type EthersProviderAdapterOpts< entryPointAddress?: Address; account?: TAccount; } & ( - | { rpcProvider: string | PublicErc4337Client; chainId: number } + | { rpcProvider: string | BundlerClient; chainId: number } | { accountProvider: SmartAccountClient } ); diff --git a/site/.vitepress/config.ts b/site/.vitepress/config.ts index 0a9f5efa74..c55f48dede 100644 --- a/site/.vitepress/config.ts +++ b/site/.vitepress/config.ts @@ -1,4 +1,5 @@ import { defineConfig } from "vitepress"; +import { packagesSidebar } from "./sidebar/packages"; const pkg = require("../../lerna.json"); @@ -172,741 +173,7 @@ export default defineConfig({ }, ], }, - { - text: "aa-sdk Packages", - base: "/packages", - items: [ - { - text: "aa-core", - base: "/packages/aa-core", - collapsed: true, - items: [ - { - text: "Getting Started", - link: "/", - }, - { - text: "Provider", - collapsed: true, - base: "/packages/aa-core/provider", - items: [ - { - text: "Introduction", - link: "/introduction", - }, - { - text: "constructor", - link: "/constructor", - }, - { - text: "sendUserOperation", - link: "/sendUserOperation", - }, - { - text: "buildUserOperation", - link: "/buildUserOperation", - }, - { - text: "checkGasSponsorshipEligibility", - link: "/checkGasSponsorshipEligibility", - }, - { - text: "buildUserOperationFromTx", - link: "/buildUserOperationFromTx", - }, - { - text: "waitForUserOperationTransaction", - link: "/waitForUserOperationTransaction", - }, - { - text: "dropAndReplaceUserOperation", - link: "/dropAndReplaceUserOperation", - }, - { - text: "getUserOperationByHash", - link: "/getUserOperationByHash", - }, - { - text: "getUserOperationReceipt", - link: "/getUserOperationReceipt", - }, - { - text: "sendTransaction", - link: "/sendTransaction", - }, - { - text: "sendTransactions", - link: "/sendTransactions", - }, - { - text: "request", - link: "/request", - }, - { - text: "signMessage", - link: "/signMessage", - }, - { - text: "signTypedData", - link: "/signTypedData", - }, - { - text: "signMessageWith6492", - link: "/signMessageWith6492", - }, - { - text: "signTypedDataWith6492", - link: "/signTypedDataWith6492", - }, - { - text: "getAddress", - link: "/getAddress", - }, - { - text: "getEntryPointAddress", - link: "/getEntryPointAddress", - }, - { - text: "isConnected", - link: "/isConnected", - }, - { - text: "withPaymasterMiddleware", - link: "/withPaymasterMiddleware", - }, - { - text: "withGasEstimator", - link: "/withGasEstimator", - }, - { - text: "withFeeDataGetter", - link: "/withFeeDataGetter", - }, - { - text: "withCustomMiddleware", - link: "/withCustomMiddleware", - }, - { - text: "withUOSimulationMiddleware", - link: "/withUOSimulationMiddleware", - }, - { - text: "connect", - link: "/connect", - }, - { - text: "disconnect", - link: "/disconnect", - }, - { - text: "extend", - link: "/extend", - }, - { - text: "Types", - base: "/packages/aa-core/provider/types", - collapsed: true, - items: [ - { - text: "userOperationFeeOptions", - link: "/userOperationFeeOptions", - }, - { - text: "UserOperationFeeOptionsField", - link: "/userOperationFeeOptionsField", - }, - { - text: "UserOperationOverrides", - link: "/userOperationOverrides", - }, - ], - }, - ], - }, - { - text: "Accounts", - base: "/packages/aa-core/accounts", - collapsed: true, - items: [ - { - text: "Introduction", - link: "/introduction", - }, - { - text: "constructor", - link: "/constructor", - }, - { - text: "Required Methods", - collapsed: true, - base: "/packages/aa-core/accounts/required", - items: [ - { - text: "getDummySignature", - link: "/getDummySignature", - }, - { - text: "getAccountInitCode", - link: "/getAccountInitCode", - }, - { - text: "signMessage", - link: "/signMessage", - }, - { - text: "encodeExecute", - link: "/encodeExecute", - }, - ], - }, - { - text: "Optional Methods", - collapsed: true, - base: "/packages/aa-core/accounts/optional", - items: [ - { - text: "encodeBatchExecute", - link: "/encodeBatchExecute", - }, - { - text: "signTypedData", - link: "/signTypedData", - }, - { - text: "signMessageWith6492", - link: "/signMessageWith6492", - }, - { - text: "signTypedDataWith6492", - link: "/signTypedDataWith6492", - }, - { - text: "signUserOperationHash", - link: "/signUserOperationHash", - }, - ], - }, - { - text: "Other Methods", - collapsed: true, - base: "/packages/aa-core/accounts/other", - items: [ - { - text: "getAddress", - link: "/getAddress", - }, - { - text: "getNonce", - link: "/getNonce", - }, - { - text: "getOwner", - link: "/getOwner", - }, - { - text: "getDeploymentState", - link: "/getDeploymentState", - }, - { - text: "isAccountDeployed", - link: "/isAccountDeployed", - }, - { - text: "getFactoryAddress", - link: "/getFactoryAddress", - }, - { - text: "getEntryPointAddress", - link: "/getEntryPointAddress", - }, - ], - }, - ], - }, - { - text: "Signers", - base: "/packages/aa-core/signers", - collapsed: true, - items: [ - { text: "WalletClientSigner", link: "/wallet-client" }, - { text: "LocalAccountSigner", link: "/local-account" }, - { - text: "Utils", - collapsed: true, - base: "/packages/aa-core/signers/utils", - items: [ - { - text: "wrapSignatureWith6492", - link: "/wrapSignatureWith6492", - }, - { - text: "verifyEIP6492Signature", - link: "/verifyEIP6492Signature", - }, - ], - }, - ], - }, - { - text: "Public Client", - base: "/packages/aa-core/client", - collapsed: true, - items: [ - { - text: "Introduction", - link: "/", - }, - { - text: "Actions", - collapsed: true, - base: "/packages/aa-core/client/actions", - items: [ - { - text: "sendUserOperation", - link: "/sendUserOperation", - }, - { - text: "estimateUserOperationGas", - link: "/estimateUserOperationGas", - }, - { - text: "getUserOperationByHash", - link: "/getUserOperationByHash", - }, - { - text: "getUserOperationReceipt", - link: "/getUserOperationReceipt", - }, - { - text: "getSupportedEntryPoints", - link: "/getSupportedEntryPoints", - }, - ], - }, - { - text: "createPublicErc4337Client", - link: "/createPublicErc4337Client", - }, - { - text: "createPublicErc4337FromClient", - link: "/createPublicErc4337FromClient", - }, - { - text: "erc4337ClientActions", - link: "/erc4337ClientActions", - }, - ], - }, - { - text: "Utils", - base: "/packages/aa-core/utils", - collapsed: true, - items: [ - { text: "asyncPipe", link: "/asyncPipe" }, - { - text: "convertChainIdToCoinType", - link: "/convertChainIdToCoinType", - }, - { - text: "convertCoinTypeToChain", - link: "/convertCoinTypeToChain", - }, - { - text: "convertCoinTypeToChainId", - link: "/convertCoinTypeToChainId", - }, - { text: "deepHexlify", link: "/deepHexlify" }, - { text: "defineReadOnly", link: "/defineReadOnly" }, - { text: "getChain", link: "/getChain" }, - { - text: "getDefaultEntryPointAddress", - link: "/getDefaultEntryPointAddress", - }, - { - text: "getDefaultSimpleAccountFactoryAddress", - link: "/getDefaultSimpleAccountFactoryAddress", - }, - { - text: "getUserOperationHash", - link: "/getUserOperationHash", - }, - { text: "resolveProperties", link: "/resolveProperties" }, - { text: "stringToIndex", link: "/stringToIndex" }, - ], - }, - ], - }, - { - text: "aa-alchemy", - base: "/packages/aa-alchemy", - collapsed: true, - items: [ - { - text: "Getting Started", - link: "/", - }, - { - text: "Provider", - base: "/packages/aa-alchemy/provider", - collapsed: true, - items: [ - { - text: "Introduction", - link: "/introduction", - }, - { - text: "constructor", - link: "/constructor", - }, - { - text: "factory", - link: "/light-account-factory", - }, - { text: "gasEstimator", link: "/gasEstimator" }, - { - text: "simulateUserOperationAssetChanges", - link: "/simulateUserOperationAssetChanges", - }, - { - text: "withAlchemyGasManager", - link: "/withAlchemyGasManager", - }, - { - text: "withAlchemyUserOpSimulation", - link: "/withAlchemyUserOpSimulation", - }, - { - text: "withAlchemyEnhancedApis", - link: "/withAlchemyEnhancedApis", - }, - ], - }, - { - text: "Middleware", - base: "/packages/aa-alchemy/middleware", - collapsed: true, - items: [ - { - text: "Introduction", - link: "/introduction", - }, - { - text: "withAlchemyGasFeeEstimator", - link: "/withAlchemyGasFeeEstimator", - }, - { - text: "withAlchemyGasManager", - link: "/withAlchemyGasManager", - }, - { - text: "withAlchemyUserOpSimulation", - link: "/withAlchemyUserOpSimulation", - }, - ], - }, - { - text: "Utils", - collapsed: true, - base: "/packages/aa-alchemy/utils", - items: [ - { - text: "Introduction", - link: "/introduction", - }, - { text: "SupportedChains", link: "/supportedChains" }, - ], - }, - ], - }, - { - text: "aa-accounts", - collapsed: true, - base: "/packages/aa-accounts", - items: [ - { - text: "Getting Started", - link: "/", - }, - { - text: "Light Account", - collapsed: true, - base: "/packages/aa-accounts/light-account", - items: [ - { - text: "Introduction", - link: "/introduction", - }, - { - text: "constructor", - link: "/constructor", - }, - { - text: "provider", - link: "/provider", - }, - { - text: "signMessageWith6492", - link: "/signMessageWith6492", - }, - { text: "signTypedData", link: "/signTypedData" }, - { - text: "signTypedDataWith6492", - link: "/signTypedDataWith6492", - }, - { text: "getOwnerAddress", link: "/getOwnerAddress" }, - { - text: "encodeTransferOwnership", - link: "/encodeTransferOwnership", - }, - { text: "transferOwnership", link: "/transferOwnership" }, - ], - }, - { - text: "Utils", - collapsed: true, - base: "/packages/aa-accounts/utils", - items: [ - { - text: "getDefaultLightAccountFactoryAddress", - link: "/getDefaultLightAccountFactoryAddress", - }, - ], - }, - { text: "Contributing", link: "/contributing" }, - ], - }, - { - text: "aa-signers", - collapsed: true, - base: "/packages/aa-signers", - items: [ - { - text: "Getting Started", - link: "/", - }, - { - text: "Magic Signer", - collapsed: true, - base: "/packages/aa-signers/magic", - items: [ - { text: "Introduction", link: "/introduction" }, - { text: "constructor", link: "/constructor" }, - { text: "authenticate", link: "/authenticate" }, - { text: "getAddress", link: "/getAddress" }, - { text: "signMessage", link: "/signMessage" }, - { text: "signTypedData", link: "/signTypedData" }, - { text: "getAuthDetails", link: "/getAuthDetails" }, - ], - }, - { - text: "Web3Auth Signer", - collapsed: true, - base: "/packages/aa-signers/web3auth", - items: [ - { text: "Introduction", link: "/introduction" }, - { text: "constructor", link: "/constructor" }, - { text: "authenticate", link: "/authenticate" }, - { text: "getAddress", link: "/getAddress" }, - { text: "signMessage", link: "/signMessage" }, - { text: "signTypedData", link: "/signTypedData" }, - { text: "getAuthDetails", link: "/getAuthDetails" }, - ], - }, - { - text: "Turnkey Signer", - collapsed: true, - base: "/packages/aa-signers/turnkey", - items: [ - { text: "Introduction", link: "/introduction" }, - { text: "constructor", link: "/constructor" }, - { text: "authenticate", link: "/authenticate" }, - { text: "getAddress", link: "/getAddress" }, - { text: "signMessage", link: "/signMessage" }, - { text: "signTypedData", link: "/signTypedData" }, - { text: "getAuthDetails", link: "/getAuthDetails" }, - ], - }, - { - text: "Fireblocks Signer", - collapsed: true, - base: "/packages/aa-signers/fireblocks", - items: [ - { text: "Introduction", link: "/introduction" }, - { text: "constructor", link: "/constructor" }, - { text: "authenticate", link: "/authenticate" }, - { text: "getAddress", link: "/getAddress" }, - { text: "signMessage", link: "/signMessage" }, - { text: "signTypedData", link: "/signTypedData" }, - { text: "getAuthDetails", link: "/getAuthDetails" }, - ], - }, - { - text: "Capsule Signer", - collapsed: true, - base: "/packages/aa-signers/capsule", - items: [ - { text: "Introduction", link: "/introduction" }, - { text: "constructor", link: "/constructor" }, - { text: "authenticate", link: "/authenticate" }, - { text: "getAddress", link: "/getAddress" }, - { text: "signMessage", link: "/signMessage" }, - { text: "signTypedData", link: "/signTypedData" }, - { text: "getAuthDetails", link: "/getAuthDetails" }, - ], - }, - { - text: "Particle Signer", - collapsed: true, - base: "/packages/aa-signers/particle", - items: [ - { text: "Introduction", link: "/introduction" }, - { text: "constructor", link: "/constructor" }, - { text: "authenticate", link: "/authenticate" }, - { text: "getAddress", link: "/getAddress" }, - { text: "signMessage", link: "/signMessage" }, - { text: "signTypedData", link: "/signTypedData" }, - { text: "getAuthDetails", link: "/getAuthDetails" }, - ], - }, - { - text: "Portal Signer", - collapsed: true, - base: "/packages/aa-signers/portal", - items: [ - { text: "Introduction", link: "/introduction" }, - { text: "constructor", link: "/constructor" }, - { text: "authenticate", link: "/authenticate" }, - { text: "getAddress", link: "/getAddress" }, - { text: "signMessage", link: "/signMessage" }, - { text: "signTypedData", link: "/signTypedData" }, - { text: "getAuthDetails", link: "/getAuthDetails" }, - ], - }, - { - text: "Arcana Auth Signer", - collapsed: true, - base: "/packages/aa-signers/arcana-auth", - items: [ - { text: "Introduction", link: "/introduction" }, - { text: "constructor", link: "/constructor" }, - { text: "authenticate", link: "/authenticate" }, - { text: "getAddress", link: "/getAddress" }, - { text: "signMessage", link: "/signMessage" }, - { text: "signTypedData", link: "/signTypedData" }, - { text: "getAuthDetails", link: "/getAuthDetails" }, - ], - }, - { - text: "Lit Signer", - collapsed: true, - base: "/packages/aa-signers/lit-protocol", - items: [ - { text: "Introduction", link: "/introduction" }, - { text: "constructor", link: "/constructor" }, - { text: "authenticate", link: "/authenticate" }, - { text: "getAddress", link: "/getAddress" }, - { text: "signMessage", link: "/signMessage" }, - { text: "signTypedData", link: "/signTypedData" }, - { text: "getAuthDetails", link: "/getAuthDetails" }, - ], - }, - { text: "Contributing", link: "/contributing" }, - ], - }, - { - text: "aa-ethers", - base: "/packages/aa-ethers", - collapsed: true, - items: [ - { - text: "Getting Started", - link: "/", - }, - { - text: "EthersProviderAdapter", - collapsed: true, - base: "/packages/aa-ethers/provider-adapter", - items: [ - { - text: "Introduction", - link: "/introduction", - }, - { - text: "constructor", - link: "/constructor", - }, - { - text: "send", - link: "/send", - }, - { - text: "connectToAccount", - link: "/connectToAccount", - }, - { - text: "getPublicErc4337Client", - link: "/getPublicErc4337Client", - }, - { - text: "fromEthersProvider", - link: "/fromEthersProvider", - }, - ], - }, - { - text: "AccountSigner", - collapsed: true, - base: "/packages/aa-ethers/account-signer", - items: [ - { - text: "Introduction", - link: "/introduction", - }, - { - text: "getAddress", - link: "/getAddress", - }, - { - text: "signMessage", - link: "/signMessage", - }, - { - text: "sendTransaction", - link: "/sendTransaction", - }, - { - text: "getPublicErc4337Client", - link: "/getPublicErc4337Client", - }, - { - text: "connect", - link: "/connect", - }, - ], - }, - { - text: "Utils", - collapsed: true, - base: "/packages/aa-ethers/utils", - items: [ - { - text: "Introduction", - link: "/introduction", - }, - { - text: "convertWalletToAccountSigner", - link: "/convertWalletToAccountSigner", - }, - { - text: "convertEthersSignerToAccountSigner", - link: "/convertEthersSignerToAccountSigner", - }, - ], - }, - ], - }, - ], - }, + packagesSidebar, { text: "Glossary", base: "/glossary", diff --git a/site/.vitepress/sidebar/packages/aa-accounts.ts b/site/.vitepress/sidebar/packages/aa-accounts.ts new file mode 100644 index 0000000000..3efbe42ed2 --- /dev/null +++ b/site/.vitepress/sidebar/packages/aa-accounts.ts @@ -0,0 +1,44 @@ +import { DefaultTheme } from "vitepress/types/default-theme"; + +export const aaAccountsSidebar: DefaultTheme.SidebarItem = { + text: "aa-accounts", + collapsed: true, + base: "/packages/aa-accounts", + items: [ + { + text: "Getting Started", + link: "/", + }, + { + text: "Light Account", + link: "/light-account/", + }, + { + text: "Light Account Actions", + collapsed: true, + base: "/packages/aa-accounts/light-account/actions", + items: [ + { + text: "transferOwnership", + link: "/transferOwnership", + }, + ], + }, + { + text: "Light Account Client", + link: "/light-account/client", + }, + { + text: "Utils", + collapsed: true, + base: "/packages/aa-accounts/utils", + items: [ + { + text: "getDefaultLightAccountFactoryAddress", + link: "/getDefaultLightAccountFactoryAddress", + }, + ], + }, + { text: "Contributing", link: "/contributing" }, + ], +}; diff --git a/site/.vitepress/sidebar/packages/aa-alchemy.ts b/site/.vitepress/sidebar/packages/aa-alchemy.ts new file mode 100644 index 0000000000..2fc16438d2 --- /dev/null +++ b/site/.vitepress/sidebar/packages/aa-alchemy.ts @@ -0,0 +1,61 @@ +import { DefaultTheme } from "vitepress/types/default-theme"; + +export const aaAlchemySidebar: DefaultTheme.SidebarItem = { + text: "aa-alchemy", + base: "/packages/aa-alchemy", + collapsed: true, + items: [ + { + text: "Getting Started", + link: "/", + }, + { + text: "Smart Account Client", + link: "/smart-account-client/", + }, + { + text: "Smart Account Actions", + base: "/packages/aa-alchemy/smart-account-client/actions", + collapsed: true, + items: [ + { + text: "simulateUserOperation", + link: "/simulateUserOperation", + }, + { + text: "alchemyEnhancedApiActions", + link: "/alchemyEnhancedApiActions", + }, + ], + }, + { + text: "Light Account Client", + link: "/light-account-client/", + }, + { + text: "Middleware", + base: "/packages/aa-alchemy/middleware", + collapsed: true, + items: [ + { + text: "alchemyFeeEstimator", + link: "/alchemyFeeEstimator", + }, + { + text: "alchemyGasManagerMiddleware", + link: "/alchemyGasManagerMiddleware", + }, + { + text: "alchemyUserOperationSimulator", + link: "/alchemyUserOperationSimulator", + }, + ], + }, + { + text: "Utils", + collapsed: true, + base: "/packages/aa-alchemy/utils", + items: [{ text: "Define Alchemy Chain", link: "/defineAlchemyChain" }], + }, + ], +}; diff --git a/site/.vitepress/sidebar/packages/aa-core.ts b/site/.vitepress/sidebar/packages/aa-core.ts new file mode 100644 index 0000000000..ec9fc22e0c --- /dev/null +++ b/site/.vitepress/sidebar/packages/aa-core.ts @@ -0,0 +1,210 @@ +import { DefaultTheme } from "vitepress/types/default-theme"; + +export const aaCoreSidebar: DefaultTheme.SidebarItem = { + text: "aa-core", + base: "/packages/aa-core", + collapsed: true, + items: [ + { + text: "Getting Started", + link: "/", + }, + { + text: "Smart Account Client", + base: "/packages/aa-core/smart-account-client", + link: "/index", + }, + { + text: "Smart Account Actions", + collapsed: true, + base: "/packages/aa-core/smart-account-client/actions", + items: [ + { + text: "sendUserOperation", + link: "/sendUserOperation", + }, + { + text: "buildUserOperation", + link: "/buildUserOperation", + }, + { + text: "checkGasSponsorshipEligibility", + link: "/checkGasSponsorshipEligibility", + }, + { + text: "buildUserOperationFromTx", + link: "/buildUserOperationFromTx", + }, + { + text: "waitForUserOperationTransaction", + link: "/waitForUserOperationTransaction", + }, + { + text: "dropAndReplaceUserOperation", + link: "/dropAndReplaceUserOperation", + }, + { + text: "getUserOperationByHash", + link: "/getUserOperationByHash", + }, + { + text: "getUserOperationReceipt", + link: "/getUserOperationReceipt", + }, + { + text: "sendTransaction", + link: "/sendTransaction", + }, + { + text: "sendTransactions", + link: "/sendTransactions", + }, + { + text: "request", + link: "/request", + }, + { + text: "signMessage", + link: "/signMessage", + }, + { + text: "signTypedData", + link: "/signTypedData", + }, + { + text: "signMessageWith6492", + link: "/signMessageWith6492", + }, + { + text: "signTypedDataWith6492", + link: "/signTypedDataWith6492", + }, + { + text: "getAddress", + link: "/getAddress", + }, + { + text: "Types", + base: "/packages/aa-core/smart-account-client/types", + collapsed: true, + items: [ + { + text: "userOperationFeeOptions", + link: "/userOperationFeeOptions", + }, + { + text: "UserOperationFeeOptionsField", + link: "/userOperationFeeOptionsField", + }, + { + text: "UserOperationOverrides", + link: "/userOperationOverrides", + }, + ], + }, + ], + }, + { + text: "Bundler Client", + base: "/packages/aa-core/bundler-client", + link: "/", + }, + { + text: "Bundler Actions", + collapsed: true, + base: "/packages/aa-core/bundler-client/index/actions", + items: [ + { + text: "sendRawUserOperation", + link: "/sendRawUserOperation", + }, + { + text: "estimateUserOperationGas", + link: "/estimateUserOperationGas", + }, + { + text: "getUserOperationByHash", + link: "/getUserOperationByHash", + }, + { + text: "getUserOperationReceipt", + link: "/getUserOperationReceipt", + }, + { + text: "getSupportedEntryPoints", + link: "/getSupportedEntryPoints", + }, + { + text: "bundlerActions", + link: "/bundlerActions", + }, + ], + }, + { + text: "Accounts", + base: "/packages/aa-core/accounts", + link: "/", + }, + { + text: "Signers", + base: "/packages/aa-core/signers", + collapsed: true, + items: [ + { text: "WalletClientSigner", link: "/wallet-client" }, + { text: "LocalAccountSigner", link: "/local-account" }, + { + text: "Utils", + collapsed: true, + base: "/packages/aa-core/signers/utils", + items: [ + { + text: "wrapSignatureWith6492", + link: "/wrapSignatureWith6492", + }, + { + text: "verifyEIP6492Signature", + link: "/verifyEIP6492Signature", + }, + ], + }, + ], + }, + { + text: "Utils", + base: "/packages/aa-core/utils", + collapsed: true, + items: [ + { text: "asyncPipe", link: "/asyncPipe" }, + { + text: "convertChainIdToCoinType", + link: "/convertChainIdToCoinType", + }, + { + text: "convertCoinTypeToChain", + link: "/convertCoinTypeToChain", + }, + { + text: "convertCoinTypeToChainId", + link: "/convertCoinTypeToChainId", + }, + { text: "deepHexlify", link: "/deepHexlify" }, + { text: "defineReadOnly", link: "/defineReadOnly" }, + { text: "getChain", link: "/getChain" }, + { + text: "getDefaultEntryPointAddress", + link: "/getDefaultEntryPointAddress", + }, + { + text: "getDefaultSimpleAccountFactoryAddress", + link: "/getDefaultSimpleAccountFactoryAddress", + }, + { + text: "getUserOperationHash", + link: "/getUserOperationHash", + }, + { text: "resolveProperties", link: "/resolveProperties" }, + { text: "stringToIndex", link: "/stringToIndex" }, + ], + }, + ], +}; diff --git a/site/.vitepress/sidebar/packages/aa-ethers.ts b/site/.vitepress/sidebar/packages/aa-ethers.ts new file mode 100644 index 0000000000..010f991e77 --- /dev/null +++ b/site/.vitepress/sidebar/packages/aa-ethers.ts @@ -0,0 +1,94 @@ +import { DefaultTheme } from "vitepress/types/default-theme"; + +export const aaEthersSidebar: DefaultTheme.SidebarItem = { + text: "aa-ethers", + base: "/packages/aa-ethers", + collapsed: true, + items: [ + { + text: "Getting Started", + link: "/", + }, + { + text: "EthersProviderAdapter", + collapsed: true, + base: "/packages/aa-ethers/provider-adapter", + items: [ + { + text: "Introduction", + link: "/introduction", + }, + { + text: "constructor", + link: "/constructor", + }, + { + text: "send", + link: "/send", + }, + { + text: "connectToAccount", + link: "/connectToAccount", + }, + { + text: "getBundlerClient", + link: "/getBundlerClient", + }, + { + text: "fromEthersProvider", + link: "/fromEthersProvider", + }, + ], + }, + { + text: "AccountSigner", + collapsed: true, + base: "/packages/aa-ethers/account-signer", + items: [ + { + text: "Introduction", + link: "/introduction", + }, + { + text: "getAddress", + link: "/getAddress", + }, + { + text: "signMessage", + link: "/signMessage", + }, + { + text: "sendTransaction", + link: "/sendTransaction", + }, + { + text: "getBundlerClient", + link: "/getBundlerClient", + }, + { + text: "connect", + link: "/connect", + }, + ], + }, + { + text: "Utils", + collapsed: true, + base: "/packages/aa-ethers/utils", + items: [ + { + text: "Introduction", + link: "/introduction", + }, + { + text: "convertWalletToAccountSigner", + link: "/convertWalletToAccountSigner", + }, + { + text: "convertEthersSignerToAccountSigner", + link: "/convertEthersSignerToAccountSigner", + }, + ], + }, + ], +}; diff --git a/site/.vitepress/sidebar/packages/aa-signers.ts b/site/.vitepress/sidebar/packages/aa-signers.ts new file mode 100644 index 0000000000..c8f1a5df15 --- /dev/null +++ b/site/.vitepress/sidebar/packages/aa-signers.ts @@ -0,0 +1,140 @@ +import { DefaultTheme } from "vitepress/types/default-theme"; + +export const aaSignersSidebar: DefaultTheme.SidebarItem = { + text: "aa-signers", + collapsed: true, + base: "/packages/aa-signers", + items: [ + { + text: "Getting Started", + link: "/", + }, + { + text: "Magic Signer", + collapsed: true, + base: "/packages/aa-signers/magic", + items: [ + { text: "Introduction", link: "/introduction" }, + { text: "constructor", link: "/constructor" }, + { text: "authenticate", link: "/authenticate" }, + { text: "getAddress", link: "/getAddress" }, + { text: "signMessage", link: "/signMessage" }, + { text: "signTypedData", link: "/signTypedData" }, + { text: "getAuthDetails", link: "/getAuthDetails" }, + ], + }, + { + text: "Web3Auth Signer", + collapsed: true, + base: "/packages/aa-signers/web3auth", + items: [ + { text: "Introduction", link: "/introduction" }, + { text: "constructor", link: "/constructor" }, + { text: "authenticate", link: "/authenticate" }, + { text: "getAddress", link: "/getAddress" }, + { text: "signMessage", link: "/signMessage" }, + { text: "signTypedData", link: "/signTypedData" }, + { text: "getAuthDetails", link: "/getAuthDetails" }, + ], + }, + { + text: "Turnkey Signer", + collapsed: true, + base: "/packages/aa-signers/turnkey", + items: [ + { text: "Introduction", link: "/introduction" }, + { text: "constructor", link: "/constructor" }, + { text: "authenticate", link: "/authenticate" }, + { text: "getAddress", link: "/getAddress" }, + { text: "signMessage", link: "/signMessage" }, + { text: "signTypedData", link: "/signTypedData" }, + { text: "getAuthDetails", link: "/getAuthDetails" }, + ], + }, + { + text: "Fireblocks Signer", + collapsed: true, + base: "/packages/aa-signers/fireblocks", + items: [ + { text: "Introduction", link: "/introduction" }, + { text: "constructor", link: "/constructor" }, + { text: "authenticate", link: "/authenticate" }, + { text: "getAddress", link: "/getAddress" }, + { text: "signMessage", link: "/signMessage" }, + { text: "signTypedData", link: "/signTypedData" }, + { text: "getAuthDetails", link: "/getAuthDetails" }, + ], + }, + { + text: "Capsule Signer", + collapsed: true, + base: "/packages/aa-signers/capsule", + items: [ + { text: "Introduction", link: "/introduction" }, + { text: "constructor", link: "/constructor" }, + { text: "authenticate", link: "/authenticate" }, + { text: "getAddress", link: "/getAddress" }, + { text: "signMessage", link: "/signMessage" }, + { text: "signTypedData", link: "/signTypedData" }, + { text: "getAuthDetails", link: "/getAuthDetails" }, + ], + }, + { + text: "Particle Signer", + collapsed: true, + base: "/packages/aa-signers/particle", + items: [ + { text: "Introduction", link: "/introduction" }, + { text: "constructor", link: "/constructor" }, + { text: "authenticate", link: "/authenticate" }, + { text: "getAddress", link: "/getAddress" }, + { text: "signMessage", link: "/signMessage" }, + { text: "signTypedData", link: "/signTypedData" }, + { text: "getAuthDetails", link: "/getAuthDetails" }, + ], + }, + { + text: "Portal Signer", + collapsed: true, + base: "/packages/aa-signers/portal", + items: [ + { text: "Introduction", link: "/introduction" }, + { text: "constructor", link: "/constructor" }, + { text: "authenticate", link: "/authenticate" }, + { text: "getAddress", link: "/getAddress" }, + { text: "signMessage", link: "/signMessage" }, + { text: "signTypedData", link: "/signTypedData" }, + { text: "getAuthDetails", link: "/getAuthDetails" }, + ], + }, + { + text: "Arcana Auth Signer", + collapsed: true, + base: "/packages/aa-signers/arcana-auth", + items: [ + { text: "Introduction", link: "/introduction" }, + { text: "constructor", link: "/constructor" }, + { text: "authenticate", link: "/authenticate" }, + { text: "getAddress", link: "/getAddress" }, + { text: "signMessage", link: "/signMessage" }, + { text: "signTypedData", link: "/signTypedData" }, + { text: "getAuthDetails", link: "/getAuthDetails" }, + ], + }, + { + text: "Lit Signer", + collapsed: true, + base: "/packages/aa-signers/lit-protocol", + items: [ + { text: "Introduction", link: "/introduction" }, + { text: "constructor", link: "/constructor" }, + { text: "authenticate", link: "/authenticate" }, + { text: "getAddress", link: "/getAddress" }, + { text: "signMessage", link: "/signMessage" }, + { text: "signTypedData", link: "/signTypedData" }, + { text: "getAuthDetails", link: "/getAuthDetails" }, + ], + }, + { text: "Contributing", link: "/contributing" }, + ], +}; diff --git a/site/.vitepress/sidebar/packages/index.ts b/site/.vitepress/sidebar/packages/index.ts new file mode 100644 index 0000000000..59a1bad0af --- /dev/null +++ b/site/.vitepress/sidebar/packages/index.ts @@ -0,0 +1,18 @@ +import { DefaultTheme } from "vitepress/types/default-theme"; +import { aaAccountsSidebar } from "./aa-accounts"; +import { aaAlchemySidebar } from "./aa-alchemy"; +import { aaCoreSidebar } from "./aa-core"; +import { aaEthersSidebar } from "./aa-ethers"; +import { aaSignersSidebar } from "./aa-signers"; + +export const packagesSidebar: DefaultTheme.SidebarItem = { + text: "aa-sdk Packages", + base: "/packages", + items: [ + aaCoreSidebar, + aaAlchemySidebar, + aaAccountsSidebar, + aaSignersSidebar, + aaEthersSidebar, + ], +}; diff --git a/site/getting-started.md b/site/getting-started.md deleted file mode 100644 index 858e282742..0000000000 --- a/site/getting-started.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: Getting Started Guide - - - meta - - name: description - content: Learn how to get started with Account Kit, a vertically integrated stack for building apps that support ERC-4337. - - - meta - - property: og:description - content: Learn how to get started with Account Kit, a vertically integrated stack for building apps that support ERC-4337. - - - meta - - name: twitter:title - content: Getting Started Guide - - - meta - - name: twitter:description - content: Learn how to get started with Account Kit, a vertically integrated stack for building apps that support ERC-4337. ---- - -# Getting Started - -This guide will help you get started with Account Kit by setting up your environment, creating a Light Account (a type of smart account implementation), and sending a User Operation from it. By the end of this guide, you'll have a basic understanding of how to use the SDK and where to look for more advanced use cases. - -## Install the Packages - -In your project directory, you'll need to install the required packages: - -::: code-group - -```bash [npm] -npm install @alchemy/aa-alchemy @alchemy/aa-accounts @alchemy/aa-core viem -``` - -```bash [yarn] -yarn add @alchemy/aa-alchemy @alchemy/aa-accounts @alchemy/aa-core viem -``` - -Note that we're installing [viem](https://viem.sh/) as well. Viem contains helpful abstractions and modules that may come in handy when using Account Kit. Additionally, many Account Kit modules leverage viem themselves. - -::: - -## A Simple Light Account Example - -Using the SDK, we'll deploy a Light Account and send a User Operation from it. The Light Account will be owned by an Externally Owned Account (EOA). Here's a demonstration: - -<<< @/snippets/light-account.ts - -This initializes a `provider` for your smart account which is then used to send user operations from it. It also logs the address of the deployed smart account. - -::: tip Note -Remember to: - -1. Replace `"0xYourEOAPrivateKey"` with your actual EOA private key. -2. Set `"ALCHEMY_API_KEY"` with your unique Alchemy API key. -3. Fund your smart account address with some SepoliaETH in order for the user operation to go through. This address is logged to the console when you run the script. -4. Adjust the `target` and `data` fields in the `sendUserOperation` function to match your requirements. - -::: - -## Dive Deeper - -In this guide we initialized `provider` with the `aa-alchemy` package however we could have done the same with the other packages of Account Kit as well. To learn more about the different packages and their use cases, check out the ["Packages Overview"](/overview/package-overview) page. - -## Next Steps - -To learn about the end-to-end process of integrating smart accounts in your applications check out the section on [smart accounts overview](/smart-accounts/overview.html) diff --git a/site/glossary/types.md b/site/glossary/types.md index 32b72edb5e..bcc7660257 100644 --- a/site/glossary/types.md +++ b/site/glossary/types.md @@ -92,9 +92,9 @@ Type representing the various transport protocols supported by the package. This [See Type ↗️](https://github.com/alchemyplatform/aa-sdk/blob/main/packages/core/src/client/types.ts#L19) -## `PublicErc4337Client` +## `BundlerClient` -A client type that extends from the [`Viem` client](https://viem.sh/docs/clients/public.html). It integrates custom actions specific to [ERC-4337](https://accountkit.alchemy.com/glossary/terms.html#erc-4337). The `PublicErc4337Client` is used within the [Alchemy Provider](https://github.com/alchemyplatform/aa-sdk/blob/b0f8dd538728f8a7dd4447da8c88a50179d61f95/packages/alchemy/src/provider/base.ts#L26) as a JSON-RPC transport, supporting standard EVM RPC methods as well as facilitating communication and operations specific to ERC-4337, such as sending `UserOperations` (UOs), estimating gas, and fetching operation receipts and responses. +A client type that extends from the [`Viem` client](https://viem.sh/docs/clients/public.html). It integrates custom actions specific to [ERC-4337](https://accountkit.alchemy.com/glossary/terms.html#erc-4337). The `BundlerClient` is used within the [Alchemy Smart Account Client](https://github.com/alchemyplatform/aa-sdk/blob/b0f8dd538728f8a7dd4447da8c88a50179d61f95/packages/alchemy/src/provider/base.ts#L26) as a JSON-RPC transport, supporting standard EVM RPC methods as well as facilitating communication and operations specific to ERC-4337, such as sending `UserOperations` (UOs), estimating gas, and fetching operation receipts and responses. [See Type ↗️](https://github.com/alchemyplatform/aa-sdk/blob/main/packages/core/src/client/types.ts#L98) diff --git a/site/migration-guide.md b/site/migration-guide.md index 1345cf8585..e7604c10cc 100644 --- a/site/migration-guide.md +++ b/site/migration-guide.md @@ -233,6 +233,10 @@ type toSmartContractAccount = < >; ``` +### Account: SimpleAccount and NaniAccount initialization params + +`chain` and `transport` have been added to the constructor and `rpcClient` has been removed. + ### Signer: `signTypedData` signature change The `signTypedData` method found on `SmartAccountSigner` has been updated to match the signature found on `SmartContractAccount` and viem's `Account`. @@ -247,3 +251,16 @@ signTypedData: < params: TypedDataDefinition ) => Promise; ``` + +### Ethers: Removed methods + +The `with*` methods have been removed from the Provider and Signer classes. +The `connect` methods has been removed in favor of immutable properties on the Provider and Signer classes. See updated AccountSigner constructor below. + +### Ethers: `getPublicErc4337Client` → `getBundlerClient` + +The `getPublicErc4337Client` method has been renamed to `getBundlerClient` to match the naming found in `aa-core`. + +### Ethers: Updated Signer Adapter constructor + +The `AccountSigner` now takes in a `SmartContractAccount` as a param in its constructor. diff --git a/site/overview/faqs.md b/site/overview/faqs.md index e6f297abc7..53bb0c06c0 100644 --- a/site/overview/faqs.md +++ b/site/overview/faqs.md @@ -36,7 +36,7 @@ There are two scenarios where you'd get a different contract address: ### How does a smart account get deployed? ::: details Answer -Your smart account will be deployed when the first `UserOperation` (UO) is sent from the account. The first UO must be sent with a non-zero `initCode`. aa-sdk will handle generation of this `initCode` for you using [`getAccountInitCode`](/packages/aa-core/accounts/required/getAccountInitCode.html). +Your smart account will be deployed when the first `UserOperation` (UO) is sent from the account. The first UO must be sent with a non-zero `initCode`. aa-sdk will handle generation of this `initCode` for you using [`getAccountInitCode`](/packages/aa-core/accounts/). ::: ### How would Alchemy initiate an upgrade of a Light Account? @@ -48,7 +48,7 @@ It is unlikely we will frequently update the Light Account contract itself, howe ### Can I have multiple accounts for the same owner address? / How do I set the value of the salt/index for Light Account? ::: details Answer -Yes! The optional index value (salt) on Light Account enables the ability to have multiple accounts for the same owner address. This value defaults to 0. You can set it in the [constructor](/packages/aa-accounts/light-account/constructor.html#params-simplesmartaccountparams). +Yes! The optional index value (salt) on Light Account enables the ability to have multiple accounts for the same owner address. This value defaults to 0. You can set it when you create [light account](/packages/aa-accounts/light-account/). ::: ## Submitting `UserOperation`s @@ -64,9 +64,9 @@ If the `UserOperation` (meta-transaction for 4337 accounts) is correctly priced ::: details Answer This can happen when `UserOperation`s (UOs) become underpriced, frequently due to fee market movement between when gas and fees are estimations and when the UO is actually submitted. -You may experience this when calling the [`waitForUserOperationTransaction`](/packages/aa-core/provider/waitForUserOperationTransaction.html#waitForUserOperationTransaction) method. It may throw an error if it does not find the UO in a mined Transaction within its retry limits. +You may experience this when calling the [`waitForUserOperationTransaction`](/packages/aa-core/smart-account-client/actions/waitForUserOperationTransaction.html#waitForUserOperationTransaction) method. It may throw an error if it does not find the UO in a mined Transaction within its retry limits. -You can mitigate this by defining a more flexible retry period when constructing a [`Provider`](/packages/aa-core/provider/constructor.html#constructor) (i.e. `txMaxRetries`, `txRetryIntervalMs`, `txRetryMultiplier` in `opts`). If your UO continues to be delayed beyond a limit you are willing to wait, you can resubmit it using [`dropAndReplaceUserOperation`](/packages/aa-core/provider/dropAndReplaceUserOperation.html#dropandreplaceuseroperation). +You can mitigate this by defining a more flexible retry period when constructing a [`Client`](/packages/aa-core/smart-account-client/index.html#usage) (i.e. `txMaxRetries`, `txRetryIntervalMs`, `txRetryMultiplier` in `opts`). If your UO continues to be delayed beyond a limit you are willing to wait, you can resubmit it using [`dropAndReplaceUserOperation`](/packages/aa-core/smart-account-client/actions/dropAndReplaceUserOperation.html#dropandreplaceuseroperation). ::: ### Are `UserOperation`s protected from MEV bots? @@ -86,7 +86,7 @@ Yes! Check out [this guide](/tutorials/sim-user-operation.html). ### How does gas estimation for 4337 smart contract accounts work? ::: details Answer -Our bundler estimates gas and submits `UserOperation`s (UOs) under the hood of the aa-sdk. Our gas estimations are just that, estimations that optimize for UOs landing on chain, and you may need to adjust gas limits based on your needs using [overrides](/packages/aa-core/provider/types/userOperationOverrides.html). +Our bundler estimates gas and submits `UserOperation`s (UOs) under the hood of the aa-sdk. Our gas estimations are just that, estimations that optimize for UOs landing on chain, and you may need to adjust gas limits based on your needs using [overrides](/packages/aa-core/smart-account-client/types/userOperationOverrides.html). Learn more about gas estimation and how it is implemented in our [Bundler](https://www.alchemy.com/blog/erc-4337-gas-estimation). @@ -142,7 +142,7 @@ Precheck failed errors are often related to gas and/or fees. Our Bundler follows These errors are often related to market movement between the time when gas and fees are estimated and the time when UOs are submitted to the bundler. This fluctuation in the market is especially variant on testnet. To ensure your UO is included in a block, we currently reject sending any UOs that are underpriced compared to the network rate . -To handle these errors, we recommend you use our [override fields](/packages/aa-core/provider/types/userOperationOverrides) to increase buffers on top of our estimates and implement retry mechanisms as needed. +To handle these errors, we recommend you use our [override fields](/packages/aa-core/smart-account-client/types/userOperationOverrides) to increase buffers on top of our estimates and implement retry mechanisms as needed. Our gas and fee estimations are just that, estimations, but we are always working to improve these estimates! ::: @@ -156,9 +156,9 @@ Currently our Bundler allows max 10M gas in aggregate between `preVerificationGa ### `waitForUserOperationTransaction` timeout ::: details Answer -[`waitForUserOperationTransaction`](/packages/aa-core/provider/waitForUserOperationTransaction) may throw this error if it does not find the mined User Operation within its retry limits. +[`waitForUserOperationTransaction`](/packages/aa-core/smart-account-client/actions/waitForUserOperationTransaction) may throw this error if it does not find the mined User Operation within its retry limits. -You can mitigate this by defining a more flexible retry period when constructing a [`Provider`](/packages/aa-core/provider/constructor.html#constructor) (i.e. `txMaxRetries`, `txRetryIntervalMs`, `txRetryMultiplier` in `opts`). +You can mitigate this by defining a more flexible retry period when constructing a [`Client`](/packages/aa-core/smart-account-client/index.html#usage) (i.e. `txMaxRetries`, `txRetryIntervalMs`, `txRetryMultiplier` in `opts`). -If your `UserOperation` continues to be delayed beyond a limit you are willing to wait, you can resubmit the user operation using [`dropAndReplaceUserOperation`](/packages/aa-core/provider/dropAndReplaceUserOperation.html#dropandreplaceuseroperation). +If your `UserOperation` continues to be delayed beyond a limit you are willing to wait, you can resubmit the user operation using [`dropAndReplaceUserOperation`](/packages/aa-core/smart-account-client/actions/dropAndReplaceUserOperation.html#usage). ::: diff --git a/site/packages/aa-accounts/contributing.md b/site/packages/aa-accounts/contributing.md index 368bb2c17d..8758f64294 100644 --- a/site/packages/aa-accounts/contributing.md +++ b/site/packages/aa-accounts/contributing.md @@ -19,7 +19,7 @@ next: If you are looking to add a new account type, please follow the following structure. 1. Create a new folder in `src` with the name of your account type in `kebab-case` (we're following kebab casing for files throughout the project). -2. Create a new file in the folder you just created called `account.ts` and add your implementation for `BaseSmartContractAccount` +2. Create a new file in the folder you just created called `account.ts` and add a method that calls `toSmartContractAccount` to return an instance of your account 3. If needed, create a sub-folder in your account folder called `abis` and add your abis as `.ts` files. eg: ```ts @@ -28,11 +28,7 @@ export const MyContractAbi = [ ] as const; // the as const is important so we can get correct typing from viem ``` -4. If you need to extend the `SmartAccountProvider` class, add a file called `provider.ts` and add your implementation for `SmartAccountProvider`. - - - Ideally, your `Account` impl should _just_ work with the base provider provided by `aa-core`. - - If not, consider generalizing the use case and updating SmartAccountProvider - -5. Add some tests for your account and provider (if created) by creating a subfolder in your `account/my-account` called `__tests__` and make sure your files end with the `.test.ts` suffix +4. If you want, you can create a client creation method that return a `SmartAccountClient` instance with your account attached to it +5. Add some tests for your account and client (if created) by creating a subfolder in your `account/my-account` called `__tests__` and make sure your files end with the `.test.ts` suffix 6. Export the classes and types you've defined in `src/index.ts` 7. Open a PR and we'll review it as soon as possible! diff --git a/site/packages/aa-accounts/light-account/actions/transferOwnership.md b/site/packages/aa-accounts/light-account/actions/transferOwnership.md new file mode 100644 index 0000000000..197463db9f --- /dev/null +++ b/site/packages/aa-accounts/light-account/actions/transferOwnership.md @@ -0,0 +1,52 @@ +--- +outline: deep +head: + - - meta + - property: og:title + content: LightSmartContractAccount • transferOwnership + - - meta + - name: description + content: Overview of the transferOwnership method on LightSmartContractAccount + - - meta + - property: og:description + content: Overview of the transferOwnership method on LightSmartContractAccount +next: + text: Utils +--- + +# transferLightAccountOwnership + +`transferLightAccountOwnership` is an action exported by `@alchemy/aa-accounts` which sends a UO that transfers ownership of the account to a new owner, and returns either the UO hash or transaction hash. + +## Usage + +::: code-group + +```ts [example.ts] +import { smartAccountClient } from "./provider"; +import { transferLightAccountOwnership } from "@alchemy/aa-accounts"; +// [!code focus:99] +// transfer ownership +const newOwner = LocalAccountSigner.mnemonicToAccountSigner(NEW_OWNER_MNEMONIC); +const smartAccountClient = await transferLightAccountOwnership(provider, { + newOwner, + waitForTxn: true, // wait for txn with UO to be mined +}); +``` + +<<< @/snippets/smartAccountClient.ts +::: + +## Returns + +### `Promise<0x${string}>` + +A Promise containing the hash of either the UO or transaction containing the UO which transferred ownership of the smart account's owner. + +## Parameters + +- `client: SmartAccountClient` -- the provider to use to send the transaction +- `options: TransferLightAccountOwnershipParams` -- the options to use to transfer ownership + - `newOwner: Address` -- the new owner of the account + - `waitForTxn?: boolean` -- optionally, wait for the transaction to be mined with the UO + - `account?: LightAccount` -- optionally, pass the account if your client is not connected to it diff --git a/site/packages/aa-accounts/light-account/provider.md b/site/packages/aa-accounts/light-account/client.md similarity index 67% rename from site/packages/aa-accounts/light-account/provider.md rename to site/packages/aa-accounts/light-account/client.md index 8b6ee19f68..c40299da8f 100644 --- a/site/packages/aa-accounts/light-account/provider.md +++ b/site/packages/aa-accounts/light-account/client.md @@ -3,37 +3,37 @@ outline: deep head: - - meta - property: og:title - content: LightSmartContractAccount • createLightAccountProvider + content: LightSmartContractAccount • createLightAccountClient - - meta - name: description - content: Overview of the createLightAccountProvider factory in aa-accounts + content: Overview of the createLightAccountClient factory in aa-accounts - - meta - property: og:description - content: Overview of the createLightAccountProvider factory in aa-accounts + content: Overview of the createLightAccountClient factory in aa-accounts --- -# createLightAccountProvider +# createLightAccountClient -`createLightAccountProvider` is a factory that improves the developer experience of connecting a Light Account to a `SmartAccountProvider`. You can use this to directly instantiate a `SmartAccountProvider` already connected to a Light Account in one line of code. +`createLightAccountClient` is a factory that improves the developer experience of connecting a Light Account to a `SmartAccountClient`. You can use this to directly instantiate a `SmartAccountClient` already connected to a Light Account in one line of code. ## Usage ::: code-group -<<< @/snippets/light-account-provider.ts +<<< @/snippets/smartAccountClient.ts ::: ## Returns -### `Promise` +### `Promise` -A Promise containing a new `SmartAccountProvider` connected to a Light Account. +A Promise containing a new `SmartAccountClient` connected to a Light Account. ## Parameters -### `config: LightAccountProviderConfig` +### `config: CreateLightAccountClientParams` -- `rpcProvider: string | PublicErc4337Client` -- a JSON-RPC URL, or a viem Client that supports ERC-4337 methods and Viem public actions. See [createPublicErc4337Client](/packages/aa-core/client/createPublicErc4337Client.md). +- `transport: Transport` -- a Viem transport for interacting with JSON RPC methods. - `chain: Chain` -- the chain on which to create the provider. @@ -49,8 +49,8 @@ A Promise containing a new `SmartAccountProvider` connected to a Light Account. - `txRetryMulitplier: string | undefined` -- [optional] the mulitplier on interval length to wait between retries while waiting for transaction receipts (default: 1.5). - - `feeOptions:` [`UserOperationFeeOptions`](/packages/aa-core/provider/types/userOperationFeeOptions.md) `| undefined` --[optional] user operation fee options to be used for gas estimation, set at the global level on the provider. - If not set, default fee options for the chain are used. Available fields in `feeOptions` include `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` where each field is of type [`UserOperationFeeOptionsField`](/packages/aa-core/provider/types/userOperationFeeOptionsField.md). + - `feeOptions:` [`UserOperationFeeOptions`](/packages/aa-core/smart-account-client/types/userOperationFeeOptions.md) `| undefined` --[optional] user operation fee options to be used for gas estimation, set at the global level on the provider. + If not set, default fee options for the chain are used. Available fields in `feeOptions` include `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` where each field is of type [`UserOperationFeeOptionsField`](/packages/aa-core/smart-account-client/types/userOperationFeeOptionsField.md). - `maxFeePerGas`: `UserOperationFeeOptionsField` - `maxPriorityFeePerGas`: `UserOperationFeeOptionsField` @@ -63,3 +63,5 @@ A Promise containing a new `SmartAccountProvider` connected to a Light Account. - `initCode: Hex | undefined` -- [optional] the initCode for deploying the smart account with which the provider will connect. - `accountAddress: Address | undefined` -- [optional] a smart account address override that this object will manage instead of generating its own. + +- `...clientParams` -- [optional] additional parameters to pass to the [`SmartAccountClient`](/packages/aa-core/smart-account-client/) constructor. diff --git a/site/packages/aa-accounts/light-account/constructor.md b/site/packages/aa-accounts/light-account/constructor.md deleted file mode 100644 index 2006f167a5..0000000000 --- a/site/packages/aa-accounts/light-account/constructor.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: LightSmartContractAccount • constructor - - - meta - - name: description - content: Overview of the constructor method on LightSmartContractAccount in aa-accounts - - - meta - - property: og:description - content: Overview of the constructor method on LightSmartContractAccount in aa-accounts ---- - -# constructor - -To initialize a `LightSmartContractAccount`, you must provide a set of parameters detailed below. - -Note that there is no difference in constructor arguments used for `LightSmartContractAccount` when compared to `SimpleSmartContractAccount`. - -## Usage - -::: code-group - -```ts [example.ts] -import { AlchemyProvider } from "@alchemy/aa-alchemy"; -import { - LightSmartContractAccount, - getDefaultLightAccountFactoryAddress, -} from "@alchemy/aa-accounts"; -import { - LocalAccountSigner, - getDefaultEntryPointAddress, - type SmartAccountSigner, -} from "@alchemy/aa-core"; -import { sepolia } from "@alchemy/aa-core"; - -const PRIVATE_KEY = "0xYourEOAPrivateKey"; -const eoaSigner: SmartAccountSigner = - LocalAccountSigner.privateKeyToAccountSigner(`0x${PRIVATE_KEY}`); - -// instantiates using every possible parameter, as a reference -export const account = new LightSmartContractAccount({ - rpcClient: "ALCHEMY_RPC_URL", - chain: sepolia, - factoryAddress: getDefaultLightAccountFactoryAddress(sepolia), - owner: eoaSigner, - entryPointAddress: getDefaultEntryPointAddress(sepolia), - accountAddress: "0xYourSmartAccountAddress", - index: 0n, -}); -``` - -::: - -## Returns - -### `LightSmartContractAccount` - -A new instance of a `LightSmartContractAccount`. - -## Parameters - -### `params: SimpleSmartAccountParams` - -- `rpcClient: string | PublicErc4337Client` -- a JSON-RPC URL, or a viem Client that supports ERC-4337 methods and Viem public actions. See [createPublicErc4337Client](/packages/aa-core/client/createPublicErc4337Client.md). - -- `chain: Chain` -- the chain on which to create the provider. - -- `factoryAddress: Address` -- the factory address for the smart account implementation, which is required for creating the account if not already deployed. - -- `owner: SmartAccountSigner` -- the owner EOA address responsible for signing user operations on behalf of the smart account. - -- `entryPointAddress: Address | undefined` -- [optional] entry point contract address. If not provided, the entry point contract address for the provider is the connected account's entry point contract, or if not connected, falls back to the default entry point contract for the chain. See [getDefaultEntryPointAddress](/packages/aa-core/utils/getDefaultEntryPointAddress.html#getdefaultentrypointaddress). - -- `accountAddress: Address | undefined` -- [optional] a smart account address override that this object will manage instead of generating its own. - -- `index: bigint | undefined` -- [optional] additional salt value used when creating the smart account. diff --git a/site/packages/aa-accounts/light-account/encodeTransferOwnership.md b/site/packages/aa-accounts/light-account/encodeTransferOwnership.md index 3b144904d1..4713c6febd 100644 --- a/site/packages/aa-accounts/light-account/encodeTransferOwnership.md +++ b/site/packages/aa-accounts/light-account/encodeTransferOwnership.md @@ -21,15 +21,15 @@ head: ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] // encode transfer pownership const newOwner = LocalAccountSigner.mnemonicToAccountSigner(NEW_OWNER_MNEMONIC); const encodedTransferOwnershipData = - LightSmartContractAccount.encodeTransferOwnership(newOwner); + smartAccountClient.account.encodeTransferOwnership({ newOwner }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: ## Returns diff --git a/site/packages/aa-accounts/light-account/getOwnerAddress.md b/site/packages/aa-accounts/light-account/getOwnerAddress.md index 3e1f28e239..becb4eac31 100644 --- a/site/packages/aa-accounts/light-account/getOwnerAddress.md +++ b/site/packages/aa-accounts/light-account/getOwnerAddress.md @@ -21,13 +21,13 @@ head: ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] // get owner -const owner = await provider.account.getOwnerAddress(); +const owner = await smartAccountClient.account.getOwnerAddress(); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: ## Returns diff --git a/site/packages/aa-accounts/light-account/introduction.md b/site/packages/aa-accounts/light-account/index.md similarity index 57% rename from site/packages/aa-accounts/light-account/introduction.md rename to site/packages/aa-accounts/light-account/index.md index 7d326166c6..7dc44dab87 100644 --- a/site/packages/aa-accounts/light-account/introduction.md +++ b/site/packages/aa-accounts/light-account/index.md @@ -3,43 +3,45 @@ outline: deep head: - - meta - property: og:title - content: LightSmartContractAccount + content: LightAccount - - meta - name: description - content: Overview of the LightSmartContractAccount class in aa-accounts + content: Overview of the LightAccount class in aa-accounts - - meta - property: og:description - content: Overview of the LightSmartContractAccount class in aa-accounts + content: Overview of the LightAccount class in aa-accounts --- # Light Account -`LightSmartContractAccount` is a simple, secure, and cost-effective smart account implementation which extends `SimpleSmartContractAccount` as an implementation of `BaseSmartContractAccount`. It supports features such as owner transfers, [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) message signing, and batched transactions. We recommend using Light Account for most use cases. +`LightAccount` is a simple, secure, and cost-effective smart account implementation which extends `SmartContractAccount`. It supports features such as owner transfers, [ERC-1271](https://eips.ethereum.org/EIPS/eip-1271) message signing, and batched transactions. We recommend using Light Account for most use cases. -Notable differences between `LightSmartContractAccount` and `SimpleSmartContractAccount` are implementations for: +The additional methods supported by `LightAccount` are: 1. [`signMessageWith6492`](/packages/aa-accounts/light-account/signMessageWith6492) -- supports message signatures for deployed smart accounts, as well as undeployed accounts (counterfactual addresses) using [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). 2. [`signTypedData`](/packages/aa-accounts/light-account/signTypedData) -- supports typed data signatures from the smart account's owner address. 3. [`signTypedDataWith6492`](/packages/aa-accounts/light-account/signTypedDataWith6492) -- supports typed data signatures for deployed smart accounts, as well as undeployed accounts (counterfactual addresses) using ERC-6492. 4. [`getOwnerAddress`](/packages/aa-accounts/light-account/getOwnerAddress) -- returns the on-chain owner address of the account. 5. [`encodeTransferOwnership`](/packages/aa-accounts/light-account/encodeTransferOwnership) -- encodes the transferOwnership function call using Light Account ABI. -6. [`transferOwnership`](/packages/aa-accounts/light-account/transferOwnership) -- transfers ownership of the account to a new owner, and returns either the UO hash or transaction hash. +6. [`transferLightAccountOwnership`](/packages/aa-accounts/light-account/actions/transferOwnership) -- transfers ownership of the account to a new owner, and returns either the UO hash or transaction hash. ## Usage ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; +import { transferLightAccountOwnership } from "@alchemy/aa-accounts"; + // [!code focus:99] // sign message (works for undeployed and deployed accounts) -const signedMessageWith6492 = provider.signMessageWith6492("test"); +const signedMessageWith6492 = smartAccountClient.signMessageWith6492("test"); // sign typed data -const signedTypedData = provider.signTypedData("test"); +const signedTypedData = smartAccountClient.signTypedData("test"); // sign typed data (works for undeployed and deployed accounts), using -const signedTypedDataWith6492 = provider.signTypedDataWith6492({ +const signedTypedDataWith6492 = smartAccountClient.signTypedDataWith6492({ types: { Request: [{ name: "hello", type: "string" }], }, @@ -50,22 +52,19 @@ const signedTypedDataWith6492 = provider.signTypedDataWith6492({ }); // get owner address -const owner = await provider.account.getOwnerAddress(); +const owner = await smartAccountClient.account.getOwnerAddress(); // encode transfer pownership const newOwner = LocalAccountSigner.mnemonicToAccountSigner(NEW_OWNER_MNEMONIC); -const encodedTransferOwnershipData = - LightSmartContractAccount.encodedTransferOwnership(newOwner); // transfer ownership -const result = await LightSmartContractAccount.transferOwnership( - provider, - newOwner - true, // wait for txn with UO to be mined -); +const result = await transferLightAccountOwnership(smartAccountClient, { + newOwner, + waitForTxn: true, // wait for txn with UO to be mined +}); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: ## Developer Links diff --git a/site/packages/aa-accounts/light-account/signMessageWith6492.md b/site/packages/aa-accounts/light-account/signMessageWith6492.md index f0396ee911..2bad4ea66c 100644 --- a/site/packages/aa-accounts/light-account/signMessageWith6492.md +++ b/site/packages/aa-accounts/light-account/signMessageWith6492.md @@ -21,13 +21,15 @@ head: ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] // sign message (works for undeployed and deployed accounts) -const signedMessageWith6492 = provider.signMessageWith6492("test"); +const signedMessageWith6492 = smartAccountClient.signMessageWith6492({ + message: "test", +}); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: ## Returns diff --git a/site/packages/aa-accounts/light-account/signTypedData.md b/site/packages/aa-accounts/light-account/signTypedData.md index 1cf07a9903..36ce9a6b3b 100644 --- a/site/packages/aa-accounts/light-account/signTypedData.md +++ b/site/packages/aa-accounts/light-account/signTypedData.md @@ -21,10 +21,10 @@ head: ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] // sign typed data -const signedTypedData = provider.signTypedData({ +const signedTypedData = smartAccountClient.signTypedData({ domain: { name: "Ether Mail", version: "1", @@ -57,7 +57,7 @@ const signedTypedData = provider.signTypedData({ }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: ## Returns diff --git a/site/packages/aa-accounts/light-account/signTypedDataWith6492.md b/site/packages/aa-accounts/light-account/signTypedDataWith6492.md index 71ad269a0b..b2fa5cbec7 100644 --- a/site/packages/aa-accounts/light-account/signTypedDataWith6492.md +++ b/site/packages/aa-accounts/light-account/signTypedDataWith6492.md @@ -21,10 +21,10 @@ head: ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] // sign typed data (works for undeployed and deployed accounts) -const signedTypedDataWith6492 = provider.signTypedDataWith6492({ +const signedTypedDataWith6492 = smartAccountClient.signTypedDataWith6492({ domain: { name: "Ether Mail", version: "1", @@ -57,7 +57,7 @@ const signedTypedDataWith6492 = provider.signTypedDataWith6492({ }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: ## Returns diff --git a/site/packages/aa-accounts/light-account/transferOwnership.md b/site/packages/aa-accounts/light-account/transferOwnership.md deleted file mode 100644 index a49193d168..0000000000 --- a/site/packages/aa-accounts/light-account/transferOwnership.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: LightSmartContractAccount • transferOwnership - - - meta - - name: description - content: Overview of the transferOwnership method on LightSmartContractAccount - - - meta - - property: og:description - content: Overview of the transferOwnership method on LightSmartContractAccount -next: - text: Utils ---- - -# transferOwnership - -`transferOwnership` is a static class method on the `LightSmartContractAccount` which sends a UO that transfers ownership of the account to a new owner, and returns either the UO hash or transaction hash. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -// transfer ownership -const newOwner = LocalAccountSigner.mnemonicToAccountSigner(NEW_OWNER_MNEMONIC); -const result = await LightSmartContractAccount.transferOwnership( - provider, - newOwner - true, // wait for txn with UO to be mined -); -``` - -<<< @/snippets/provider.ts -::: - -## Returns - -### `Promise<0x${string}>` - -A Promise containing the hash of either the UO or transaction containing the UO which transferred ownership of the smart account's owner. - -## Parameters - -- `provider: SmartAccountProvider & { account: LightSmartContractAccount }` -- the provider to use to send the transaction -- `newOwner: Address` -- the new owner of the account -- `waitForTxn?: boolean` -- optionally, wait for the transaction to be mined with the UO diff --git a/site/packages/aa-alchemy/index.md b/site/packages/aa-alchemy/index.md index 0d79fd21e8..7d480b7faf 100644 --- a/site/packages/aa-alchemy/index.md +++ b/site/packages/aa-alchemy/index.md @@ -19,11 +19,11 @@ next: # `@alchemy/aa-alchemy` -This package contains `AlchemyProvider`, an implementation of `SmartAccountProvider` class defined in `aa-core`. It also contains middleware for accessing the Gas Manager (an [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) Paymaster) and for doing Fee Estimates according to the expectations of the [Rundler](https://github.com/alchemyplatform/rundler/tree/main) (an ERC-4337 Bundler). You may also find the util methods helpful. This repo is community maintained and we welcome contributions! +This package contains the `AlchemySmartAccountClient`, an extension of the `SmartAccountClient` defined in `aa-core`. It also contains middleware for accessing the Gas Manager (an [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337) Paymaster) and for doing Fee Estimates according to the expectations of the [Rundler](https://github.com/alchemyplatform/rundler/tree/main) (an ERC-4337 Bundler). You may also find the util methods helpful. This repo is community maintained and we welcome contributions! ## Getting started -If you are already using the `@alchemy/aa-core` package, you can simply install this package and start using the `AlchemyProvider`. If you are not using `@alchemy/aa-core`, you can install it and follow the instructions in the ["Getting Started"](/overview/getting-started) docs to get started. +If you are already using the `@alchemy/aa-core` package, you can simply install this package and start using the `AlchemySmartAccountClient`. If you are not using `@alchemy/aa-core`, you can install it and follow the instructions in the ["Getting Started"](/overview/getting-started) docs to get started. ::: code-group @@ -41,9 +41,9 @@ pnpm i @alchemy/aa-alchemy ::: -Then, you can create a provider like so: +Then, you can create a client like so: ::: code-group -<<< @/snippets/provider.ts +<<< @/snippets/alchemy-smartAccountClient.ts ::: diff --git a/site/packages/aa-alchemy/provider/light-account-factory.md b/site/packages/aa-alchemy/light-account-client/index.md similarity index 72% rename from site/packages/aa-alchemy/provider/light-account-factory.md rename to site/packages/aa-alchemy/light-account-client/index.md index 37bdf831d3..b706609c86 100644 --- a/site/packages/aa-alchemy/provider/light-account-factory.md +++ b/site/packages/aa-alchemy/light-account-client/index.md @@ -3,31 +3,31 @@ outline: deep head: - - meta - property: og:title - content: AlchemyProvider • createLightAccountAlchemyProvider + content: createLightAccountAlchemyClient - - meta - name: description - content: Overview of the createLightAccountAlchemyProvider factory in aa-alchemy + content: Overview of the createLightAccountAlchemyClient factory in aa-alchemy - - meta - property: og:description - content: Overview of the createLightAccountAlchemyProvider factory in aa-alchemy + content: Overview of the createLightAccountAlchemyClient factory in aa-alchemy --- -# createLightAccountAlchemyProvider +# createLightAccountAlchemyClient -`createLightAccountAlchemyProvider` is a factory that improves the developer experience of connecting a Light Account to an `AlchemyProvider` via an optional dependency on the [`@alchemy/aa-accounts`](https://github.com/alchemyplatform/aa-sdk/tree/development/packages/accounts) package. You can use this to directly instantiate an `AlchemyProvider` already connected to a Light Account in one line of code. +`createLightAccountAlchemyClient` is a factory that improves the developer experience of connecting a Light Account to an `AlchemyProvider` via an optional dependency on the [`@alchemy/aa-accounts`](https://github.com/alchemyplatform/aa-sdk/tree/development/packages/accounts) package. You can use this to directly instantiate an `AlchemySmartAccountClient` already connected to a Light Account in one line of code. ## Usage ::: code-group -<<< @/snippets/light-account-alchemy-provider.ts +<<< @/snippets/light-account-alchemy-client.ts ::: ## Returns -### `Promise` +### `Promise` -A Promise containing a new `AlchemyProvider` connected to a Light Account. +A Promise containing a new `AlchemySmartAccountClient` connected to a Light Account. ## Parameters @@ -53,8 +53,8 @@ A Promise containing a new `AlchemyProvider` connected to a Light Account. - `txRetryMulitplier: string | undefined` -- [optional] the mulitplier on interval length to wait between retries while waiting for transaction receipts (default: 1.5). - - `feeOptions:` [`UserOperationFeeOptions`](/packages/aa-core/provider/types/userOperationFeeOptions.md) `| undefined` --[optional] user operation fee options to be used for gas estimation, set at the global level on the provider. - If not set, default fee options for the chain are used. Available fields in `feeOptions` include `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` where each field is of type [`UserOperationFeeOptionsField`](/packages/aa-core/provider/types/userOperationFeeOptionsField.md). + - `feeOptions:` [`UserOperationFeeOptions`](/packages/aa-core/smart-account-client/types/userOperationFeeOptions.md) `| undefined` --[optional] user operation fee options to be used for gas estimation, set at the global level on the provider. + If not set, default fee options for the chain are used. Available fields in `feeOptions` include `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` where each field is of type [`UserOperationFeeOptionsField`](/packages/aa-core/smart-account-client/types/userOperationFeeOptionsField.md). - `maxFeePerGas`: `UserOperationFeeOptionsField` - `maxPriorityFeePerGas`: `UserOperationFeeOptionsField` diff --git a/site/packages/aa-alchemy/middleware/alchemyFeeEstimator.md b/site/packages/aa-alchemy/middleware/alchemyFeeEstimator.md new file mode 100644 index 0000000000..e072005bd3 --- /dev/null +++ b/site/packages/aa-alchemy/middleware/alchemyFeeEstimator.md @@ -0,0 +1,54 @@ +--- +outline: deep +head: + - - meta + - property: og:title + content: Middleware • alchemyFeeEstimator + - - meta + - name: description + content: Overview of the alchemyFeeEstimator method in aa-alchemy + - - meta + - property: og:description + content: Overview of the alchemyFeeEstimator method in aa-alchemy +--- + +# alchemyFeeEstimator + +`alchemyFeeEstimator` is a middleware method you can use to easily leverage Rundler (an [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) Bundler) for estimating gas fees for user operations. + +## Usage + +::: code-group + +```ts [example.ts] +import { + alchemyFeeEstimator, + createAlchemyRpcClient, +} from "@alchemy/aa-alchemy"; +import { createSmartAccountClient } from "@alchemy/aa-core"; +import { http } from "viem"; +import { sepolia } from "viem/chains"; + +const alchemyClient = createAlchemyRpcClient({ + transport: http("ALCHEMY_RPC_URL"), + chain: sepolia, +}); + +// use Alchemy Gas Fee Estimator to estimate gas fees according to the expectations of Rundler. +const clientWithGasFeeEstimator = createSmartAccountClient({ + ...config, + feeEstimator: alchemyFeeEstimator(alchemyClient), +}); +``` + +::: + +## Returns + +### `ClientMiddlewareFn` + +A `ClientMiddlewareFn` that will estimate fees using the Rundler. + +## Parameters + +### `client: ClientWithAlchemyMethods` -- an `PublicClient` that is connected to Alchemy's RPC diff --git a/site/packages/aa-alchemy/middleware/alchemyGasManagerMiddleware.md b/site/packages/aa-alchemy/middleware/alchemyGasManagerMiddleware.md new file mode 100644 index 0000000000..79daae805e --- /dev/null +++ b/site/packages/aa-alchemy/middleware/alchemyGasManagerMiddleware.md @@ -0,0 +1,63 @@ +--- +outline: deep +head: + - - meta + - property: og:title + content: Middleware • alchemyGasManagerMiddleware + - - meta + - name: description + content: Overview of the alchemyGasManagerMiddleware method in aa-alchemy + - - meta + - property: og:description + content: Overview of the alchemyGasManagerMiddleware method in aa-alchemy +--- + +# alchemyGasManagerMiddleware + +`alchemyGasManagerMiddleware` is a middleware method you can use to easily leverage our Gas Manager (an [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) Paymaster) for sponsoring user operations. + +## Usage + +::: code-group + +```ts [example.ts] +import { + alchemyGasManagerMiddleware, + createAlchemyRpcClient, +} from "@alchemy/aa-alchemy"; +import { createSmartAccountClient } from "@alchemy/aa-core"; +import { http } from "viem"; +import { sepolia } from "viem/chains"; + +const alchemyClient = createAlchemyRpcClient({ + transport: http("ALCHEMY_RPC_URL"), + chain: sepolia, +}); + +// Use this middleware generator to set up your account to use Alchemy's Gas Manager Service +const clientAlchemyGasManager = createSmartAccountClient({ + ...config, + ...alchemyGasManagerMiddleware(alchemyClient, { + policyId: PAYMASTER_POLICY_ID, + }), +}); +``` + +::: + +## Returns + +### `{ feeEstimator: ClientMiddlewareFn, paymasterAndData: ClientMiddlewareFn, dummyPaymasterAndData: ClientMiddlewareFn, gasEstimator: ClientMiddlewareFn }` + +A set of `ClientMiddlewareFn` that will get the paymaster and data fields from Alchemy's Gas Manager, and optionally do gas / fee estimation. + +## Parameters + +### `client: ClientWithAlchemyMethods` -- an `PublicClient` that is connected to Alchemy's RPC + +### `AlchemyGasManagerConfig: AlchemyGasManagerConfig` + +- `policyId: string` -- the Gas Manager policy ID + +- `gasEstimationOptions?: AlchemyGasEstimationOptions` -- optional params for configuring gas estimation during paymaster resolution + - `disableGasEstimation?: boolean` -- if true, then gas estimation will be done locally instead of requesting it from the paymaster endpoint diff --git a/site/packages/aa-alchemy/middleware/alchemyUserOperationSimulator.md b/site/packages/aa-alchemy/middleware/alchemyUserOperationSimulator.md new file mode 100644 index 0000000000..bb21be09d1 --- /dev/null +++ b/site/packages/aa-alchemy/middleware/alchemyUserOperationSimulator.md @@ -0,0 +1,56 @@ +--- +outline: deep +head: + - - meta + - property: og:title + content: Middleware • alchemyUserOperationSimulator + - - meta + - name: description + content: Overview of the alchemyUserOperationSimulator method in aa-alchemy + - - meta + - property: og:description + content: Overview of the alchemyUserOperationSimulator method in aa-alchemy +next: + text: Utils +--- + +# alchemyUserOperationSimulator + +`alchemyUserOperationSimulator` is a middleware method you can use to easily leverage the [`alchemy_simulateUserOperationAssetChanges`](https://docs.alchemy.com/reference/alchemy-simulateuseroperationassetchanges/?a=ak-docs) API to simulate asset changes resulting from user operation. Having this as part of your middleware stack will ensure `UserOperations` that fail simulation do not get sent unnecessarily. + +## Usage + +::: code-group + +```ts [example.ts] +import { + alchemyUserOperationSimulator, + createAlchemyRpcClient, +} from "@alchemy/aa-alchemy"; +import { createSmartAccountClient } from "@alchemy/aa-core"; +import { http } from "viem"; +import { sepolia } from "viem/chains"; + +const alchemyClient = createAlchemyRpcClient({ + transport: http("ALCHEMY_RPC_URL"), + chain: sepolia, +}); + +// use Alchemy to simulate User Ops +const clientWithUserOpSimulator = createSmartAccountClient({ + ...config, + userOperationSimulator: alchemyUserOperationSimulator(alchemyClient), +}); +``` + +::: + +## Returns + +### `ClientMiddlewareFn` + +A `ClientMiddlewareFn` that will simulate a user operation using the Alchemy UserOperation Simulation API. + +## Parameters + +### `client: ClientWithAlchemyMethods` -- an `PublicClient` that is connected to Alchemy's RPC diff --git a/site/packages/aa-alchemy/middleware/introduction.md b/site/packages/aa-alchemy/middleware/introduction.md deleted file mode 100644 index 77391f507a..0000000000 --- a/site/packages/aa-alchemy/middleware/introduction.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: Middleware - - - meta - - name: description - content: Overview of the Middleware methods in aa-alchemy - - - meta - - property: og:description - content: Overview of the Middleware methods in aa-alchemy ---- - -# Middleware - -The `aa-alchemy` package contains middleware you can use to easily leverage our Bundler(Rundler) (an [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) Bundler) and our Gas Manager (an [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) Paymaster). - -Currently, `aa-alchemy` has implementations for: - -1. [`withAlchemyGasFeeEstimator`](/packages/aa-alchemy/middleware/withAlchemyGasFeeEstimator) -- estimates gas fees according to the expectations of the Alchemy Rundler. -2. [`withAlchemyGasManager`](/packages/aa-alchemy/middleware/withAlchemyGasManager) -- adds the Alchemy Gas Manager middleware to the provider. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -import { - withAlchemyGasFeeEstimator, - withAlchemyGasManager, -} from "@alchemy/aa-alchemy"; - -// use Alchemy Gas Fee Estimator to estimate fees according to the expectations of the Alchemy Rundler. -// this is already set on AlchemyProvider, but you can always use the middleware directly to create a new instance. -const providerWithGasFeeEstimator = withAlchemyGasFeeEstimator( - provider, - 50n, - 50n -); - -// use Alchemy Gas Manager to sponsorship transactions -const providerWithGasManager = withAlchemyGasManager( - provider, - { - policyId: PAYMASTER_POLICY_ID, - }, - true // if true, uses `alchemy_requestGasAndPaymasterAndData`, otherwise uses `alchemy_requestPaymasterAndData` -); -``` - -<<< @/snippets/provider.ts -::: diff --git a/site/packages/aa-alchemy/middleware/withAlchemyGasFeeEstimator.md b/site/packages/aa-alchemy/middleware/withAlchemyGasFeeEstimator.md deleted file mode 100644 index 43455da592..0000000000 --- a/site/packages/aa-alchemy/middleware/withAlchemyGasFeeEstimator.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: Middleware • withAlchemyGasFeeEstimator - - - meta - - name: description - content: Overview of the withAlchemyGasFeeEstimator method in aa-alchemy - - - meta - - property: og:description - content: Overview of the withAlchemyGasFeeEstimator method in aa-alchemy ---- - -# withAlchemyGasFeeEstimator - -`withAlchemyGasFeeEstimator` is a middleware method you can use to easily leverage Rundler (an [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) Bundler) for estimating gas fees for user operations. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -import { withAlchemyGasFeeEstimator } from "@alchemy/aa-alchemy"; - -// use Alchemy Gas Fee Estimator to estimate gas fees according to the expectations of Rundler. -// this is already set on AlchemyProvider, but you can always use the middleware directly to create a new instance. -const providerWithGasFeeEstimator = withAlchemyGasFeeEstimator( - provider, - 50n, - 50n -); -``` - -<<< @/snippets/provider.ts -::: - -## Returns - -### `AlchemyProvider` - -A new instance of an `AlchemyProvider` with the same attributes as the input, now with middleware for gas fee estimation. - -## Parameters - -### `provider: AlchemyProvider` -- an `AlchemyProvider` instance - -### `baseFeeBufferPercent: bigint` -- buffer percentage to adjust the `baseFee` of a UO request sent through the provider - -### `maxPriorityFeeBufferPercent: bigint` -- buffer percentage to adjust the `maxPriorityFee` of a UO request sent through the provider diff --git a/site/packages/aa-alchemy/middleware/withAlchemyGasManager.md b/site/packages/aa-alchemy/middleware/withAlchemyGasManager.md deleted file mode 100644 index c1cd3a5d59..0000000000 --- a/site/packages/aa-alchemy/middleware/withAlchemyGasManager.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: Middleware • withAlchemyGasManager - - - meta - - name: description - content: Overview of the withAlchemyGasManager method in aa-alchemy - - - meta - - property: og:description - content: Overview of the withAlchemyGasManager method in aa-alchemy ---- - -# withAlchemyGasManager - -`withAlchemyGasManager` is a middleware method you can use to easily leverage our Gas Manager (an [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) Paymaster) for sponsoring user operations. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -import { withAlchemyGasManager } from "@alchemy/aa-alchemy"; - -// use Gas Manager to sponsorship transactions -const providerWithGasManager = withAlchemyGasManager( - provider, - { - policyId: PAYMASTER_POLICY_ID, - }, - true // If true, uses `alchemy_requestGasAndPaymasterAndData`, otherwise uses `alchemy_requestPaymasterAndData` -); -``` - -<<< @/snippets/provider.ts -::: - -## Returns - -### `AlchemyProvider` - -A new instance of an `AlchemyProvider` with the same attributes as the input, now with middleware for accessing the Gas Manager to sponsor UserOperations. - -## Parameters - -### `provider: AlchemyProvider` -- an `AlchemyProvider` instance - -### `AlchemyGasManagerConfig: AlchemyGasManagerConfig` - -- `policyId: string` -- the Gas Manager policy ID - -### `delegateGasEstimation: boolean` -- a flag to additionally estimate gas as part of requesting paymaster and data diff --git a/site/packages/aa-alchemy/middleware/withAlchemyUserOpSimulation.md b/site/packages/aa-alchemy/middleware/withAlchemyUserOpSimulation.md deleted file mode 100644 index 0a63f79ee8..0000000000 --- a/site/packages/aa-alchemy/middleware/withAlchemyUserOpSimulation.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: Middleware • withAlchemyUserOpSimulation - - - meta - - name: description - content: Overview of the withAlchemyUserOpSimulation method in aa-alchemy - - - meta - - property: og:description - content: Overview of the withAlchemyUserOpSimulation method in aa-alchemy -next: - text: Utils ---- - -# withAlchemyUserOpSimulation - -`withAlchemyUserOpSimulation` is a middleware method you can use to easily leverage the [`alchemy_simulateUserOperationAssetChanges`](https://docs.alchemy.com/reference/alchemy-simulateuseroperationassetchanges/?a=ak-docs) API to simulate asset changes resulting from user operation. Having this as part of your middleware stack will ensure `UserOperations` that fail simulation do not get sent unnecessarily. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -import { withAlchemyUserOpSimulation } from "@alchemy/aa-alchemy"; - -// use Alchemy UserOperation Simulation API to simulate asset changes resulting from user operation -const providerWithUserOpSimulation = withAlchemyUserOpSimulation(provider); -``` - -<<< @/snippets/provider.ts -::: - -## Returns - -### `AlchemyProvider` - -A new instance of an `AlchemyProvider` with the same attributes as the input, now with middleware for accessing the Alchemy `UserOperation` Simulation API to simulate asset changes resulting from UserOperations. - -## Parameters - -### `provider: AlchemyProvider` -- an `AlchemyProvider` instance diff --git a/site/packages/aa-alchemy/provider/gasEstimator.md b/site/packages/aa-alchemy/provider/gasEstimator.md deleted file mode 100644 index 834c295ca3..0000000000 --- a/site/packages/aa-alchemy/provider/gasEstimator.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: AlchemyProvider • gasEstimator - - - meta - - name: description - content: Overview of the gasEstimator method on Alchemy Provider in aa-alchemy - - - meta - - property: og:description - content: Overview of the gasEstimator method on Alchemy Provider in aa-alchemy ---- - -# gasEstimator - -`gasEstimator` is an override of the same middleware on `SmartAccountProvider`. As part of the middleware stack that the `AlchemyProvider` would run on each UO built and sent, this middleware estimates gas using the Rundler (an [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) Bundler), and updates `callGasLimit`, `verificationGasLimit`, and `preVerificationGas` in a UO request with appropriate buffers. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -// building a UO struct will use the overrided `gasEstimator` middleware on AlchemyProvider -const uoStruct = await provider.buildUserOperation({ - target: TO_ADDRESS, - data: ENCODED_DATA, - value: VALUE, // optional -}); -const uoHash = await provider.sendUserOperation(uoStruct); -``` - -<<< @/snippets/provider.ts -::: - -## Returns - -### `Promise>` - -the resulting user operation struct after gas estimation, run as part of a middleware chain when building and sending UserOperations. - -## Parameters - -### `struct: Deferrable` -- the struct containing UserOperation fields, where each field may be asychronously returned from the middleware used to generate its final value. - -Note: You typically will call this method as part of a middleware chain when building and sending UserOperations, so the parameters of `UserOperationStruct` should be generated for you, as long as you pass in the initial parameters needed for [sendUserOperation](/packages/aa-core/provider/sendUserOperation). diff --git a/site/packages/aa-alchemy/provider/introduction.md b/site/packages/aa-alchemy/provider/introduction.md deleted file mode 100644 index efe625c328..0000000000 --- a/site/packages/aa-alchemy/provider/introduction.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: AlchemyProvider - - - meta - - name: description - content: Overview of the AlchemyProvider class in aa-alchemy - - - meta - - property: og:description - content: Overview of the AlchemyProvider class in aa-alchemy ---- - -# AlchemyProvider - -`AlchemyProvider` is an extension of the [`SmartAccountProvider`](/packages/aa-core/provider/introduction) implementation. It's a simpler interface you can use to leverage the Alchemy stack - JSON-RPC requests via API Key or JSON Web Token (JWT), Rundler (an [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) Bundler), and Gas Manager (an [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) Paymaster). - -Notable differences between `AlchemyProvider` and `SmartAccountProvider` are implementations for: - -1. [`gasEstimator`](/packages/aa-core/provider/withGasEstimator.md) -- overrides the base `SmartAccountProvider` gas estimator. -2. [`withAlchemyGasManager`](/packages/aa-alchemy/provider/withAlchemyGasManager.md) -- adds the Alchemy Gas Manager middleware to the provider. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -// building a UO struct will use the overrided `gasEstimator` middleware on AlchemyProvider -const uoStruct = await provider.buildUserOperation({ - target: TO_ADDRESS, - data: ENCODED_DATA, - value: VALUE, // optional -}); -const uoHash = await provider.sendUserOperation(uoStruct); - -// use Gas Manager to sponsorship transactions -const providerWithGasManager = provider.withAlchemyGasManager({ - policyId: PAYMASTER_POLICY_ID, -}); -``` - -<<< @/snippets/provider.ts -::: diff --git a/site/packages/aa-alchemy/provider/withAlchemyEnhancedApis.md b/site/packages/aa-alchemy/provider/withAlchemyEnhancedApis.md deleted file mode 100644 index 0f9f67d01c..0000000000 --- a/site/packages/aa-alchemy/provider/withAlchemyEnhancedApis.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: AlchemyProvider • withAlchemyEnhancedApis - - - meta - - name: description - content: Overview of the withAlchemyEnhancedApis method on Alchemy Provider in aa-alchemy - - - meta - - property: og:description - content: Overview of the withAlchemyEnhancedApis method on Alchemy Provider in aa-alchemy -next: - text: Middleware ---- - -# withAlchemyEnhancedApis - -`withAlchemyEnhancedApis` is a method on `AlchemyProvider` that you can optionally call to create a new provider instance with added methods that access the Alchemy [Enhanced APIs](https://www.alchemy.com/enhanced-apis/?a=ak-docs) via the [Alchemy SDK](https://github.com/alchemyplatform/alchemy-sdk-js). - -:::tip Note -This method requires an optional dependency on the [`alchemy-sdk`](https://github.com/alchemyplatform/alchemy-sdk-js) package, as the input to this method is an Alchemy SDK client. - -The Alchemy SDK client must be configured with the same API key and network as the `AlchemyProvider`. This method validates such at runtime. - -Additionally, since the Alchemy SDK client does not yet support JWT authentication, an `AlchemyProvider` initialized with JWTs cannot use this method. They must be initialized with an API key or RPC URL. -::: - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] - -const alchemy = new Alchemy(); - -// use Alchemy Enhanced APIs -const providerWithEnhancedApis = provider.withAlchemyEnhancedApis(alchemy); -``` - -<<< @/snippets/provider.ts -::: - -## Returns - -### `AlchemyProvider` - -A new instance of an `AlchemyProvider` with the same attributes as the input, now with methods for accessing the Alchemy Enhanced APIs to more efficiently query blockchain data. - -## Parameters - -### `alchemy: Alchemy` -- an initialized Alchemy SDK client diff --git a/site/packages/aa-alchemy/provider/withAlchemyGasManager.md b/site/packages/aa-alchemy/provider/withAlchemyGasManager.md deleted file mode 100644 index c4790115d9..0000000000 --- a/site/packages/aa-alchemy/provider/withAlchemyGasManager.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: AlchemyProvider • withAlchemyGasManager - - - meta - - name: description - content: Overview of the withAlchemyGasManager method on Alchemy Provider in aa-alchemy - - - meta - - property: og:description - content: Overview of the withAlchemyGasManager method on Alchemy Provider in aa-alchemy ---- - -# withAlchemyGasManager - -`withAlchemyGasManager` is a method on `AlchemyProvider` that you can optionally call to create a new provider instance with added middleware leveraging the Alchemy Gas Manager (an [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) Paymaster). Under the hood, this will call the [`withAlchemyGasManager`](/packages/aa-alchemy/middleware/withAlchemyGasManager) middleware. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] - -// use Gas Manager to sponsorship transactions -const providerWithGasManager = provider.withAlchemyGasManager({ - policyId: PAYMASTER_POLICY_ID, -}); -``` - -<<< @/snippets/provider.ts -::: - -## Returns - -### `AlchemyProvider` - -A new instance of an `AlchemyProvider` with the same attributes as the input, now with middleware for accessing the Alchemy Gas Manager to sponsor UserOperations. - -## Parameters - -### `config: AlchemyGasManagerConfig` - -- `policyId: string` -- the Gas Manager policy ID diff --git a/site/packages/aa-alchemy/provider/withAlchemyUserOpSimulation.md b/site/packages/aa-alchemy/provider/withAlchemyUserOpSimulation.md deleted file mode 100644 index a6d929213a..0000000000 --- a/site/packages/aa-alchemy/provider/withAlchemyUserOpSimulation.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: AlchemyProvider • withAlchemyUserOpSimulation - - - meta - - name: description - content: Overview of the withAlchemyUserOpSimulation method on Alchemy Provider in aa-alchemy - - - meta - - property: og:description - content: Overview of the withAlchemyUserOpSimulation method on Alchemy Provider in aa-alchemy ---- - -# withAlchemyUserOpSimulation - -`withAlchemyUserOpSimulation` is a method on `AlchemyProvider` that you can optionally call to create a new provider instance with added middleware leveraging the Alchemy `UserOperation` (UO) Simulation API. Under the hood, this will call the [`withAlchemyUserOpSimulation`](/packages/aa-alchemy/middleware/withAlchemyUserOpSimulation) middleware to simulate asset changes resulting from user operation. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] - -// use Alchemy UserOperation Simulation API to simulate simulate asset changes resulting from user operation before sending -const providerWithGasManager = provider.withAlchemyUserOpSimulation(); -``` - -<<< @/snippets/provider.ts -::: - -## Returns - -### `AlchemyProvider` - -A new instance of an `AlchemyProvider` with the same attributes as the input, now with middleware for accessing the Alchemy UO Simulation API to simulate asset changes resulting from user operation. diff --git a/site/packages/aa-alchemy/smart-account-client/actions/alchemyEnhancedApiActions.md b/site/packages/aa-alchemy/smart-account-client/actions/alchemyEnhancedApiActions.md new file mode 100644 index 0000000000..7b21a0a59e --- /dev/null +++ b/site/packages/aa-alchemy/smart-account-client/actions/alchemyEnhancedApiActions.md @@ -0,0 +1,57 @@ +--- +outline: deep +head: + - - meta + - property: og:title + content: alchemyEnhancedApiActions + - - meta + - name: description + content: Overview of the alchemyEnhancedApiActions method on Alchemy Smart Account Client in aa-alchemy + - - meta + - property: og:description + content: Overview of the alchemyEnhancedApiActions method on Alchemy Smart Account Client in aa-alchemy +next: + text: Middleware +--- + +# alchemyEnhancedApiActions + +`alchemyEnhancedApiActions` is a decorator that can be used with a `AlchemySmartAccountClient` that will extend the client with methods that access the Alchemy [Enhanced APIs](https://www.alchemy.com/enhanced-apis/?a=ak-docs) via the [Alchemy SDK](https://github.com/alchemyplatform/alchemy-sdk-js). + +:::tip Note +This method requires an optional dependency on the [`alchemy-sdk`](https://github.com/alchemyplatform/alchemy-sdk-js) package, as the input to this method is an Alchemy SDK client. + +The Alchemy SDK client must be configured with the same API key and network as the `AlchemySmartAccountClient`. This method validates such at runtime. + +Additionally, since the Alchemy SDK client does not yet support JWT authentication, an `AlchemySmartAccountClient` initialized with JWTs cannot use this method. They must be initialized with an API key or RPC URL. +::: + +## Usage + +::: code-group + +```ts [example.ts] +import { smartAccountClient } from "./alchemy-smartAccountClient"; +import { alchemyEnhancedApiActions } from "@alchemy/aa-alchemy"; +// [!code focus:99] + +const alchemy = new Alchemy(); + +// use Alchemy Enhanced APIs +const providerWithEnhancedApis = smartAccountClient.extend( + alchemyEnhancedApiActions +); +``` + +<<< @/snippets/alchemy-smartAccountClient.ts +::: + +## Returns + +### `AlchemySmartAccountClient` + +A new instance of an `AlchemySmartAccountClient` with the same attributes as the input, now with methods for accessing the Alchemy Enhanced APIs to more efficiently query blockchain data. + +## Parameters + +### `alchemy: Alchemy` -- an initialized Alchemy SDK client diff --git a/site/packages/aa-alchemy/provider/simulateUserOperationAssetChanges.md b/site/packages/aa-alchemy/smart-account-client/actions/simulateUserOperation.md similarity index 59% rename from site/packages/aa-alchemy/provider/simulateUserOperationAssetChanges.md rename to site/packages/aa-alchemy/smart-account-client/actions/simulateUserOperation.md index f430b82bb2..26876dfe2e 100644 --- a/site/packages/aa-alchemy/provider/simulateUserOperationAssetChanges.md +++ b/site/packages/aa-alchemy/smart-account-client/actions/simulateUserOperation.md @@ -3,25 +3,25 @@ outline: deep head: - - meta - property: og:title - content: AlchemyProvider • simulateUserOperationAssetChanges + content: AlchemyProvider • simulateUserOperation - - meta - name: description - content: Overview of the simulateUserOperationAssetChanges method on Alchemy Provider in aa-alchemy + content: Overview of the simulateUserOperation method on Alchemy Smart Account Client in aa-alchemy - - meta - property: og:description - content: Overview of the simulateUserOperationAssetChanges method on Alchemy Provider in aa-alchemy + content: Overview of the simulateUserOperation method on Alchemy Smart Account Client in aa-alchemy --- -# simulateUserOperationAssetChanges +# simulateUserOperation -`simulateUserOperationAssetChanges` is a method you can use to easily leverage the [`alchemy_simulateUserOperationAssetChanges`](https://docs.alchemy.com/reference/alchemy-simulateuseroperationassetchanges/?a=ak-docs) API to simulate asset changes resulting from user operation. +`simulateUserOperation` is a method you can use to easily leverage the [`alchemy_simulateUserOperationAssetChanges`](https://docs.alchemy.com/reference/alchemy-simulateuseroperationassetchanges/?a=ak-docs) API to simulate asset changes resulting from user operation. ## Usage ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./alchemy-smartAccountClient"; // [!code focus:99] const uoStruct: UserOperationCallData = { @@ -30,16 +30,18 @@ const uoStruct: UserOperationCallData = { value: 1n, }; -const uoSimResult = await provider.simulateUserOperationAssetChanges(uoStruct); +const uoSimResult = await smartAccountClient.simulateUserOperationAssetChanges({ + uo: uoStruct, +}); if (uoSimResult.error) { console.error(uoSimResult.error.message); } -const uo = await provider.sendUserOperation(uoStruct); +const uo = await smartAccountClient.sendUserOperation({ uo: uoStruct }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/light-account-alchemy-client.ts ::: ## Returns @@ -70,6 +72,6 @@ const uo = await provider.sendUserOperation(uoStruct); - `data: Hex` - can be either `0x` or a call data string - `value?: bigint` - optionally, set the value in wei you want to send to the target -### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/provider/types/userOperationOverrides.md) +### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/smart-account-client/types/userOperationOverrides.md) Optional parameter where you can specify override values for `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` or `paymasterAndData` on the user operation request diff --git a/site/packages/aa-alchemy/provider/constructor.md b/site/packages/aa-alchemy/smart-account-client/index.md similarity index 53% rename from site/packages/aa-alchemy/provider/constructor.md rename to site/packages/aa-alchemy/smart-account-client/index.md index f9ed698b53..49852f88ba 100644 --- a/site/packages/aa-alchemy/provider/constructor.md +++ b/site/packages/aa-alchemy/smart-account-client/index.md @@ -3,18 +3,18 @@ outline: deep head: - - meta - property: og:title - content: AlchemyProvider • constructor + content: Alchemy Smart Account Client - - meta - name: description - content: Overview of the constructor method on AlchemyProvider in aa-alchemy + content: Overview of the Alchemy Smart Account Client in aa-alchemy - - meta - property: og:description - content: Overview of the constructor method on AlchemyProvider in aa-alchemy + content: Overview of the Alchemy Smart Account Client in aa-alchemy --- -# constructor +# Alchemy Smart Account Client -To initialize an `AlchemyProvider`, you must provide a set of parameters detailed below. +To create an `AlchemySmartAccountClient`, you must provide a set of parameters detailed below. ## Usage @@ -26,20 +26,27 @@ import { getDefaultEntryPointAddress } from "@alchemy/aa-core"; import { sepolia } from "@alchemy/aa-core"; // instantiates using every possible parameter, as a reference -export const provider = new AlchemyProvider({ +export const provider = createAlchemySmartAccountClient({ + /// REQUIRED /// apiKey: "ALCHEMY_API_KEY", // replace with your Alchemy API Key chain: sepolia, - entryPointAddress: getDefaultEntryPointAddress(sepolia), + /// OPTIONAL /// opts: { txMaxRetries: 10, txRetryIntervalMs: 2_000, txRetryMulitplier: 1.5, minPriorityFeePerBid: 100_000_000n, + feeOpts: { + baseFeeBufferPercent: 50n, + maxPriorityFeeBufferPercent: 5n, + preVerificationGasBufferPercent: 5n, + }, }, - feeOpts: { - baseFeeBufferPercent: 50n, - maxPriorityFeeBufferPercent: 5n, - preVerificationGasBufferPercent: 5n, + // will simulate user operations before sending them to ensure they don't revert + useSimulation: true, + // if you want to use alchemy's gas manager + gasManagerConfig: { + policyId: "policy-id", }, }); ``` @@ -48,9 +55,9 @@ export const provider = new AlchemyProvider({ ## Returns -### `AlchemyProvider` +### `AlchemySmartAccountClient` -A new instance of an `AlchemyProvider`. +A new instance of an `AlchemySmartAccountClient`. ## Parameters @@ -64,7 +71,11 @@ A new instance of an `AlchemyProvider`. - `chain: Chain` -- the chain on which to create the provider. -- `entryPointAddress: Address | undefined` -- [optional] the entry point contract address. If not provided, the entry point contract address for the provider is the connected account's entry point contract, or if not connected, falls back to the default entry point contract for the chain. See [getDefaultEntryPointAddress](/packages/aa-core/utils/getDefaultEntryPointAddress.html#getdefaultentrypointaddress). +- `useSimulation?: boolean` -- whether or not to simulate user operations before sending them to ensure they don't revert. + +- `gasManagerConfig?: GasManagerConfig` -- if you want to use alchemy's gas manager. + + - `policyId: string` -- the policy id of the gas manager you want to use. - `opts: SmartAccountProviderOpts | undefined` -- [optional] overrides on provider config variables having to do with fetching transaction receipts and fee computation. @@ -74,19 +85,11 @@ A new instance of an `AlchemyProvider`. - `txRetryMulitplier: string | undefined` -- [optional] the mulitplier on interval length to wait between retries while waiting for transaction receipts (default: 1.5). - - `feeOptions:` [`UserOperationFeeOptions`](/packages/aa-core/provider/types/userOperationFeeOptions.md) `| undefined` --[optional] user operation fee options to be used for gas estimation, set at the global level on the provider. - If not set, default fee options for the chain are used. Available fields in `feeOptions` include `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` where each field is of type [`UserOperationFeeOptionsField`](/packages/aa-core/provider/types/userOperationFeeOptionsField.md). + - `feeOptions:` [`UserOperationFeeOptions`](/packages/aa-core/smart-account-client/types/userOperationFeeOptions.md) `| undefined` --[optional] user operation fee options to be used for gas estimation, set at the global level on the provider. + If not set, default fee options for the chain are used. Available fields in `feeOptions` include `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` where each field is of type [`UserOperationFeeOptionsField`](/packages/aa-core/smart-account-client/types/userOperationFeeOptionsField.md). - `maxFeePerGas`: `UserOperationFeeOptionsField` - `maxPriorityFeePerGas`: `UserOperationFeeOptionsField` - `callGasLimit`: `UserOperationFeeOptionsField` - `verificationGasLimit`: `UserOperationFeeOptionsField` - `preVerificationGas`: `UserOperationFeeOptionsField` - -:::tip Note -The fee options set upon the provider initialization are available from each middleware of the `SmartAccountProvider`. For example, the default middlewares such as [`gasEstimator`](/packages/aa-core/provider/withGasEstimator.md) or [`feeDataGetter`](/packages/aa-core/provider/withFeeDataGetter.md) apply the fee options to the estimated values if the fee options are set. -::: - -:::tip Note -If you are using your own middleware, for example a custom `feeDataGetter` using [`withFeeDataGetter`](/packages/aa-core/provider/withFeeDataGetter.md) method on the provider, then the default `feeDataGetter` middleware is overriden. As you are opting out of using the default middleware, you are also responsible for handling the fee options appropriately for the fee options set upon provider initialization. -::: diff --git a/site/packages/aa-alchemy/utils/defineAlchemyChain.md b/site/packages/aa-alchemy/utils/defineAlchemyChain.md new file mode 100644 index 0000000000..d1762e4626 --- /dev/null +++ b/site/packages/aa-alchemy/utils/defineAlchemyChain.md @@ -0,0 +1,49 @@ +--- +outline: deep +head: + - - meta + - property: og:title + content: Utils • SupportedChains + - - meta + - name: description + content: Overview of the SupportedChains util method in aa-alchemy + - - meta + - property: og:description + content: Overview of the SupportedChains util method in aa-alchemy +next: + text: aa-accounts +--- + +# defineAlchemyChain + +`defineAlchemyChain` allows you to extend a `viem` chain if it is not configured with Alchemy's RPC Url. This is useful `@alchemy/aa-core` does not export a chain you can use with the Alchemy Clieny. + +## Usage + +::: code-group + +```ts [example.ts] +import { defineAlchemyChain } from "@alchemy/aa-alchemy"; +import { mainnet } from "viem"; + +// eth mainnet +const mainnetWithAlch = defineAlchemyChain({ + chain: mainnet, + rpcBaseUrl: "https://eth-mainnet.g.alchemy.com/v2/", +}); +``` + +::: + +## Returns + +### `Chain` + +the associated viem `Chain` object. + +## Parameters + +### `config: AlchemyChainConfig` + +- `chain: Chain` -- the chain you want to extend +- `rpcBaseUrl: string` -- the Alchemy RPC Url for the chain (without the API Key appended) diff --git a/site/packages/aa-alchemy/utils/introduction.md b/site/packages/aa-alchemy/utils/introduction.md deleted file mode 100644 index 340ce52edc..0000000000 --- a/site/packages/aa-alchemy/utils/introduction.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: Utils - - - meta - - name: description - content: Overview of the Utils methods in aa-alchemy - - - meta - - property: og:description - content: Overview of the Utils methods in aa-alchemy ---- - -# Utils - -`aa-alchemy` offers util methods to speed up your development with `AlchemyProvider`. - -Notable util methods include: - -1. [`SupportedChains`](/packages/aa-alchemy/utils/supportedChains) -- calls `eth_estimateUserOperationGas` and returns the result. - -## Usage - -::: code-group - -```ts [example.ts] -import { SupportedChains } from "@alchemy/aa-alchemy"; - -// eth mainnet -const mainnet = SupportedChains.get(1); - -// bsc is unsupported, so the variable will be undefined -const bsc = SupportedChains.get(56); -``` - -::: diff --git a/site/packages/aa-alchemy/utils/supportedChains.md b/site/packages/aa-alchemy/utils/supportedChains.md deleted file mode 100644 index 1615154f75..0000000000 --- a/site/packages/aa-alchemy/utils/supportedChains.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: Utils • SupportedChains - - - meta - - name: description - content: Overview of the SupportedChains util method in aa-alchemy - - - meta - - property: og:description - content: Overview of the SupportedChains util method in aa-alchemy -next: - text: aa-accounts ---- - -# SupportedChains - -`SupportedChains` provides a mapping from chain ID to a viem `Chain` object for all chains supported by the Alchemy RPC. This util includes mappings for both supported mainnets and supported testnets. - -## Usage - -::: code-group - -```ts [example.ts] -import { SupportedChains } from "@alchemy/aa-alchemy"; - -// eth mainnet -const mainnet = SupportedChains.get(1); - -// bsc mainnet is unsupported, so the variable will be undefined -const bsc = SupportedChains.get(56); -``` - -::: - -## Returns - -### `Chain` - -the associated viem `Chain` object. - -## Parameters - -### `chainId: number` -- the struct containig UserOperation fields, where each field may be asychronously returned from the middleware used to generate its final value. diff --git a/site/packages/aa-core/accounts/constructor.md b/site/packages/aa-core/accounts/constructor.md deleted file mode 100644 index 2283408176..0000000000 --- a/site/packages/aa-core/accounts/constructor.md +++ /dev/null @@ -1,77 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: SimpleSmartContractAccount • constructor - - - meta - - name: description - content: Overview of the constructor method on SimpleSmartContractAccount in aa-core - - - meta - - property: og:description - content: Overview of the constructor method on SimpleSmartContractAccount in aa-core -next: - text: Required Methods ---- - -# constructor - -To initialize a `SimpleSmartContractAccount`, you must provide a set of parameters detailed below. - -Note that `BaseSmartContractAccount` is an abstract class, and so cannot be initialized even though it has a constructor. - -## Usage - -::: code-group - -```ts [example.ts] -import { - LocalAccountSigner, - SimpleSmartContractAccount, - getDefaultEntryPointAddress, - getDefaultSimpleAccountFactoryAddress, - type SmartAccountSigner, -} from "@alchemy/aa-core"; -import { sepolia } from "@alchemy/aa-core"; - -const PRIVATE_KEY = "0xYourEOAPrivateKey"; -const eoaSigner: SmartAccountSigner = - LocalAccountSigner.privateKeyToAccountSigner(`0x${PRIVATE_KEY}`); - -// instantiates using every possible parameter, as a reference -export const account = new SimpleSmartContractAccount({ - rpcClient: "ALCHEMY_RPC_URL", - chain: sepolia, - factoryAddress: getDefaultSimpleAccountFactoryAddress(sepolia), - owner: eoaSigner, - entryPointAddress: getDefaultEntryPointAddress(sepolia), - accountAddress: "0xYourSmartAccountAddress", - index: 0n, -}); -``` - -::: - -## Returns - -### `SimpleSmartContractAccount` - -A new instance of a `SimpleSmartContractAccount`. - -## Parameters - -### `params: SimpleSmartAccountParams` - -- `rpcClient: string | PublicErc4337Client` -- a JSON-RPC URL, or a viem Client that supports ERC-4337 methods and Viem public actions. See [createPublicErc4337Client](/packages/aa-core/client/createPublicErc4337Client.md). - -- `chain: Chain` -- the chain on which to create the provider. - -- `factoryAddress: Address` -- the factory address for the smart account implementation, which is required for creating the account if not already deployed. - -- `owner: SmartAccountSigner` -- the owner EOA address responsible for signing user operations on behalf of the smart account. - -- `entryPointAddress: Address | undefined` -- [optional] entry point contract address. If not provided, the entry point contract address for the provider is the connected account's entry point contract, or if not connected, falls back to the default entry point contract for the chain. See [getDefaultEntryPointAddress](/packages/aa-core/utils/getDefaultEntryPointAddress.html#getdefaultentrypointaddress). - -- `accountAddress: Address | undefined` -- [optional] a smart account address override that this object will manage instead of generating its own. - -- `index: bigint | undefined` -- [optional] additional salt value used when creating the smart account. Allows for a one-to-many creation from one owner address to many smart account addresses. See [stringToIndex](/packages/aa-core/utils/stringToIndex.html) for an easy way to convert a string, such as an email in your database, to salt. diff --git a/site/packages/aa-core/accounts/index.md b/site/packages/aa-core/accounts/index.md new file mode 100644 index 0000000000..7309534261 --- /dev/null +++ b/site/packages/aa-core/accounts/index.md @@ -0,0 +1,86 @@ +--- +outline: deep +head: + - - meta + - property: og:title + content: SmartContractAccount + - - meta + - name: description + content: Overview of SmartContractAccount interface exported by aa-core accounts + - - meta + - property: og:description + content: Overview of SmartContractAccount interface exported by aa-core accounts +prev: + text: SmartAccountProvider +--- + +# SmartContractAccount + +The `SmartContractAccount` interface is an extension of viem's [`CustomAccount`](https://viem.sh/docs/accounts/custom) with additional methods used for Account Abstraction. It is meant to be used in conjunction with a [`SmartAccountClient`](/packages/aa-core/smart-account-client/). + +## Custom Smart Contract Accounts + +If you have your own smart contract that you'd like to interact with, then you can use the `toSmartContractAccount` method to create a `SmartContractAccount` instance. + +### Usage + +```ts +import { toSmartContractAccount } from "@alchemy/aa-core"; +import { sepolia } from "viem/chains"; + +const myAccount = await toSmartContractAccount({ + /// REQUIRED PARAMS /// + source: "MyAccount", + transport: http("RPC_URL"), + chain: sepolia, + // The entrypoint contract that your account is compatible with + entrypointAddress: "0x1234...", + // This should return a concatenation of your `factoryAddress` and the `callData` for your factory's create account method + getAccountInitCode: () => "0x{factoryAddress}{callData}", + // an invalid signature that doesn't cause your account to revert during validation + getDummySignature: () => "0x1234...", + // given a UO in the form of {target, data, value} should output the calldata for calling your contract's execution method + encodeExecute: (uo)=> "...." + signMessage: ({message}: SignableMessage) => "0x...", + signTypedData: (typedData) => "0x000", + + /// OPTIONAL PARAMS /// + // if you already know your account's address, pass that in here to avoid generating a new counterfactual + accountAddress?: Address, + // if your account supports batching, this should take an array of UOs and return the calldata for calling your contract's batchExecute method + encodeBatchExecute: (uos) => "0x...", + // if your contract expects a different signing scheme than the default signMessage scheme, you can override that here + signUserOperationHash: (hash) => "0x...", + // allows you to define the calldata for upgrading your account + encodeUpgradeToAndCall: (params) => "0x...", +}); +``` + +### Returns + +#### `SmartContractAccount` + +```ts +export type SmartContractAccount = + LocalAccount & { + source: Name; + getDummySignature: () => Hex; + encodeExecute: (tx: Tx) => Promise; + encodeBatchExecute: (txs: Tx[]) => Promise; + signUserOperationHash: (uoHash: Hex) => Promise; + signMessageWith6492: (params: { message: SignableMessage }) => Promise; + signTypedDataWith6492: < + const typedData extends TypedData | Record, + primaryType extends keyof typedData | "EIP712Domain" = keyof typedData + >( + typedDataDefinition: TypedDataDefinition + ) => Promise; + encodeUpgradeToAndCall: (params: UpgradeToAndCallParams) => Promise; + getNonce(): Promise; + getInitCode: () => Promise; + isAccountDeployed: () => Promise; + getFactoryAddress: () => Address; + getEntrypoint: () => Address; + getImplementationAddress: () => Promise<"0x0" | Address>; + }; +``` diff --git a/site/packages/aa-core/accounts/introduction.md b/site/packages/aa-core/accounts/introduction.md deleted file mode 100644 index c4bdf4df81..0000000000 --- a/site/packages/aa-core/accounts/introduction.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: ISmartContractAccount - - - meta - - name: description - content: Overview of ISmartContractAccount class exported by aa-core accounts - - - meta - - property: og:description - content: Overview of ISmartContractAccount class exported by aa-core accounts -prev: - text: SmartAccountProvider ---- - -# ISmartContractAccount - -`ISmartContractAccount` defines how you would interact with your Smart Contract Account. - -::: details ISmartContractAccount -<<< @/../packages/core/src/account/types.ts -::: - -## BaseSmartContractAccount - -The `BaseSmartContractAccount` is an abstract class that provides the base implementation the `ISmartContractAccount` interface to provide the ease of creating your own Smart Contract Account. Any class that extends and implements `BaseSmartContractAccount` may also expose additional methods that support its connecting [SmartAccountProvider](/packages/aa-core/provider/introduction). - -`BaseSmartContractAccount` contains abstract methods that requires implementation from any class that extends the class. - -::: details BaseSmartContractAccount -<<< @/../packages/core/src/account/base.ts -::: - -### Required Methods To Implement - -- [`getDummySignature`](/packages/aa-core/accounts/required/getDummySignature) -- this method returns a signature that will not `revert` during validation. It does not have to pass validation, just not cause the contract to revert. This is required for gas estimation so that the gas estimate are accurate. -- [`encodeExecute`](/packages/aa-core/accounts/required/encodeExecute) -- this method returns the abi encoded function data for a call to your contract's `execute` method -- [`signMessage`](/packages/aa-core/accounts/required/signMessage) -- this method returns an [EIP-191](https://eips.ethereum.org/EIPS/eip-191) compliant message and is used to sign UO Hashes -- [`getAccountInitCode`](/packages/aa-core/accounts/required/getAccountInitCode) -- this method returns the account init code that will be used to create an account if one does not exist. Usually this is the concatenation of the account's factory address and the abi encoded function data of the account factory's `createAccount` method. - -### Optional Methods To Implement - -In addition, it provides other optional methods that need to be implemented by the subclass in order to support functionalities such as: - -- [`signTypedData`](/packages/aa-core/accounts/optional/signTypedData) -- Signs typed data per [ERC-712](https://eips.ethereum.org/EIPS/eip-712) -- [`signMessageWith6492`](/packages/aa-core/accounts/optional/signMessageWith6492) -- Wraps the result of `signMessage` as per [EIP-6492](https://eips.ethereum.org/EIPS/eip-6492) for signing the message for deployed smart accounts, as well as undeployed accounts -- [`signTypedDataWith6492`](/packages/aa-core/accounts/optional/signTypedDataWith6492) -- Similar to the signMessageWith6492 method above, this method wraps the result of `signTypedData` as per [EIP-6492](https://eips.ethereum.org/EIPS/eip-6492) -- [`encodeBatchExecute`](/packages/aa-core/accounts/optional/encodeBatchExecute) -- If your contract does support batching, encodes a list of transactions into the call data that will be passed to your contract's `batchExecute` method. - -**Note**: `signMessageWith6492` and `signTypedDataWith6492` methods are already implemented on `BaseSmartContractAccount`, so any class that extends and implements `BaseSmartContractAccount` may call this method. - -## SimpleSmartContractAccount - -[SimpleSmartContractAccount](packages/core/src/account/simple.ts) a minimal implementation version of `BaseSmartContractAccount`. It implements the required abstraction methods in `BaseSmartContractAccount`, and additionally implements the optional methods indicated above. - -**Note:** While `SimpleSmartContractAccount` fully implements the `ISmartContractAccount` interface for use as your basic smart account, we recommend using our [Light Account](/smart-accounts/accounts/guides/light-account) as it is a simple, yet more secure, and cost-effective smart account implementation. - -## Usage - -::: code-group - -<<< @/snippets/account-core.ts - -<<< @/snippets/account-alchemy.ts - -<<< @/snippets/account-ethers.ts - -::: diff --git a/site/packages/aa-core/accounts/optional/encodeBatchExecute.md b/site/packages/aa-core/accounts/optional/encodeBatchExecute.md deleted file mode 100644 index 4da7bd9766..0000000000 --- a/site/packages/aa-core/accounts/optional/encodeBatchExecute.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: encodeBatchExecute - - - meta - - name: description - content: Overview of the encodeBatchExecute method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the encodeBatchExecute method on BaseSmartContractAccount ---- - -# encodeBatchExecute - -**NOTE**: Not all accounts support batching. - -If your contract does, this method should encode a list of transactions into the call data that will be passed to your contract's `batchExecute` method. - -## Example Implementation - -::: code-group - -```ts [example.ts] -import { SimpleAccountAbi } from "./simple-account-abi"; -// [!code focus:99] -async encodeBatchExecute( - txs: BatchUserOperationCallData -): Promise<`0x${string}`> { - const [targets, datas] = txs.reduce( - (accum, curr) => { - accum[0].push(curr.target); - accum[1].push(curr.data); - - return accum; - }, - [[], []] as [Address[], Hex[]] - ); - - return encodeFunctionData({ - abi: SimpleAccountAbi, - functionName: "executeBatch", - args: [targets, datas], - }); -} -``` - -<<< @/snippets/simple-account-abi.ts -::: - -## Returns - -### `Promise` - -The promise containing the abi encoded function data for a call to your contract's `batchExecute` method - -## Parameters - -### `txs`: `BatchUserOperationCallData = UserOperationCallData[]` - -An array of objects containing the target, value, and data for each transaction as `UserOperationCallData` with following fields: - -- `target`: `string` - The address receiving the call data. Equivalent to `to` in a normal transaction. -- `value`: `bigint` - Optionally, the amount of native token to send. Equivalent to `value` in a normal transaction. -- `data`: `string` - The call data or "0x" if empty. Equivalent to `data` in a normal transaction. diff --git a/site/packages/aa-core/accounts/optional/signMessageWith6492.md b/site/packages/aa-core/accounts/optional/signMessageWith6492.md deleted file mode 100644 index 5018014d3e..0000000000 --- a/site/packages/aa-core/accounts/optional/signMessageWith6492.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: signMessageWith6492 - - - meta - - name: description - content: Overview of the signMessageWith6492 method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the signMessageWith6492 method on BaseSmartContractAccount ---- - -# signMessageWith6492 - -This method wraps the result of `signMessage` as per [EIP-6492](https://eips.ethereum.org/EIPS/eip-6492) for signing the message for deployed smart accounts, as well as undeployed accounts (counterfactual addresses). - -**Note**: This method is already implemented on `BaseSmartContractAccount`, so any class that extends and implements `BaseSmartContractAccount` may call this method. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -const signedMsgWrappedWith6492 = await provider.signMessageWith6492("msg"); -``` - -<<< @/snippets/provider.ts - -::: - -## Returns - -### `Promise` - -A promise containing the signature of the message, additionally wrapped in EIP-6492 format if the account is undeployed - -## Parameters - -### `msg: string | Uint8Array | Hex` - -The message to sign diff --git a/site/packages/aa-core/accounts/optional/signTypedData.md b/site/packages/aa-core/accounts/optional/signTypedData.md deleted file mode 100644 index 324f4207dd..0000000000 --- a/site/packages/aa-core/accounts/optional/signTypedData.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: signTypedData - - - meta - - name: description - content: Overview of the signTypedData method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the signTypedData method on BaseSmartContractAccount ---- - -# signTypedData - -If your contract supports signing and verifying typed data, you should implement this method that returns the signed typed data object as per [ERC-712](https://eips.ethereum.org/EIPS/eip-712). - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -// sign typed data -const signedTypedData = provider.signTypedData({ - domain: { - name: "Ether Mail", - version: "1", - chainId: 1, - verifyingContract: "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", - }, - types: { - Person: [ - { name: "name", type: "string" }, - { name: "wallet", type: "address" }, - ], - Mail: [ - { name: "from", type: "Person" }, - { name: "to", type: "Person" }, - { name: "contents", type: "string" }, - ], - }, - primaryType: "Mail", - message: { - from: { - name: "Cow", - wallet: "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826", - }, - to: { - name: "Bob", - wallet: "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB", - }, - contents: "Hello, Bob!", - }, -}); -``` - -<<< @/snippets/provider.ts - -::: - -### Returns - -### `Promise` - -A promise containing the signature of the typed data. - -## Parameters - -### `SignTypedDataParams` - -The typed data to sign - -- `domain: TypedDataDomain` - The typed data domain -- `types: Object` -- The type definitions for the typed data -- `primaryType: inferred String` -- The primary type to extract from types and use in value -- `message: inferred from types & primaryType` -- The typed message object diff --git a/site/packages/aa-core/accounts/optional/signTypedDataWith6492.md b/site/packages/aa-core/accounts/optional/signTypedDataWith6492.md deleted file mode 100644 index 42125d344a..0000000000 --- a/site/packages/aa-core/accounts/optional/signTypedDataWith6492.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: signTypedDataWith6492 - - - meta - - name: description - content: Overview of the signTypedDataWith6492 method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the signTypedDataWith6492 method on BaseSmartContractAccount ---- - -# signTypedDataWith6492 - -Similar to the signMessageWith6492 method above, this method wraps the result of `signTypedData` as per [EIP-6492](https://eips.ethereum.org/EIPS/eip-6492) to support signing the typed data for deployed smart accounts, as well as undeployed accounts (counterfactual addresses). - -**Note**: This method is already implemented on `BaseSmartContractAccount`, so any class that extends and implements `BaseSmartContractAccount` may call this method. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -const signedTypedDataWrappedWith6492 = provider.signTypedDataWith6492({ - domain: { - name: "Ether Mail", - version: "1", - chainId: 1, - verifyingContract: "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC", - }, - types: { - Person: [ - { name: "name", type: "string" }, - { name: "wallet", type: "address" }, - ], - Mail: [ - { name: "from", type: "Person" }, - { name: "to", type: "Person" }, - { name: "contents", type: "string" }, - ], - }, - primaryType: "Mail", - message: { - from: { - name: "Cow", - wallet: "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826", - }, - to: { - name: "Bob", - wallet: "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB", - }, - contents: "Hello, Bob!", - }, -}); -``` - -<<< @/snippets/provider.ts - -::: - -## Returns - -### `Promise` - -A promise containing the signature of the message, additionally wrapped in EIP-6492 format if the account is undeployed - -## Parameters - -### `params: SignTypedDataParams` - -The typed data to sign - -- `domain: TypedDataDomain` -- The typed data domain -- `types: Object` -- The type definitions for the typed data -- `primaryType: inferred String` -- The primary type to extract from types and use in value -- `message: inferred from types & primaryType` -- The typed message object diff --git a/site/packages/aa-core/accounts/optional/signUserOperationHash.md b/site/packages/aa-core/accounts/optional/signUserOperationHash.md deleted file mode 100644 index e3898cf228..0000000000 --- a/site/packages/aa-core/accounts/optional/signUserOperationHash.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: signUserOperationHash - - - meta - - name: description - content: Overview of the signUserOperationHash method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the signUserOperationHash method on BaseSmartContractAccount -next: - text: Other Methods ---- - -# signUserOperationHash - -If your account handles [ERC-1271 signatures](https://eips.ethereum.org/EIPS/eip-1271) of `personal_sign` differently than it does user operations, you can implement your additional way to sign the user operation. - -**Note**: This method is already implemented on `BaseSmartContractAccount` defaulting to using the [`signMessage`](/packages/aa-core/accounts/required/signMessage.md) method. So any class that extends and implements `BaseSmartContractAccount` may call this method. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -const signature = await provider.account.signUserOperationHash( - `` -); -``` - -<<< @/snippets/provider.ts - -::: - -## Returns - -### `Promise` - -The signature of the UserOperation - -## Parameters - -### `uoHash: Hash` - -The hash of the UserOperation to sign diff --git a/site/packages/aa-core/accounts/other/getAddress.md b/site/packages/aa-core/accounts/other/getAddress.md deleted file mode 100644 index 720c6b84ed..0000000000 --- a/site/packages/aa-core/accounts/other/getAddress.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: getAddress - - - meta - - name: description - content: Overview of the getAddress method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the getAddress method on BaseSmartContractAccount ---- - -# getAddress - -Returns the address of the account. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -const address = await provider.account.getAddress(); -``` - -<<< @/snippets/provider.ts - -::: - -## Returns - -### `Promise` - -A promise that resolves to the address of the account diff --git a/site/packages/aa-core/accounts/other/getDeploymentState.md b/site/packages/aa-core/accounts/other/getDeploymentState.md deleted file mode 100644 index 1b582b8840..0000000000 --- a/site/packages/aa-core/accounts/other/getDeploymentState.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: getDeploymentState - - - meta - - name: description - content: Overview of the getDeploymentState method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the getDeploymentState method on BaseSmartContractAccount ---- - -# getDeploymentState - -Returns the current deployment state as an enum `DeploymentState` (`UNDEFINED`, `NOT_DEPLOYED`, or `DEPLOYED`) for the account - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -const deploymentState = await provider.account.getDeploymentState(); -``` - -<<< @/snippets/provider.ts - -::: - -## Returns - -### `Promise` - -A promise that resolves to the current deployment state as an enum `DeploymentState` (`UNDEFINED`, `NOT_DEPLOYED`, or `DEPLOYED`) for the account diff --git a/site/packages/aa-core/accounts/other/getEntryPointAddress.md b/site/packages/aa-core/accounts/other/getEntryPointAddress.md deleted file mode 100644 index 0f34bbdc17..0000000000 --- a/site/packages/aa-core/accounts/other/getEntryPointAddress.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: getEntryPointAddress - - - meta - - name: description - content: Overview of the getEntryPointAddress method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the getEntryPointAddress method on BaseSmartContractAccount -next: - text: SmartAccountSigner ---- - -# getEntryPointAddress - -Returns the EntryPoint contract address for the account. - -Refer to [the reference docs](https://docs.alchemy.com/reference/eth-supportedentrypoints/?a=ak-docs) for all the supported entrypoints when using Alchemy as your RPC provider. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -const entryPointAddress = await provider.account.getEntryPointAddress(); -``` - -<<< @/snippets/provider.ts - -::: - -## Returns - -### `Address` - -The address of the EntryPoint contract diff --git a/site/packages/aa-core/accounts/other/getFactoryAddress.md b/site/packages/aa-core/accounts/other/getFactoryAddress.md deleted file mode 100644 index 7f561f052b..0000000000 --- a/site/packages/aa-core/accounts/other/getFactoryAddress.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: getFactoryAddress - - - meta - - name: description - content: Overview of the getFactoryAddress method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the getFactoryAddress method on BaseSmartContractAccount ---- - -# getFactoryAddress - -Returns the account factory address for the account. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -const factoryAddress = await provider.account.getFactoryAddress(); -``` - -<<< @/snippets/provider.ts - -::: - -## Returns - -### `Address` - -The address of the account factory contract diff --git a/site/packages/aa-core/accounts/other/getNonce.md b/site/packages/aa-core/accounts/other/getNonce.md deleted file mode 100644 index c781a336bf..0000000000 --- a/site/packages/aa-core/accounts/other/getNonce.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: getNonce - - - meta - - name: description - content: Overview of the getNonce method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the getNonce method on BaseSmartContractAccount ---- - -# getNonce - -Returns the nonce of the account. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -const address = await provider.account.getNonce(); -``` - -<<< @/snippets/provider.ts - -::: - -## Returns - -### `Promise` - -A promise that resolves to the current nonce of the account diff --git a/site/packages/aa-core/accounts/other/getOwner.md b/site/packages/aa-core/accounts/other/getOwner.md deleted file mode 100644 index 58dcfa433c..0000000000 --- a/site/packages/aa-core/accounts/other/getOwner.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: getOwner - - - meta - - name: description - content: Overview of the getOwner method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the getOwner method on BaseSmartContractAccount ---- - -# getOwner - -Returns the `SmartAccountSigner` that represents the current owner for the account. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -const ownerSigner = await provider.account.getOwner(); -``` - -<<< @/snippets/provider.ts - -::: - -## Returns - -### `SmartAccountSigner | undefined` - -The `SmartAccountSigner` object that represents the current owner for the account diff --git a/site/packages/aa-core/accounts/other/isAccountDeployed.md b/site/packages/aa-core/accounts/other/isAccountDeployed.md deleted file mode 100644 index 1b0ad98894..0000000000 --- a/site/packages/aa-core/accounts/other/isAccountDeployed.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: isAccountDeployed - - - meta - - name: description - content: Overview of the isAccountDeployed method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the isAccountDeployed method on BaseSmartContractAccount ---- - -# isAccountDeployed - -Returns a boolean flag indicating whether the account has been deployed or not. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -const isAccountDeployed = await provider.account.isAccountDeployed(); -``` - -<<< @/snippets/provider.ts - -::: - -## Returns - -### `Promise` - -A promise that resolves the boolean flag indicating whether the account has been deployed or not diff --git a/site/packages/aa-core/accounts/required/encodeExecute.md b/site/packages/aa-core/accounts/required/encodeExecute.md deleted file mode 100644 index 5982bfdaec..0000000000 --- a/site/packages/aa-core/accounts/required/encodeExecute.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: encodeExecute - - - meta - - name: description - content: Overview of the encodeExecute abstract method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the encodeExecute abstract method on BaseSmartContractAccount -next: - text: Optional Methods ---- - -# encodeExecute - -Returns the abi encoded function data for a call to your contract's `execute` method. - -## Example Implementation - -::: code-group - -```ts [example.ts] -import { SimpleAccountAbi } from "./simple-account-abi"; -// [!code focus:99] -async encodeExecute( - target: Hex, - value: bigint, - data: Hex -): Promise<`0x${string}`> { - return encodeFunctionData({ - abi: SimpleAccountAbi, - functionName: "execute", - args: [target, value, data], - }); -} -``` - -<<< @/snippets/simple-account-abi.ts -::: - -## Returns - -### `Promise` - -The promise containing the abi encoded function data for a call to your contract's `execute` method - -## Parameters - -`UserOperationCallData` fields: - -- `target`: `string` - The address receiving the call data. Equivalent to `to` in a normal transaction. -- `value`: `bigint` - Optionally, the amount of native token to send. Equivalent to `value` in a normal transaction. -- `data`: `string` - The call data or "0x" if empty. Equivalent to `data` in a normal transaction. diff --git a/site/packages/aa-core/accounts/required/getAccountInitCode.md b/site/packages/aa-core/accounts/required/getAccountInitCode.md deleted file mode 100644 index cad40e81e7..0000000000 --- a/site/packages/aa-core/accounts/required/getAccountInitCode.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: getAccountInitCode - - - meta - - name: description - content: Overview of the getAccountInitCode abstract method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the getAccountInitCode abstract method on BaseSmartContractAccount ---- - -# getAccountInitCode - -This method should return the init code that will be used to create an account if one does not exist. - -This is [expected](https://github.com/eth-infinitism/account-abstraction/blob/v0.6.0/contracts/core/SenderCreator.sol#L15) to be the concatenation of the account's factory address and the abi encoded function data of the account factory's `createAccount` method. - -**Reference:** - -- [EIP-4337: First-time account creation](https://eips.ethereum.org/EIPS/eip-4337#first-time-account-creation) -- [EntryPoint spec](https://github.com/eth-infinitism/account-abstraction/blob/v0.6.0/contracts/core/SenderCreator.sol#L15) - -## Example Implementation - -::: code-group - -```ts [example.ts] -// [!code focus:99] -async getAccountInitCode(): Promise<`0x${string}`> { - return concatHex([ - this.factoryAddress, - encodeFunctionData({ - abi: SimpleAccountFactoryAbi, - functionName: "createAccount", - args: [await this.owner.getAddress(), this.index], - }), - ]); -} -``` - -::: - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -const initCode = await provider.getAccountInitCode(); -const factoryAddress = `0x${initCode.substring(2, 42)}` as Address; -const factoryCalldata = `0x${initCode.substring(42)}` as Hex; -``` - -<<< @/snippets/provider.ts - -::: - -## Returns - -### `Promise` - -The promise containing the init code for the account diff --git a/site/packages/aa-core/accounts/required/getDummySignature.md b/site/packages/aa-core/accounts/required/getDummySignature.md deleted file mode 100644 index a4fbf4eef0..0000000000 --- a/site/packages/aa-core/accounts/required/getDummySignature.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: getDummySignature - - - meta - - name: description - content: Overview of the getDummySignature abstract method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the getDummySignature abstract method on BaseSmartContractAccount ---- - -# getDummySignature - -This method should return a signature that will not `revert` during validation. It does not have to pass validation, just not cause the contract to revert. This is required for gas estimation so that the gas estimate are accurate. - -Please note that the dummy signature is specific to the account implementation and the example dummy signature below does not generalize to all account types. This is an example dummy signature for SimpleAccount account implementation. For other account implementations, you may need to provide a different dummy signature. - -**Reference:** - -- [Our Bundler API docs](https://docs.alchemy.com/reference/eth-estimateuseroperationgas#dummy-signature-for-simpleaccount/?a=ak-docs) -- [EIP-4337: `eth_estimateUserOperationGas`](https://eips.ethereum.org/EIPS/eip-4337#-eth_estimateuseroperationgas) - -## Example Implementation - -::: code-group - -```ts [example.ts] -// [!code focus:99] -getDummySignature(): `0x${string}` { - return "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"; -} -``` - -::: - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -const dummySignature = await provider.getDummySignature(); -``` - -<<< @/snippets/provider.ts - -::: - -## Returns - -### `Hash` - -A dummy signature that doesn't cause the account to revert during estimation diff --git a/site/packages/aa-core/accounts/required/signMessage.md b/site/packages/aa-core/accounts/required/signMessage.md deleted file mode 100644 index 3ae8d72cd8..0000000000 --- a/site/packages/aa-core/accounts/required/signMessage.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: signMessage - - - meta - - name: description - content: Overview of the signMessage abstract method on BaseSmartContractAccount - - - meta - - property: og:description - content: Overview of the signMessage abstract method on BaseSmartContractAccount ---- - -# signMessage - -This method should return an [ERC-191](https://eips.ethereum.org/EIPS/eip-191) compliant message and is used to sign `UserOperation` hashes. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -const signedMessage = await provider.signMessage("msg"); -``` - -<<< @/snippets/provider.ts - -::: - -### Returns - -### `Promise` - -A promise containing the signature of the message - -## Parameters - -### `msg`: `string | Uint8Array | Hex` - -The message to sign diff --git a/site/packages/aa-core/bundler-client/actions/bundlerActions.md b/site/packages/aa-core/bundler-client/actions/bundlerActions.md new file mode 100644 index 0000000000..04744079b2 --- /dev/null +++ b/site/packages/aa-core/bundler-client/actions/bundlerActions.md @@ -0,0 +1,45 @@ +--- +outline: deep +head: + - - meta + - property: og:title + content: bundlerActions + - - meta + - name: description + content: Overview of the bundlerActions method in aa-core client + - - meta + - property: og:description + content: Overview of the bundlerActions method in aa-core client +next: + text: Utils +--- + +# bundlerActions + +Allows you to extend a viem `Client` with the new 4337 methods. + +## Usage + +::: code-group + +```ts [example.ts] +import { bundlerActions } from "@alchemy/aa-core"; +import { createPublicClient, http } from "viem"; + +const client = createPublicClient({ + chain: mainnet, + transport: http("https://eth-mainnet.g.alchemy.com/v2/demo"), +}).extend(bundlerActions); +``` + +## Returns + +### `BundlerActions` + +An object containing utility methods for calling the [Rundler RPC Methods](/packages/aa-core/bundler-client/index#rpc-methods). + +## Parameters + +### `Client` + +A viem Client that supports making JSON RPC calls to a Provider that supports the 4337 methods. diff --git a/site/packages/aa-core/client/actions/estimateUserOperationGas.md b/site/packages/aa-core/bundler-client/actions/estimateUserOperationGas.md similarity index 90% rename from site/packages/aa-core/client/actions/estimateUserOperationGas.md rename to site/packages/aa-core/bundler-client/actions/estimateUserOperationGas.md index 84d976d740..2b466f4dcd 100644 --- a/site/packages/aa-core/client/actions/estimateUserOperationGas.md +++ b/site/packages/aa-core/bundler-client/actions/estimateUserOperationGas.md @@ -6,10 +6,10 @@ head: content: estimateUserOperationGas - - meta - name: description - content: Overview of the estimateUserOperationGas action available on the PublicErc4337Client + content: Overview of the estimateUserOperationGas action available on the BundlerClient - - meta - property: og:description - content: Overview of the estimateUserOperationGas action available on the PublicErc4337Client + content: Overview of the estimateUserOperationGas action available on the BundlerClient --- # estimateUserOperationGas @@ -31,7 +31,7 @@ const estimates = await client.estimateUserOperationGas( ); ``` -<<< @/snippets/client.ts +<<< @/snippets/bundlerClient.ts ::: ## Returns diff --git a/site/packages/aa-core/client/actions/getSupportedEntryPoints.md b/site/packages/aa-core/bundler-client/actions/getSupportedEntryPoints.md similarity index 87% rename from site/packages/aa-core/client/actions/getSupportedEntryPoints.md rename to site/packages/aa-core/bundler-client/actions/getSupportedEntryPoints.md index 020cb3aad7..5a1ca728c1 100644 --- a/site/packages/aa-core/client/actions/getSupportedEntryPoints.md +++ b/site/packages/aa-core/bundler-client/actions/getSupportedEntryPoints.md @@ -6,10 +6,10 @@ head: content: getSupportedEntryPoints - - meta - name: description - content: Overview of the getSupportedEntryPoints action available on the PublicErc4337Client + content: Overview of the getSupportedEntryPoints action available on the BundlerClient - - meta - property: og:description - content: Overview of the getSupportedEntryPoints action available on the PublicErc4337Client + content: Overview of the getSupportedEntryPoints action available on the BundlerClient --- # getSupportedEntryPoints @@ -26,7 +26,7 @@ import { client } from "./client"; const entryPoints = await client.getSupportedEntryPoints(); ``` -<<< @/snippets/client.ts +<<< @/snippets/bundlerClient.ts ::: ## Returns diff --git a/site/packages/aa-core/client/actions/getUserOperationByHash.md b/site/packages/aa-core/bundler-client/actions/getUserOperationByHash.md similarity index 89% rename from site/packages/aa-core/client/actions/getUserOperationByHash.md rename to site/packages/aa-core/bundler-client/actions/getUserOperationByHash.md index 1265d69391..a9483d22d3 100644 --- a/site/packages/aa-core/client/actions/getUserOperationByHash.md +++ b/site/packages/aa-core/bundler-client/actions/getUserOperationByHash.md @@ -6,10 +6,10 @@ head: content: getUserOperationByHash - - meta - name: description - content: Overview of the getUserOperationByHash action available on the PublicErc4337Client + content: Overview of the getUserOperationByHash action available on the BundlerClient - - meta - property: og:description - content: Overview of the getUserOperationByHash action available on the PublicErc4337Client + content: Overview of the getUserOperationByHash action available on the BundlerClient --- # getUserOperationByHash @@ -26,7 +26,7 @@ import { client } from "./client"; const uo = await client.getUserOperationByHash("0xUserOperationHash"); ``` -<<< @/snippets/client.ts +<<< @/snippets/bundlerClient.ts ::: ## Returns diff --git a/site/packages/aa-core/client/actions/getUserOperationReceipt.md b/site/packages/aa-core/bundler-client/actions/getUserOperationReceipt.md similarity index 89% rename from site/packages/aa-core/client/actions/getUserOperationReceipt.md rename to site/packages/aa-core/bundler-client/actions/getUserOperationReceipt.md index 260090fc15..476bd71867 100644 --- a/site/packages/aa-core/client/actions/getUserOperationReceipt.md +++ b/site/packages/aa-core/bundler-client/actions/getUserOperationReceipt.md @@ -6,10 +6,10 @@ head: content: getUserOperationReceipt - - meta - name: description - content: Overview of the getUserOperationReceipt action available on the PublicErc4337Client + content: Overview of the getUserOperationReceipt action available on the BundlerClient - - meta - property: og:description - content: Overview of the getUserOperationReceipt action available on the PublicErc4337Client + content: Overview of the getUserOperationReceipt action available on the BundlerClient --- # getUserOperationReceipt @@ -26,7 +26,7 @@ import { client } from "./client"; const receipt = await client.getUserOperationReceipt("0xUserOperationHash"); ``` -<<< @/snippets/client.ts +<<< @/snippets/bundlerClient.ts ::: ## Returns diff --git a/site/packages/aa-core/client/actions/sendUserOperation.md b/site/packages/aa-core/bundler-client/actions/sendRawUserOperation.md similarity index 67% rename from site/packages/aa-core/client/actions/sendUserOperation.md rename to site/packages/aa-core/bundler-client/actions/sendRawUserOperation.md index d0140481a4..60d3e9cc3e 100644 --- a/site/packages/aa-core/client/actions/sendUserOperation.md +++ b/site/packages/aa-core/bundler-client/actions/sendRawUserOperation.md @@ -3,18 +3,18 @@ outline: deep head: - - meta - property: og:title - content: sendUserOperation + content: sendRawUserOperation - - meta - name: description - content: Overview of the sendUserOperation action available on the PublicErc4337Client + content: Overview of the sendRawUserOperation action available on the BundlerClient - - meta - property: og:description - content: Overview of the sendUserOperation action available on the PublicErc4337Client + content: Overview of the sendRawUserOperation action available on the BundlerClient prev: text: Public ERC-4337 Client --- -# sendUserOperation +# sendRawUserOperation Calls `eth_sendUserOperation` and returns the hash of the sent `UserOperation` (UO). @@ -25,7 +25,7 @@ Calls `eth_sendUserOperation` and returns the hash of the sent `UserOperation` ( ```ts [example.ts] import { client } from "./client"; -const hash = await client.sendUserOperation( +const hash = await client.sendRawUserOperation( { // ... user operation }, @@ -33,7 +33,7 @@ const hash = await client.sendUserOperation( ); ``` -<<< @/snippets/client.ts +<<< @/snippets/bundlerClient.ts ::: ## Returns diff --git a/site/packages/aa-core/client/index.md b/site/packages/aa-core/bundler-client/index.md similarity index 53% rename from site/packages/aa-core/client/index.md rename to site/packages/aa-core/bundler-client/index.md index dcf39f294c..8f87384fd3 100644 --- a/site/packages/aa-core/client/index.md +++ b/site/packages/aa-core/bundler-client/index.md @@ -3,22 +3,61 @@ outline: deep head: - - meta - property: og:title - content: Public Client + content: BundlerClient - - meta - name: description - content: Overview of the Public Client exported by aa-core + content: Introduction to BundlerClient exported by aa-core - - meta - property: og:description - content: Overview of the Public Client exported by aa-core -next: - text: Actions + content: Introduction to BundlerClient exported by aa-core --- -# Public ERC-4337 Client +# Bundler Client -Viem exports a `PublicClient` and utilities for creating the `PublicClient`. We extend that functionality here to provide a `PublicClient` that is also typed to work with the RPC endpoints introduced in [ERC-4337](https://eips.ethereum.org/EIPS/eip-4337). +The `BundlerClient` is an extension of viem's [`PublicClient`](https://viem.sh/docs/clients/public) that adds methods for interacting with Bundler RPC methods. -The `PublicErc4337Client` also has a number of methods that wrap the RPC Methods below to make it easier to interact with the RPC provider. +## Import + +```ts +import { createBundlerClient } from "@alchemy/aa-core"; +// OR +import { createBundlerClientFromExisting } from "@alchemy/aa-core"; +``` + +## Usage + +Initialize a `BundlerClient` in the same way you would initalize a [`PublicClient`](https://viem.sh/docs/clients/public#parameters) + +```ts +import { createBundlerClient } from "@alchemy/aa-core"; +import { http } from "viem"; +import { sepolia } from "@alchemy/aa-core"; + +export const smartAccountClient = createBundlerClient({ + transport: http("ALCHEMY_RPC_URL"), + chain: sepolia, +}); +``` + +If you already have a [`PublicClient`](https://viem.sh/docs/clients/public) instance, you can use `createBundlerClientFromExisting` to create a `BundlerClient` from it. + +```ts +import { createBundlerClientFromExisting } from "@alchemy/aa-core"; +import { http } from "viem"; +import { sepolia } from "@alchemy/aa-core"; + +export const smartAccountClient = createBundlerClientFromExisting(publicClient); +``` + +## Returns + +### `BundlerClient` + +A new instance of a `BundlerClient`. + +## Parameters + +Same parameters outlined in [viem's docs](https://viem.sh/docs/clients/public#parameters) ## RPC Methods diff --git a/site/packages/aa-core/client/createPublicErc4337Client.md b/site/packages/aa-core/client/createPublicErc4337Client.md deleted file mode 100644 index 7c53bca93d..0000000000 --- a/site/packages/aa-core/client/createPublicErc4337Client.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: createPublicErc4337Client - - - meta - - name: description - content: Overview of the createPublicErc4337Client method in aa-core client - - - meta - - property: og:description - content: Overview of the createPublicErc4337Client method in aa-core client ---- - -# createPublicErc4337Client - -Allows you to create an HTTP-based PublicErc4337Client with a given RPC provider. - -## Usage - -::: code-group - -```ts [example.ts] -import { createPublicErc4337Client } from "@alchemy/aa-core"; -import { mainnet } from "@alchemy/aa-core"; - -const client = createPublicErc4337Client({ - chain: mainnet, - rpcUrl: "https://eth-mainnet.g.alchemy.com/v2/demo", -}); -``` - -::: - -## Returns - -### `PublicErc4337Client` - -An HTTP-based PublicErc4337Client that supports both traditional RPC methods and the new 4337 methods. - -## Parameters - -### `chain: Chain` - -The chain to connect to - -### `rpcUrl: string` - -The RPC URL to connect to - -### `fetchOptions?: HttpTransportConfig["fetchOptions"]` - -Optional set of params that let you override the default fetch options for the HTTP transport diff --git a/site/packages/aa-core/client/createPublicErc4337FromClient.md b/site/packages/aa-core/client/createPublicErc4337FromClient.md deleted file mode 100644 index 4a6424c4ac..0000000000 --- a/site/packages/aa-core/client/createPublicErc4337FromClient.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: createPublicErc4337FromClient - - - meta - - name: description - content: Overview of the createPublicErc4337FromClient method in aa-core client - - - meta - - property: og:description - content: Overview of the createPublicErc4337FromClient method in aa-core client ---- - -# createPublicErc4337FromClient - -Allows you to create an HTTP-based PublicErc4337Client from an already created PublicClient. - -## Usage - -::: code-group - -```ts [example.ts] -import { createPublicErc4337FromClient } from "@alchemy/aa-core"; -import { mainnet } from "@alchemy/aa-core"; -import { createPublicClient, http } from "viem"; - -const publicClient = createPublicClient({ - transport: http("https://eth-mainnet.g.alchemy.com/v2/demo"), - chain: mainnet, -}); - -const client = createPublicErc4337FromClient(publicClient); -``` - -::: - -## Returns - -### `PublicErc4337Client` - -An HTTP-based PublicErc4337Client that supports both traditional RPC methods and the new 4337 methods. - -## Parameters - -### `client: PublicClient` - -The client to adapt to a 4337 client diff --git a/site/packages/aa-core/client/erc4337ClientActions.md b/site/packages/aa-core/client/erc4337ClientActions.md deleted file mode 100644 index f7eb5671aa..0000000000 --- a/site/packages/aa-core/client/erc4337ClientActions.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: erc4337ClientActions - - - meta - - name: description - content: Overview of the erc4337ClientActions method in aa-core client - - - meta - - property: og:description - content: Overview of the erc4337ClientActions method in aa-core client -next: - text: Utils ---- - -# erc4337ClientActions - -Allows you to extend a viem `Client` with the new 4337 methods. - -## Usage - -::: code-group - -```ts [example.ts] -import { erc4337ClientActions } from "@alchemy/aa-core"; -import { createPublicClient } from "viem"; - -const client = createPublicClient({ - chain: mainnet, - rpcUrl: "https://eth-mainnet.g.alchemy.com/v2/demo", -}).extend(erc4337ClientActions); -``` - -## Returns - -### `Erc4337Actions` - -An object containing utility methods for calling the [ERC-4337 Methods](/packages/aa-core/client/#rpc-methods). - -## Parameters - -### `Client` - -A viem Client that supports making JSON RPC calls to a Provider that supports the 4337 methods. diff --git a/site/packages/aa-core/index.md b/site/packages/aa-core/index.md index 06841407d6..91facf9ad2 100644 --- a/site/packages/aa-core/index.md +++ b/site/packages/aa-core/index.md @@ -16,11 +16,11 @@ next: # `@alchemy/aa-core` -This package contains the core interfaces and components for interacting with 4337 infrastructure. The primary interfaces that it exports are the `SmartAccountProvider` and `BaseSmartContractAccount`. +This package contains the core interfaces and components for interacting with 4337 infrastructure. The primary interfaces that it exports are the `SmartAccountClient` and `SmartContractAccount`. -The `SmartAccountProvider` is an [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) compliant Provider that wraps JSON RPC methods and some Wallet Methods (signing, sendTransaction, etc). With this Provider, you can submit User Operations to RPC providers, estimate gas, configure a Paymaster, send standard JSON RPC requests, and more. It is not opinionated about which RPC provider you are using and is configurable to work with any RPC provider. Because it implements EIP-1193, it can be used with any web3 library. +The `SmartAccountClient` is an [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) compliant Provider that wraps JSON RPC methods. With this Client, you can submit User Operations to RPC providers, estimate gas, configure a Paymaster, send standard JSON RPC requests, and more. It is not opinionated about which RPC provider you are using and is configurable to work with any RPC provider. Because it implements EIP-1193, it can be used with any web3 library. -The `BaseSmartContractAccount` interface defines how you would interact with your Smart Contract Account. Any class that extends `BaseSmartContractAccount` may also expose additional methods that allow its connecting `SmartAccountProvider` to provide ergonic utilities for building and submitting `User Operation`s. +The `SmartContractAccount` interface defines how you would interact with your Smart Contract Account. Any object that extends `SmartContractAccount` may also expose additional methods that allow its use with a `SmartAccountClient` to provide ergonic utilities for building and submitting `User Operation`s. ## Getting Started @@ -42,7 +42,7 @@ pnpm i @alchemy/aa-core ::: -Then, you can create a provider like so: +Then, you can create a client like so: ::: code-group <<< @/snippets/core-provider.ts ::: diff --git a/site/packages/aa-core/provider/connect.md b/site/packages/aa-core/provider/connect.md deleted file mode 100644 index 20b1e5e33b..0000000000 --- a/site/packages/aa-core/provider/connect.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: connect - - - meta - - name: description - content: Overview of the connect method on SmartAccountProvider - - - meta - - property: og:description - content: Overview of the connect method on SmartAccountProvider ---- - -# connect - -Sets the current account to the smart account returned by the given function. - -The function parameter is called with the public rpc client that is used by this provider so the account can make RPC calls. - -This function emits `connect` and `accountsChanged` events to notify listeners about the connection. - -## Usage - -::: code-group - -<<< @/snippets/provider.ts - -::: - -## Returns - -### SmartAccountProvider - -The provider with the account connected - -## Parameters - -### `fn: (provider: PublicErc4337Client) => BaseSmartContractAccount` - -The function that given public rpc client, returns a smart account diff --git a/site/packages/aa-core/provider/constructor.md b/site/packages/aa-core/provider/constructor.md deleted file mode 100644 index 75c237a772..0000000000 --- a/site/packages/aa-core/provider/constructor.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: SmartAccountProvider • constructor - - - meta - - name: description - content: Overview of the constructor method on SmartAccountProvider in aa-core - - - meta - - property: og:description - content: Overview of the constructor method on SmartAccountProvider in aa-core ---- - -# constructor - -To initialize a `SmartAccountProvider`, you must provide a set of parameters detailed below. - -## Usage - -::: code-group - -```ts [example.ts] -import { SmartAccountProvider } from "@alchemy/aa-core"; -import { getDefaultEntryPointAddress } from "@alchemy/aa-core"; -import { sepolia } from "@alchemy/aa-core"; - -// instantiates using every possible parameter, as a reference -export const provider = new SmartAccountProvider({ - rpcProvider: "ALCHEMY_RPC_URL", - chain: sepolia, - entryPointAddress: getDefaultEntryPointAddress(sepolia), - opts: { - txMaxRetries: 10, - txRetryIntervalMs: 2_000, - txRetryMulitplier: 1.5, - minPriorityFeePerBid: 100_000_000n, - }, -}); -``` - -::: - -## Returns - -### `SmartAccountProvider` - -A new instance of a `SmartAccountProvider`. - -## Parameters - -### `config: SmartAccountProviderConfig` - -- `rpcProvider: string | PublicErc4337Client` -- a JSON-RPC URL, or a viem Client that supports ERC-4337 methods and Viem public actions. See [createPublicErc4337Client](/packages/aa-core/client/createPublicErc4337Client.md). - -- `chain: Chain` -- the chain on which to create the provider. - -- `entryPointAddress: Address | undefined` -- [optional] the entry point contract address. If not provided, the entry point contract address for the provider is the connected account's entry point contract, or if not connected, falls back to the default entry point contract for the chain. See [getDefaultEntryPointAddress](/packages/aa-core/utils/getDefaultEntryPointAddress.html#getdefaultentrypointaddress). - -- `opts: SmartAccountProviderOpts | undefined` -- [optional] overrides on provider config variables having to do with fetching transaction receipts and fee computation. - - - `txMaxRetries: string | undefined` -- [optional] the maximum number of times to try fetching a transaction receipt before giving up (default: 5). - - - `txRetryIntervalMs: string | undefined` -- [optional] the interval in milliseconds to wait between retries while waiting for transaction receipts (default: 2_000). - - - `txRetryMulitplier: string | undefined` -- [optional] the mulitplier on interval length to wait between retries while waiting for transaction receipts (default: 1.5). - - - `feeOptions:` [`UserOperationFeeOptions`](/packages/aa-core/provider/types/userOperationFeeOptions.md) `| undefined` --[optional] user operation fee options to be used for gas estimation, set at the global level on the provider. - If not set, default fee options for the chain are used. Available fields in `feeOptions` include `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` where each field is of type [`UserOperationFeeOptionsField`](/packages/aa-core/provider/types/userOperationFeeOptionsField.md). - - - `maxFeePerGas`: `UserOperationFeeOptionsField` - - `maxPriorityFeePerGas`: `UserOperationFeeOptionsField` - - `callGasLimit`: `UserOperationFeeOptionsField` - - `verificationGasLimit`: `UserOperationFeeOptionsField` - - `preVerificationGas`: `UserOperationFeeOptionsField` - -:::tip Note -The fee options set upon the provider initialization are available from each middleware of the `SmartAccountProvider`. For example, the default middlewares such as [`gasEstimator`](/packages/aa-core/provider/withGasEstimator.md) or [`feeDataGetter`](/packages/aa-core/provider/withFeeDataGetter.md) apply the fee options to the estimated values if the fee options are set. -::: - -:::tip Note -If you are using your own middleware, for example a custom `feeDataGetter` using [`withFeeDataGetter`](/packages/aa-core/provider/withFeeDataGetter.md) method on the provider, then the default `feeDataGetter` middleware is overriden. As you are opting out of using the default middleware, you are also responsible for handling the fee options appropriately for the fee options set upon provider initialization. -::: diff --git a/site/packages/aa-core/provider/disconnect.md b/site/packages/aa-core/provider/disconnect.md deleted file mode 100644 index 14e0041716..0000000000 --- a/site/packages/aa-core/provider/disconnect.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: disconnect - - - meta - - name: description - content: Overview of the disconnect method on ISmartAccountProvider - - - meta - - property: og:description - content: Overview of the disconnect method on ISmartAccountProvider ---- - -# disconnect - -Allows for disconnecting the account from the provider so that the provider can connect to another account instance. - -This function emits `disconnect` and `accountsChanged` events to notify listeners about the connection. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -await provider.disconnect(); -``` - -<<< @/snippets/provider.ts -::: - -## Returns - -### `ISmartAccountProvider` - -The provider with the account disconnected diff --git a/site/packages/aa-core/provider/extend.md b/site/packages/aa-core/provider/extend.md deleted file mode 100644 index 494f097a3a..0000000000 --- a/site/packages/aa-core/provider/extend.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: extend - - - meta - - name: description - content: Overview of the extend method on ISmartAccountProvider - - - meta - - property: og:description - content: Overview of the extend method on ISmartAccountProvider -next: Types ---- - -# extend - -Allows you to add additional functionality and utility methods to this provider via a decorator pattern. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; - -const extendedProvider = provider.extend((provider) => ({ - debugSendUserOperation: (...args) => { - console.log("debugging send user operation"); - return provider.sendUserOperation(...args); - }, -})); - -extendedProvider.debugSendUserOperation(...); -``` - -<<< @/snippets/provider.ts -::: - -## Returns - -### `this & R` - -Where `R` is the return type of the decorator function. - -::: warning -The extend method will not allow you to override existing methods or properties on the provider. To do this, you'll have to use class inheritance. -::: - -## Parameters - -### `decoratorFn: (provider: this) => R` - -A lambda function that takes the current provider as input and returns a set of extension methods and properties to add to the provider. diff --git a/site/packages/aa-core/provider/getEntryPointAddress.md b/site/packages/aa-core/provider/getEntryPointAddress.md deleted file mode 100644 index da755a7a42..0000000000 --- a/site/packages/aa-core/provider/getEntryPointAddress.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: getEntryPointAddress - - - meta - - name: description - content: Overview of the getEntryPointAddress method on ISmartAccountProvider - - - meta - - property: og:description - content: Overview of the getEntryPointAddress method on ISmartAccountProvider ---- - -# getEntryPointAddress - -Returns the EntryPoint contract address being used for the provider. - -If the provider is connected with a `SmartContractAccount`, the EntryPoint contract of the connected account is used for the provider. - -If not connected, it fallbacks to the default entry point contract for the chain, unless the optional parameter `entryPointAddress` was given during the initialization as an override. - -Refer to [the reference docs](https://docs.alchemy.com/reference/eth-supportedentrypoints/?a=ak-docs) for all the supported entrypoints when using Alchemy as your RPC provider. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -const entryPointAddress = await provider.getEntryPointAddress(); -``` - -<<< @/snippets/provider.ts - -::: - -## Returns - -### `Address` - -The address of the EntryPoint contract diff --git a/site/packages/aa-core/provider/introduction.md b/site/packages/aa-core/provider/introduction.md deleted file mode 100644 index f029678657..0000000000 --- a/site/packages/aa-core/provider/introduction.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: SmartAccountProvider - - - meta - - name: description - content: Introduction to SmartAccountProvider exported by aa-core provider - - - meta - - property: og:description - content: Introduction to SmartAccountProvider exported by aa-core provider ---- - -# Introduction to SmartAccountProvider - -The `SmartAccountProvider` is an [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) compliant Provider that wraps JSON RPC methods and some Wallet Methods (signing, sendTransaction, etc). With this Provider, you can submit User Operations to RPC providers, estimate gas, configure a Paymaster, send standard JSON RPC requests, and more. It is not opinionated about which RPC provider you are using and is configurable to work with any RPC provider. Because it implements EIP-1193, it can be used with any web3 library. - -## Usage - -<<< @/snippets/core-provider.ts diff --git a/site/packages/aa-core/provider/isConnected.md b/site/packages/aa-core/provider/isConnected.md deleted file mode 100644 index b3ccd492d3..0000000000 --- a/site/packages/aa-core/provider/isConnected.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: isConnected - - - meta - - name: description - content: Overview of the isConnected method on ISmartAccountProvider - - - meta - - property: og:description - content: Overview of the isConnected method on ISmartAccountProvider ---- - -# isConnected - -Returns the boolean flag indicating if the account is connected. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; -// [!code focus:99] -const isConnected = await provider.isConnected(); -``` - -<<< @/snippets/provider.ts - -::: - -## Returns - -### `boolean` - -The boolean flag indicating if the account is connected diff --git a/site/packages/aa-core/provider/withCustomMiddleware.md b/site/packages/aa-core/provider/withCustomMiddleware.md deleted file mode 100644 index 67449d2c54..0000000000 --- a/site/packages/aa-core/provider/withCustomMiddleware.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: ISmartAccountProvider • withCustomMiddleware - - - meta - - name: description - content: Overview of the withCustomMiddleware method and accessing the customMiddleware readonly field on ISmartAccountProvider - - - meta - - property: og:description - content: Overview of the withCustomMiddleware method and accessing the customMiddleware readonly field on ISmartAccountProvider ---- - -# withCustomMiddleware - -Adds a function to the end of the middleware call stack before signature verification. It can be used to override or add additional functionality. Like modifying the user operation, making an additional RPC call, or logging data. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; - -// Define the custom middleware override function // [!code focus:99] -// The function below just changes the call data for the userOp -// But you can do anything you want here -const CustomMiddlewareOverrideFunction = async (uoStruct) => { - uoStruct.callData = "0xNEW_CALL_DATA"; // Changing the call data - return uoStruct; -}; - -// Add the custom middleware -provider.withCustomMiddleware(CustomMiddlewareOverrideFunction); - -// Defining the user operation data -const userOpData = { - target: "0xTARGET_ADDRESS", // Replace with the actual target address - data: "0xSOME_DATA", // Replace with the actual data -}; - -// function to call buildUserOperation and log the modified callData -const resultingUO = await provider.buildUserOperation(userOpData); -console.log("Modified callData:", resultingUO.callData); -``` - -<<< @/snippets/provider.ts -::: - -## Returns - -### `ISmartAccountProvider` - -An updated instance of the provider, which now uses the custom middleware. - -## Parameters - -### `override: AccountMiddlewareFn` - -The User Operation (UO) transform function that will run as the custom middleware. - -## `customMiddleware` - -The `customMiddleware` is a readonly field that represents the final middleware step in the stack. It allows overriding any of the results returned by previous middlewares, ensuring customized processing of user operations. - -You can access the current middleware configuration for the provider via: - -```ts -const currentMiddleware = provider.customMiddleware; -``` diff --git a/site/packages/aa-core/provider/withFeeDataGetter.md b/site/packages/aa-core/provider/withFeeDataGetter.md deleted file mode 100644 index 254b61fb61..0000000000 --- a/site/packages/aa-core/provider/withFeeDataGetter.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: ISmartAccountProvider • withFeeDataGetter - - - meta - - name: description - content: Overview of the withFeeDataGetter method and accessing the feeDataGetter readonly field on ISmartAccountProvider - - - meta - - property: og:description - content: Overview of the withFeeDataGetter method and accessing the feeDataGetter readonly field on ISmartAccountProvider ---- - -# withFeeDataGetter - -Overrides the default [`feeDataGetter`](#feedatagetter) middleware. This middleware is used for setting the `maxFeePerGas` and `maxPriorityFeePerGas` fields on the `UserOperation` (UO) prior to its execution. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; - -// Define the FeeDataMiddlewareOverrideFunction // [!code focus:99] -const FeeDataMiddlewareOverrideFunction = async () => ({ - // For demonstration purposes, we're setting hardcoded fee values. - // In a real-world scenario, you might fetch these values from a service - // Or make other determinations. - - // Setting the max fee per gas - maxFeePerGas: 100_000_000_000n, - - // Setting the max priority fee per gas - maxPriorityFeePerGas: 100_000_000_000n, -}); - -// Integrate the custom fee data middleware with the provider -provider.withFeeDataGetter(FeeDataMiddlewareOverrideFunction); - -// Define the user operation data -const userOpData = { - target: "0xTARGET_ADDRESS", // Replace with your actual target address - data: "0xSOME_DATA", // Replace with your actual data -}; - -const resultingUO = await provider.buildUserOperation(userOpData); -console.log("Modified maxFeePerGas:", resultingUO.maxFeePerGas); -console.log("Modified maxPriorityFeePerGas:", resultingUO.maxPriorityFeePerGas); -``` - -<<< @/snippets/provider.ts -::: - -## Returns - -### `ISmartAccountProvider` - -An updated instance of the provider, which now uses the overridden `feeDataGetter` middleware. - -## Parameters - -### `override: FeeDataMiddleware` - -A function for overriding the default `feeDataGetter` middleware. This middleware is specifically utilized to set the fee-related fields (`maxFeePerGas` and `maxPriorityFeePerGas`) on the UO before it's executed. - -## `feeDataGetter` - -The `feeDataGetter` is a readonly field on the `ISmartAccountProvider` interface that represents the default fee data getter middleware. It's used to set the fee-related fields on a UO by making calls to the connected `rpcClient` to estimate the maximum priority fee per gas and retrieve fee data. - -You can access the current fee data getter configuration for the provider via: - -```ts -const currentFeeDataGetter = provider.feeDataGetter; -``` diff --git a/site/packages/aa-core/provider/withGasEstimator.md b/site/packages/aa-core/provider/withGasEstimator.md deleted file mode 100644 index ebd44704e7..0000000000 --- a/site/packages/aa-core/provider/withGasEstimator.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: ISmartAccountProvider • withGasEstimator - - - meta - - name: description - content: Overview of the withGasEstimator method on ISmartAccountProvider - - - meta - - property: og:description - content: Overview of the withGasEstimator method on ISmartAccountProvider ---- - -# withGasEstimator - -Override the [`gasEstimator`](#gasEstimator) middleware. - -This middleware is used for setting the `callGasLimit`, `preVerificationGas`, and `verificationGasLimit` fields on the `UserOperation` (UO) prior to its execution. This middleware is between the `feeDataGetter` middleware and the `paymasterDataMiddleware`. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; - -// Define the GasEstimatorMiddlewareOverrideFunction // [!code focus:99] -const GasEstimatorMiddlewareOverrideFunction = async () => { - // For demonstration purposes, we're setting hardcoded gas values. - // In a real-world scenario, you might fetch these values from a service - // Or make other determinations. - return { - callGasLimit: 0n, - preVerificationGas: 0n, - verificationGasLimit: 0n, - }; -}; - -// Integrate the custom gas estimator middleware with the provider -provider.withGasEstimator(GasEstimatorMiddlewareOverrideFunction); - -// Define the user operation data -const userOpData = { - target: "0xTARGET_ADDRESS", // Replace with your actual target address - data: "0xSOME_DATA", // Replace with your actual data -}; - -const resultingUO = await provider.buildUserOperation(userOpData); -console.log("Modified callGasLimit:", resultingUO.callGasLimit); -console.log("Modified preVerificationGas:", resultingUO.preVerificationGas); -console.log("Modified verificationGasLimit:", resultingUO.verificationGasLimit); -``` - -<<< @/snippets/provider.ts -::: - -## Returns - -### `SmartAccountProvider` - -An updated instance of the provider, which now uses the overridden `gasEstimator` middleware. - -## Parameters - -### `override: GasEstimatorMiddleware` - -A function for overriding the default gas estimator middleware. This middleware is specifically utilized to set the gas-related fields (`callGasLimit`, `preVerificationGas`, and `verificationGasLimit`) on the UO before it's executed. - -## `gasEstimator` - -The `gasEstimator` is a readonly field on the `ISmartAccountProvider` interface that represents the default gas estimator middleware. - -It's used to set the gas-related fields on a UO by making calls to the connected `rpcClient` to estimate the user operation gas limits. - -You can access the current fee data getter configuration for the provider via: - -```ts -const currentGasEstimator = provider.gasEstimator; -``` diff --git a/site/packages/aa-core/provider/withPaymasterMiddleware.md b/site/packages/aa-core/provider/withPaymasterMiddleware.md deleted file mode 100644 index 0ff549c480..0000000000 --- a/site/packages/aa-core/provider/withPaymasterMiddleware.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: ISmartAccountProvider • withPaymasterMiddleware - - - meta - - name: description - content: Overview of the withPaymasterMiddleware method on ISmartAccountProvider - - - meta - - property: og:description - content: Overview of the withPaymasterMiddleware method on ISmartAccountProvider ---- - -# withPaymasterMiddleware - -Override the default dummy paymaster data middleware and paymaster data middleware which set the `paymasterAndData` field during `sendUserOperation` calls. - -The `withPaymasterMiddleware` method has two overrides - `dummyPaymasterData` and `paymasterAndData` generator functions. This `dummyPaymasterData` is needed to estimate gas correctly when using a paymaster and is specific to the paymaster you're using. The second override is the actual `paymasterAndData` generator function. This function is called after gas estimation and fee estimation and is used to set the `paymasterAndData` field. The default `dummyPaymasterData` generator function returns `0x` for both the `paymasterAndData` fields. The default `paymasterAndData` generator function returns `0x` for both the `paymasterAndData` fields. - -These middleware are often used together. The dummy paymaster data is used in gas estimation before we actually have paymaster data. Because the paymaster data has an impact on the gas estimation, it's good to supply dummy paymaster data that is valid for your paymaster contract. - -It's recommend to use this middleware if you want more customization over the gas and fee estimation middleware, including setting non-default buffer values for the fee/gas estimation. You can also use `AlchemyProvider`'s [`withAlchemyGasManager`](/packages/aa-alchemy/provider/withAlchemyGasManager) method to simply the interface for these middleware. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; - -// Define the DummyPaymasterDataMiddlewareOverrideFunction // [!code focus:99] -const DummyPaymasterDataMiddlewareOverrideFunction = async (uoStruct) => { - // Return an object like {paymasterAndData: "0x..."} where "0x..." is the valid paymasterAndData for your paymaster contract (used in gas estimation) - // You can even hardcode these dummy singatures - // You can read up more on dummy signatures here: https://www.alchemy.com/blog/dummy-signatures-and-gas-token-transfers - const paymasterAndData = await someFunctionToFetchDummyPaymasterAndData(); - - return { - paymasterAndData, - }; -}; - -// Define the PaymasterDataMiddlewareOverrideFunction // [!code focus:99] -const PaymasterDataMiddlewareOverrideFunction = async (uoStruct) => { - // Return at minimum {paymasterAndData: "0x..."}, can also return gas estimates - const paymasterAndData = await someFunctionToFetchPaymasterAndData(); - - return { - paymasterAndData, - }; -}; - -// Integrate the dummy paymaster data middleware and paymaster data middleware middleware with the provider -provider.withPaymasterMiddleware({ - DummyPaymasterDataMiddlewareOverrideFunction, - PaymasterDataMiddlewareOverrideFunction, -}); - -// Define the user operation data -const userOpData = { - target: "0xTARGET_ADDRESS", // Replace with your actual target address - data: "0xSOME_DATA", // Replace with your actual data -}; - -const resultingUO = await provider.buildUserOperation(userOpData); -console.log("Modified paymasterAndData:", resultingUO.paymasterAndData); -``` - -<<< @/snippets/provider.ts -::: - -## Returns - -### `ISmartAccountProvider` - -An updated instance of the provider, which now uses the overridden `dummyPaymasterDataMiddleware` and/or `paymasterDataMiddleware` middlewares. - -## Parameters - -### `overrides: {dummyPaymasterDataMiddleware, paymasterDataMiddleware}` - -- `dummyPaymasterDataMiddleware?: PaymasterAndDataMiddleware` - `dummyPaymasterData` generator function specific to the paymaster you are using to estimate gas correctly. Default: `0x` for both the `paymasterAndData` fields. You should implement your own middleware to override these or extend this class and provider your own implemenation. -- `paymasterDataMiddleware?: PaymasterAndDataMiddleware` - `paymasterAndData` generator function called after gas estimation and fee estimated used to set the `paymasterAndData` field. Default: `0x` for both the `paymasterAndData` fields. These are dependent on the specific paymaster being used. You should implement your own middleware to override these or extend this class and provider your own implemenation. - -## `dummyPaymasterDataMiddleware` - -The `dummyPaymasterDataMiddleware` is a readonly field on the `ISmartAccountProvider` interface that represents the default dummy paymaster data middleware. It's used to set the `paymasterAndData` fields on a `UserOperation` (UO). - -You can access the current dummy paymaster data middleware configuration for the provider via: - -```ts -const currentDummyPaymasterDataMiddleware = - provider.dummyPaymasterDataMiddleware; -``` - -## `paymasterDataMiddleware` - -The `paymasterDataMiddleware` is a readonly field on the `ISmartAccountProvider` interface that represents the default paymaster data middleware. It's used to set the `paymasterAndData` field on a UO. - -You can access the current paymaster data middleware configuration for the provider via: - -```ts -const currentPaymasterDataMiddleware = provider.paymasterDataMiddleware; -``` diff --git a/site/packages/aa-core/provider/withUOSimulationMiddleware.md b/site/packages/aa-core/provider/withUOSimulationMiddleware.md deleted file mode 100644 index 7f0f2fc848..0000000000 --- a/site/packages/aa-core/provider/withUOSimulationMiddleware.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: ISmartAccountProvider • withUOSimulationMiddleware - - - meta - - name: description - content: Overview of the withUOSimulationMiddleware method and accessing the simulateUOMiddleware readonly field on ISmartAccountProvider - - - meta - - property: og:description - content: Overview of the withUOSimulationMiddleware method and accessing the simulateUOMiddleware readonly field on ISmartAccountProvider ---- - -# withUOSimulationMiddleware - -Adds a function to the end of the middleware call stack to simulate the constructed `UserOperation`. It can be used to override or add additional functionality, but the typical use case would be to simulate the `uoStruct` and throwing an error if the method for simulation fails, or just pass-through the chained `uoStruct` if simulation passes. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./provider"; - -// Define the simulation middleware override function // [!code focus:99] -const SimulateUOMiddlewareOverrideFunction = async (uoStruct) => { - try { - const uoSimResult = await someMethodSimulatingTheUserOperation(); - } catch (e) { - throw new Error(e); - } - - return uoStruct; -}; - -// Add the custom middleware -provider.withUOSimulationMiddleware(SimulateUOMiddlewareOverrideFunction); - -// function to call buildUserOperation which will simulate the user operation -const resultingUO = await provider.buildUserOperation(userOpData); -``` - -<<< @/snippets/provider.ts -::: - -## Returns - -### `ISmartAccountProvider` - -An updated instance of the provider, which now uses the simulation middleware. - -## Parameters - -### `override: AccountMiddlewareFn` - -The User Operation (UO) transform function that will run as the simulation middleware. - -## `simulateUOMiddleware` - -The `simulateUOMiddleware` is a readonly field that represents the final middleware step in the stack. It allows overriding any of the results returned by previous middlewares, but the typical use case would be to simulate the `uoStruct` and throwing an error if the method for simulation fails, and just pass-through the chained `uoStruct` if simulation passes. - -You can access the current `simulateUOMiddleware` configuration for the provider via: - -```ts -const currentMiddleware = provider.simulateUOMiddleware; -``` diff --git a/site/packages/aa-core/provider/buildUserOperation.md b/site/packages/aa-core/smart-account-client/actions/buildUserOperation.md similarity index 64% rename from site/packages/aa-core/provider/buildUserOperation.md rename to site/packages/aa-core/smart-account-client/actions/buildUserOperation.md index 8a59c8940b..4201ca0c24 100644 --- a/site/packages/aa-core/provider/buildUserOperation.md +++ b/site/packages/aa-core/smart-account-client/actions/buildUserOperation.md @@ -31,34 +31,40 @@ Note that `to` field of transaction is required, and among other fields of trans ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] // build single -const uoStruct = await provider.buildUserOperation({ - target: TO_ADDRESS, - data: ENCODED_DATA, - value: VALUE, // optional +const uoStruct = await smartAccountClient.buildUserOperation({ + uo: { + target: TO_ADDRESS, + data: ENCODED_DATA, + value: VALUE, // optional + }, +}); +const { hash: uoHash } = await smartAccountClient.sendUserOperation({ + uo: uoStruct, }); -const { hash: uoHash } = await provider.sendUserOperation(uoStruct); // build batch -const batchedUoStruct = await provider.buildUserOperation([ - { - data: "0xCalldata", - target: "0xTarget", - }, - { - data: "0xCalldata2", - target: "0xTarget2", - value: 1000n, // in wei - }, -]); -const { hash: batchedUoHash } = await provider.sendUserOperation( - batchedUoStruct -); +const batchedUoStruct = await smartAccountClient.buildUserOperation({ + uo: [ + { + data: "0xCalldata", + target: "0xTarget", + }, + { + data: "0xCalldata2", + target: "0xTarget2", + value: 1000n, // in wei + }, + ], +}); +const { hash: batchedUoHash } = await smartAccountClient.sendUserOperation({ + uo: batchedUoStruct, +}); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: ## Returns @@ -69,12 +75,16 @@ A Promise containing the _unsigned_ UO struct resulting from the middleware pipe ## Parameters -### `UserOperationCallData | UserOperationCallData[]` +### `uo: UserOperationCallData | UserOperationCallData[]` - `target: Address` - the target of the call (equivalent to `to` in a transaction) - `data: Hex` - can be either `0x` or a call data string - `value?: bigint` - optionally, set the value in wei you want to send to the target -### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/provider/types/userOperationOverrides.md) +### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/smart-account-client/types/userOperationOverrides.md) Optional parameter where you can specify override values for `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` or `paymasterAndData` on the user operation request + +### `account?: SmartContractAccount` + +If your client was not instantiated with an account, then you will have to pass the account in to this call. diff --git a/site/packages/aa-core/provider/buildUserOperationFromTx.md b/site/packages/aa-core/smart-account-client/actions/buildUserOperationFromTx.md similarity index 79% rename from site/packages/aa-core/provider/buildUserOperationFromTx.md rename to site/packages/aa-core/smart-account-client/actions/buildUserOperationFromTx.md index 78d342f792..f924638334 100644 --- a/site/packages/aa-core/provider/buildUserOperationFromTx.md +++ b/site/packages/aa-core/smart-account-client/actions/buildUserOperationFromTx.md @@ -31,9 +31,9 @@ Note that `to` field of transaction is required, and among other fields of trans ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] -const uoStruct = await provider.buildUserOperationFromTx({ +const uoStruct = await smartAccountClient.buildUserOperationFromTx({ from, // ignored to, data: encodeFunctionData({ @@ -42,10 +42,10 @@ const uoStruct = await provider.buildUserOperationFromTx({ args: [arg1, arg2, ...], }), }); -const uoHash = await provider.sendUserOperation(uoStruct); +const uoHash = await smartAccountClient.sendUserOperation(uoStruct); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: ## Returns @@ -60,6 +60,10 @@ A Promise containing the _unsigned_ UO struct converted from the input transacti The `RpcTransactionRequest` object representing a traditional ethereum transaction -### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/provider/types/userOperationOverrides.md) +### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/smart-account-client/types/userOperationOverrides.md) Optional parameter where you can specify override values for `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` or `paymasterAndData` on the user operation request + +### `account?: SmartContractAccount` + +If your client was not instantiated with an account, then you will have to pass the account in to this call. diff --git a/site/packages/aa-core/provider/checkGasSponsorshipEligibility.md b/site/packages/aa-core/smart-account-client/actions/checkGasSponsorshipEligibility.md similarity index 84% rename from site/packages/aa-core/provider/checkGasSponsorshipEligibility.md rename to site/packages/aa-core/smart-account-client/actions/checkGasSponsorshipEligibility.md index 3a1e6823c3..d93d7cccbf 100644 --- a/site/packages/aa-core/provider/checkGasSponsorshipEligibility.md +++ b/site/packages/aa-core/smart-account-client/actions/checkGasSponsorshipEligibility.md @@ -27,9 +27,9 @@ For a deeper understanding of how to employ this method to provide varied user e ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] -const eligible = await provider.checkGasSponsorshipEligibility({ +const eligible = await smartAccountClient.checkGasSponsorshipEligibility({ data: "0xCalldata", target: "0xTarget", value: 0n, @@ -42,7 +42,7 @@ console.log( ); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: ## Returns @@ -59,6 +59,10 @@ A Promise containing the boolean value indicating whether the UO to be sent is e - `data: Hex` - can be either `0x` or a call data string - `value?: bigint` - optionally, set the value in wei you want to send to the target -### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/provider/types/userOperationOverrides.md) +### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/smart-account-client/types/userOperationOverrides.md) Optional parameter where you can specify override values for `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` or `paymasterAndData` on the user operation request + +### `account?: SmartContractAccount` + +If your client was not instantiated with an account, then you will have to pass the account in to this call. diff --git a/site/packages/aa-core/provider/dropAndReplaceUserOperation.md b/site/packages/aa-core/smart-account-client/actions/dropAndReplaceUserOperation.md similarity index 69% rename from site/packages/aa-core/provider/dropAndReplaceUserOperation.md rename to site/packages/aa-core/smart-account-client/actions/dropAndReplaceUserOperation.md index e3bf32dde5..c62d2ac469 100644 --- a/site/packages/aa-core/provider/dropAndReplaceUserOperation.md +++ b/site/packages/aa-core/smart-account-client/actions/dropAndReplaceUserOperation.md @@ -21,20 +21,21 @@ Attempts to drop and replace an existing user operation by increasing fees. The ::: code-group ```ts [example.ts] -import { provider } from "./provider"; - -const { request } = await provider.sendUserOperation({ - data: "0xCalldata", - target: "0xTarget", - value: 0n, +import { smartAccountClient } from "./smartAccountClient"; + +const { request } = await smartAccountClient.sendUserOperation({ + uo: { + data: "0xCalldata", + target: "0xTarget", + value: 0n, + }, }); -const { hash: replacedHash } = await provider.dropAndReplaceUserOperation( - request -); +const { hash: replacedHash } = + await smartAccountClient.dropAndReplaceUserOperation(request); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: ## Returns @@ -51,6 +52,10 @@ A Promise containing the hash of the user operation and the request that was sen A previously submitted `UserOperation`. -### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/provider/types/userOperationOverrides.md) +### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/smart-account-client/types/userOperationOverrides.md) Optional parameter where you can specify override values for `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` or `paymasterAndData` on the user operation request + +### `account?: SmartContractAccount` + +If your client was not instantiated with an account, then you will have to pass the account in to this call. diff --git a/site/packages/aa-core/provider/getAddress.md b/site/packages/aa-core/smart-account-client/actions/getAddress.md similarity index 65% rename from site/packages/aa-core/provider/getAddress.md rename to site/packages/aa-core/smart-account-client/actions/getAddress.md index c5d8cf1796..0c6cc42cf5 100644 --- a/site/packages/aa-core/provider/getAddress.md +++ b/site/packages/aa-core/smart-account-client/actions/getAddress.md @@ -21,12 +21,12 @@ Returns the address of the connected account. Throws error if there is no connec ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] -const address = await provider.getAddress(); +const address = await smartAccountClient.getAddress(); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: @@ -35,3 +35,9 @@ const address = await provider.getAddress(); ### `Promise
` A Promise that resolves to the address of the connected account + +## Parameters + +### `account?: SmartContractAccount` + +If your client was not instantiated with an account, then you will have to pass the account in to this call. diff --git a/site/packages/aa-core/provider/getUserOperationByHash.md b/site/packages/aa-core/smart-account-client/actions/getUserOperationByHash.md similarity index 81% rename from site/packages/aa-core/provider/getUserOperationByHash.md rename to site/packages/aa-core/smart-account-client/actions/getUserOperationByHash.md index fd9dc91daa..aae62a49a5 100644 --- a/site/packages/aa-core/provider/getUserOperationByHash.md +++ b/site/packages/aa-core/smart-account-client/actions/getUserOperationByHash.md @@ -21,12 +21,12 @@ Return a `UserOperation` (UO) based on a hash (userOpHash). ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] -provider.getUserOperationByHash("0xUserOpResultHash"); +smartAccountClient.getUserOperationByHash({ hash: "0xUserOpResultHash" }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: diff --git a/site/packages/aa-core/provider/getUserOperationReceipt.md b/site/packages/aa-core/smart-account-client/actions/getUserOperationReceipt.md similarity index 82% rename from site/packages/aa-core/provider/getUserOperationReceipt.md rename to site/packages/aa-core/smart-account-client/actions/getUserOperationReceipt.md index 259ae1f0c7..e9a92967eb 100644 --- a/site/packages/aa-core/provider/getUserOperationReceipt.md +++ b/site/packages/aa-core/smart-account-client/actions/getUserOperationReceipt.md @@ -21,12 +21,12 @@ Return a UserOperationReceipt based on a hash (userOpHash). ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] -provider.getUserOperationReceipt("0xUserOpResultHash"); +smartAccountClient.getUserOperationReceipt({ hash: "0xUserOpResultHash" }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: diff --git a/site/packages/aa-core/provider/request.md b/site/packages/aa-core/smart-account-client/actions/request.md similarity index 83% rename from site/packages/aa-core/provider/request.md rename to site/packages/aa-core/smart-account-client/actions/request.md index 41096d7d53..25e34d65d0 100644 --- a/site/packages/aa-core/provider/request.md +++ b/site/packages/aa-core/smart-account-client/actions/request.md @@ -21,25 +21,25 @@ head: ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] -const result = await provider.request({ +const result = await smartAccountClient.request({ method: "eth_sendTransaction", params: [tx], }); -const result = await provider.request({ +const result = await smartAccountClient.request({ method: "eth_sign", params: [address, data], }); -const result = await provider.request({ +const result = await smartAccountClient.request({ method: "eth_signTypedData_v4", params: [address, dataParams], }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: diff --git a/site/packages/aa-core/provider/sendTransaction.md b/site/packages/aa-core/smart-account-client/actions/sendTransaction.md similarity index 76% rename from site/packages/aa-core/provider/sendTransaction.md rename to site/packages/aa-core/smart-account-client/actions/sendTransaction.md index b25305778d..93eeb288cb 100644 --- a/site/packages/aa-core/provider/sendTransaction.md +++ b/site/packages/aa-core/smart-account-client/actions/sendTransaction.md @@ -25,9 +25,9 @@ Note that `to` field of transaction is required, and among other fields of trans ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] -const txHash = await provider.sendTransaction({ +const txHash = await smartAccountClient.sendTransaction({ from, // ignored to, data: encodeFunctionData({ @@ -38,7 +38,7 @@ const txHash = await provider.sendTransaction({ }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: @@ -50,10 +50,14 @@ A Promise containing the transaction hash ## Parameters -### `request: RpcTransactionRequest` +### `...request: RpcTransactionRequest` The `RpcTransactionRequest` object representing a traditional ethereum transaction -### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/provider/types/userOperationOverrides.md) +### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/smart-account-client/types/userOperationOverrides.md) Optional parameter where you can specify override values for `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` or `paymasterAndData` on the user operation request + +### `account?: SmartContractAccount` + +If your client was not instantiated with an account, then you will have to pass the account in to this call. diff --git a/site/packages/aa-core/provider/sendTransactions.md b/site/packages/aa-core/smart-account-client/actions/sendTransactions.md similarity index 80% rename from site/packages/aa-core/provider/sendTransactions.md rename to site/packages/aa-core/smart-account-client/actions/sendTransactions.md index 011acd3f0a..5fb9fce4db 100644 --- a/site/packages/aa-core/provider/sendTransactions.md +++ b/site/packages/aa-core/smart-account-client/actions/sendTransactions.md @@ -25,9 +25,9 @@ Also note that `to` field of transaction is required, and among other fields of ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] -const txHash = await provider.sendTransactions([ +const txHash = await smartAccountClient.sendTransactions({requests: [ { from, // ignored to, @@ -56,10 +56,10 @@ const txHash = await provider.sendTransactions([ args: [arg1, arg2, ...], }), }, -]); +]}); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: @@ -71,10 +71,14 @@ A Promise containing the transaction hash ## Parameters -### `request: RpcTransactionRequest[]` +### `requests: RpcTransactionRequest[]` An `RpcTransactionRequest` array representing a traditional ethereum transaction -### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/provider/types/userOperationOverrides.md) +### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/smart-account-client/types/userOperationOverrides.md) Optional parameter where you can specify override values for `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` or `paymasterAndData` on the user operation request + +### `account?: SmartContractAccount` + +If your client was not instantiated with an account, then you will have to pass the account in to this call. diff --git a/site/packages/aa-core/provider/sendUserOperation.md b/site/packages/aa-core/smart-account-client/actions/sendUserOperation.md similarity index 76% rename from site/packages/aa-core/provider/sendUserOperation.md rename to site/packages/aa-core/smart-account-client/actions/sendUserOperation.md index 3ce27cd3cf..83b1873c9a 100644 --- a/site/packages/aa-core/provider/sendUserOperation.md +++ b/site/packages/aa-core/smart-account-client/actions/sendUserOperation.md @@ -29,30 +29,34 @@ Before executing, sendUserOperation will run the user operation through the midd ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] // send single -provider.sendUserOperation({ - data: "0xCalldata", - target: "0xTarget", - value: 0n, -}); - -// send batch -provider.sendUserOperation([ - { +smartAccountClient.sendUserOperation({ + uo: { data: "0xCalldata", target: "0xTarget", + value: 0n, }, - { - data: "0xCalldata2", - target: "0xTarget2", - value: 1000n, // in wei - }, -]); +}); + +// send batch +smartAccountClient.sendUserOperation({ + uo: [ + { + data: "0xCalldata", + target: "0xTarget", + }, + { + data: "0xCalldata2", + target: "0xTarget2", + value: 1000n, // in wei + }, + ], +}); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: ## Returns @@ -73,6 +77,10 @@ A Promise containing the hash of the user operation and the request that was sen - `data: Hex` - can be either `0x` or a call data string - `value?: bigint` - optionally, set the value in wei you want to send to the target -### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/provider/types/userOperationOverrides.md) +### `overrides?:` [`UserOperationOverrides`](/packages/aa-core/smart-account-client/types/userOperationOverrides.md) Optional parameter where you can specify override values for `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` or `paymasterAndData` on the user operation request + +### `account?: SmartContractAccount` + +If your client was not instantiated with an account, then you will have to pass the account in to this call. diff --git a/site/packages/aa-core/provider/signMessage.md b/site/packages/aa-core/smart-account-client/actions/signMessage.md similarity index 57% rename from site/packages/aa-core/provider/signMessage.md rename to site/packages/aa-core/smart-account-client/actions/signMessage.md index eb07407223..03b5cbd254 100644 --- a/site/packages/aa-core/provider/signMessage.md +++ b/site/packages/aa-core/smart-account-client/actions/signMessage.md @@ -21,12 +21,12 @@ This method signs messages using the connected account with [ERC-191](https://ei ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] -const signedMessage = await provider.signMessage("msg"); +const signedMessage = await smartAccountClient.signMessage({ message: "msg" }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: @@ -38,6 +38,10 @@ The signed hash for the message passed ## Parameters -### `msg: string | Uint8Array` +### `message: SignableMessage` -Message to be signed +Message to be signed represented as a viem [`SignableMessage`](https://viem.sh/docs/actions/wallet/signMessage.html#signmessage) + +### `account?: SmartContractAccount` + +If your client was not instantiated with an account, then you will have to pass the account in to this call. diff --git a/site/packages/aa-core/provider/signMessageWith6492.md b/site/packages/aa-core/smart-account-client/actions/signMessageWith6492.md similarity index 73% rename from site/packages/aa-core/provider/signMessageWith6492.md rename to site/packages/aa-core/smart-account-client/actions/signMessageWith6492.md index 99d11eaffe..6566ac17e1 100644 --- a/site/packages/aa-core/provider/signMessageWith6492.md +++ b/site/packages/aa-core/smart-account-client/actions/signMessageWith6492.md @@ -21,13 +21,15 @@ This method supports signing messages for deployed smart accounts, as well as un ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] // sign message (works for undeployed and deployed accounts) -const signedMessageWith6492 = provider.signMessageWith6492("test"); +const signedMessageWith6492 = smartAccountClient.signMessageWith6492({ + message: "test", +}); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: @@ -42,3 +44,7 @@ A Promise containing the signature of the message, additionally wrapped in EIP-6 ### `msg: string | Uint8Array` The message to sign + +### `account?: SmartContractAccount` + +If your client was not instantiated with an account, then you will have to pass the account in to this call. diff --git a/site/packages/aa-core/provider/signTypedData.md b/site/packages/aa-core/smart-account-client/actions/signTypedData.md similarity index 84% rename from site/packages/aa-core/provider/signTypedData.md rename to site/packages/aa-core/smart-account-client/actions/signTypedData.md index 6751ebd990..0dea19254c 100644 --- a/site/packages/aa-core/provider/signTypedData.md +++ b/site/packages/aa-core/smart-account-client/actions/signTypedData.md @@ -21,10 +21,10 @@ This method signs sign typed data using the connected account with [ERC-712](htt ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] // sign typed data -const signedTypedData = provider.signTypedData({ +const signedTypedData = smartAccountClient.signTypedData({ domain: { name: "Ether Mail", version: "1", @@ -57,7 +57,7 @@ const signedTypedData = provider.signTypedData({ }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: @@ -75,3 +75,7 @@ A Promise containing the signature of the typed data - `types: Object` -- the type definitions for the typed data - `primaryType: inferred String` -- the primary type to extract from types and use in value - `message: inferred from types & primaryType` -- the message, inferred from + +### `account?: SmartContractAccount` + +If your client was not instantiated with an account, then you will have to pass the account in to this call. diff --git a/site/packages/aa-core/provider/signTypedDataWith6492.md b/site/packages/aa-core/smart-account-client/actions/signTypedDataWith6492.md similarity index 85% rename from site/packages/aa-core/provider/signTypedDataWith6492.md rename to site/packages/aa-core/smart-account-client/actions/signTypedDataWith6492.md index b97b4d8c87..1c0f33dd56 100644 --- a/site/packages/aa-core/provider/signTypedDataWith6492.md +++ b/site/packages/aa-core/smart-account-client/actions/signTypedDataWith6492.md @@ -21,10 +21,10 @@ This method supports signing typed data for deployed smart accounts, as well as ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./smartAccountClient"; // [!code focus:99] // sign typed data (works for undeployed and deployed accounts) -const signedTypedDataWith6492 = provider.signTypedDataWith6492({ +const signedTypedDataWith6492 = smartAccountClient.signTypedDataWith6492({ domain: { name: "Ether Mail", version: "1", @@ -57,7 +57,7 @@ const signedTypedDataWith6492 = provider.signTypedDataWith6492({ }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: @@ -77,3 +77,7 @@ The typed data to sign - `types: Object` -- the type definitions for the typed data - `primaryType: inferred String` -- the primary type to extract from types and use in value - `message: inferred from types & primaryType` -- the message, inferred from + +### `account?: SmartContractAccount` + +If your client was not instantiated with an account, then you will have to pass the account in to this call. diff --git a/site/packages/aa-core/provider/waitForUserOperationTransaction.md b/site/packages/aa-core/smart-account-client/actions/waitForUserOperationTransaction.md similarity index 75% rename from site/packages/aa-core/provider/waitForUserOperationTransaction.md rename to site/packages/aa-core/smart-account-client/actions/waitForUserOperationTransaction.md index da029b5098..cfcc514b97 100644 --- a/site/packages/aa-core/provider/waitForUserOperationTransaction.md +++ b/site/packages/aa-core/smart-account-client/actions/waitForUserOperationTransaction.md @@ -16,28 +16,30 @@ head: Attempts to fetch for UserOperationReceipt `txMaxRetries` amount of times, at an interval of `txRetryIntervalMs` milliseconds (with a multiplier of `txRetryMulitplier`) using the connected account. -Note: For more details on how to modify the retry configurations for this method, see the [constructor](/packages/aa-core/provider/constructor.md) parameters. +Note: For more details on how to modify the retry configurations for this method, see the [constructor](/packages/aa-core/smart-account-client/index.md) parameters. ## Usage ::: code-group ```ts [example.ts] -import { provider } from "./provider"; +import { smartAccountClient } from "./provider"; // [!code focus:99] -const userOperationResult = await provider.sendUserOperation({ - data: "0xCalldata", - target: "0xTarget", - value: 0n, +const userOperationResult = await smartAccountClient.sendUserOperation({ + uo: { + data: "0xCalldata", + target: "0xTarget", + value: 0n, + }, }); // [!code focus:99] -const txHash = await provider.waitForUserOperationTransaction({ +const txHash = await smartAccountClient.waitForUserOperationTransaction({ hash: userOperationResult.hash, }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: ## Returns diff --git a/site/packages/aa-core/smart-account-client/index.md b/site/packages/aa-core/smart-account-client/index.md new file mode 100644 index 0000000000..f9ca8287c9 --- /dev/null +++ b/site/packages/aa-core/smart-account-client/index.md @@ -0,0 +1,134 @@ +--- +outline: deep +head: + - - meta + - property: og:title + content: SmartAccountClient + - - meta + - name: description + content: Introduction to SmartAccountClient exported by aa-core provider + - - meta + - property: og:description + content: Introduction to SmartAccountClient exported by aa-core provider +--- + +# Smart Account Client + +The `SmartAccountClient` is an [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) compliant Provider that wraps JSON RPC methods and some Wallet Methods (signing, sendTransaction, etc). With this Client, you can submit User Operations to RPC providers, estimate gas, configure a Paymaster, send standard JSON RPC requests, and more. It is not opinionated about which RPC provider you are using and is configurable to work with any RPC provider. Because it implements EIP-1193, it can be used with any web3 library. + +The `SmartAccountClient` is also an extension of the `viem` [`Client`](https://viem.sh/docs/clients/custom) class. + +## Import + +```ts +import { createSmartAccountClient } from "@alchemy/aa-core"; +// OR +import { createSmartAccountClientFromExisting } from "@alchemy/aa-core"; +``` + +## Usage + +Initialize a `SmartAcountClient` with your desired Chain and Transport using `createSmartAccountClient`, or use `createSmartAccountClientFromExisting` if you already have a [`BundlerClient`](/packages/aa-core/bundler-client/index) available +::: code-group + +```ts [createSmartAccountClient.ts] +import { createSmartAccountClient } from "@alchemy/aa-core"; +import { createLightAccount } from "@alchemy/aa-accounts"; +import { http } from "viem"; +import { sepolia } from "@alchemy/aa-core"; + +export const smartAccountClient = new createSmartAccountClient({ + transport: http("ALCHEMY_RPC_URL"), + chain: sepolia, + // optionally provide an account to use as context + account: await createLightAccount(lightAccountParams), +}); + +const result = await smartAccountClient.sendUserOperation({ + uo: { target: "0xaddress", data: "0x", value: 0n }, + // if you didn't pass in an account above then: + account: await createLightAccount(lightAccountParams), +}); +``` + +```ts [createSmartAccountClientFromExisting.ts] +import { + createBundlerClient, + createSmartAccountClientFromExisting, +} from "@alchemy/aa-core"; +import { http } from "viem"; +import { sepolia } from "@alchemy/aa-core"; + +// This client only has methods for directly interacting with public RPC endpoints +const bundlerClient = createBundlerClient({ + transport: http("ALCHEMY_RPC_URL"), + chain: sepolia, +}); + +const smartAccountClient = createSmartAccountClientFromExisting({ + client: bundlerClient, + // optionally provide an account to use as context + account: await createLightAccount(lightAccountParams), +}); + +const result = await smartAccountClient.sendUserOperation({ + uo: { target: "0xaddress", data: "0x", value: 0n }, + // if you didn't pass in an account above then: + account: await createLightAccount(lightAccountParams), +}); +``` + +::: + +## Returns + +### `SmartAccountClient` + +A new instance of a `SmartAccountClient`. + +## Parameters + +### `config: SmartAccountClientConfig` + +#### If using `createSmartAccountClient`: + +- `transport: Transport` -- a viem [Transport](https://viem.sh/docs/clients/intro#transports) that defines how you want to interact with a JSON-RPC provider. + +- `chain: Chain` -- the chain on which to create the provider. + +#### If using `createSmartAccountClientFromExisting`: + +- `client: BundlerClient` -- a [bundler client](/packages/aa-core/bundler-client/index) instance that will be used to communicate with an RPC provider that supports Ethereum RPC methods. + +#### Common to both: + +- `account?: SmartContractAccount` -- [optional] the smart account to use as context for all of your calls. If not provided, then the account can be provided to each individual call instead. + +- `entryPointAddress: Address | undefined` -- [optional] the entry point contract address. If not provided, the entry point contract address for the provider is the connected account's entry point contract, or if not connected, falls back to the default entry point contract for the chain. See [getDefaultEntryPointAddress](/packages/aa-core/utils/getDefaultEntryPointAddress.html#getdefaultentrypointaddress). + +- `dummyPaymasterAndData?: ClientMiddlewareFn` -- [optional] an override for the dummy paymaster and data middleware. This is useful if you want to use a paymaster. The `dummyPaymasterAndData` middleware function is run before all other middlewares and is used during gas and fee estimation. It should be a value that does not cause your paymaster to revert. + +- `feeEstimator?: ClientMiddlewareFn` -- [optional] an override for the fee estimator middleware. The `feeEstimator` middleware function calculates `maxFeePerGas` and `maxPriorityFeePerGas` for your User Operation. + +- `gasEstimator?: ClientMiddlewareFn` -- [optional] an override for the gas estimator middleware. The `gasEstimator` middleware function calculates the gas fields of your User Operation. + +- `customMiddleware?: ClientMiddlewareFn` -- [optional] if you would like to run a custom transformation on your User Operation after Gas and Fee estimation, but before your paymaster is called, you can provide a custom middleware function here. + +- `paymasterAndData?: ClientMiddlewareFn` -- [optional] if you owuld like to use a paymaster, then this middleware must be supplied in conjunction with the above `dummyPaymasterAndData` middleware. This middleware runs after gas and fee estimation and should generate the `paymasterAndData` field that will be used to sponsor your user operation. + +- `opts: SmartAccountProviderOpts | undefined` -- [optional] overrides on provider config variables having to do with fetching transaction receipts and fee computation. + + - `txMaxRetries: string | undefined` -- [optional] the maximum number of times to try fetching a transaction receipt before giving up (default: 5). + + - `txRetryIntervalMs: string | undefined` -- [optional] the interval in milliseconds to wait between retries while waiting for transaction receipts (default: 2_000). + + - `txRetryMulitplier: string | undefined` -- [optional] the mulitplier on interval length to wait between retries while waiting for transaction receipts (default: 1.5). + + - `feeOptions:` [`UserOperationFeeOptions`](/packages/aa-core/smart-account-client/types/userOperationFeeOptions.md) `| undefined` --[optional] user operation fee options to be used for gas estimation, set at the global level on the provider. + If not set, default fee options for the chain are used. Available fields in `feeOptions` include `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` where each field is of type [`UserOperationFeeOptionsField`](/packages/aa-core/smart-account-client/types/userOperationFeeOptionsField.md). + + - `maxFeePerGas`: `UserOperationFeeOptionsField` + - `maxPriorityFeePerGas`: `UserOperationFeeOptionsField` + - `callGasLimit`: `UserOperationFeeOptionsField` + - `verificationGasLimit`: `UserOperationFeeOptionsField` + - `preVerificationGas`: `UserOperationFeeOptionsField` diff --git a/site/packages/aa-core/provider/types/userOperationFeeOptions.md b/site/packages/aa-core/smart-account-client/types/userOperationFeeOptions.md similarity index 92% rename from site/packages/aa-core/provider/types/userOperationFeeOptions.md rename to site/packages/aa-core/smart-account-client/types/userOperationFeeOptions.md index c585702917..4b67bb6541 100644 --- a/site/packages/aa-core/provider/types/userOperationFeeOptions.md +++ b/site/packages/aa-core/smart-account-client/types/userOperationFeeOptions.md @@ -14,7 +14,7 @@ head: # UserOperationFeeOptions -Fee options object type used by the [`SmartAccountProvider`](/packages/aa-core/provider/constructor.md) during the gas fee calculation middlewares when constructing the user operation to send. +Fee options object type used by the [`SmartAccountProvider`](/packages/aa-core/smart-account-client/index.md) during the gas fee calculation middlewares when constructing the user operation to send. For example, if the below example `UserOperationFeeOptions` is set on the provider upon initialization, the `maxPriorityFeePerGas` field on the user operation will be set as the max value between the 50% buffered `maxPriorityFeePerGas` estimate and the the min `maxPriorityFeePerGas` value specified here, `100_000_000n`. diff --git a/site/packages/aa-core/provider/types/userOperationFeeOptionsField.md b/site/packages/aa-core/smart-account-client/types/userOperationFeeOptionsField.md similarity index 72% rename from site/packages/aa-core/provider/types/userOperationFeeOptionsField.md rename to site/packages/aa-core/smart-account-client/types/userOperationFeeOptionsField.md index b1a619ff97..56c2c33d40 100644 --- a/site/packages/aa-core/provider/types/userOperationFeeOptionsField.md +++ b/site/packages/aa-core/smart-account-client/types/userOperationFeeOptionsField.md @@ -14,9 +14,9 @@ head: # UserOperationFeeOptionsField -Merged type of [`BigNumberishRange`](/glossary/types.md#bignumberishrange) with [`Percentage`](/glossary/types.md#percentage) type that can be used as [`UserOperationFeeOptions`](./userOperationFeeOptions.md) fields for the [`SmartAccountProvider`](/packages/aa-core/provider/constructor.md) to use during the gas fee calculation middlewares when constructing the user operation to send. +Merged type of [`BigNumberishRange`](/glossary/types.md#bignumberishrange) with [`Percentage`](/glossary/types.md#percentage) type that can be used as [`UserOperationFeeOptions`](./userOperationFeeOptions.md) fields for the [`SmartAccountProvider`](/packages/aa-core/smart-account-client/index.md) to use during the gas fee calculation middlewares when constructing the user operation to send. -For example, if the below example `UserOperationFeeOptionsField` is set as the fee option for the `maxPriorityFeePerGas` field of [`UserOperationFeeOptions`](./userOperationFeeOptions.md), then the [`SmartAccountProvider`](/packages/aa-core/provider/constructor.md) will apply 50% buffer to the estimated `maxPriorityFeePerGas`, then set the `maxPriorityFeePerGas` on the user operation as the larger value between the buffered `maxPriorityFeePerGas` fee and the min `maxPriorityFeePerGas` which is `100_000_000n` here. +For example, if the below example `UserOperationFeeOptionsField` is set as the fee option for the `maxPriorityFeePerGas` field of [`UserOperationFeeOptions`](./userOperationFeeOptions.md), then the [`SmartAccountProvider`](/packages/aa-core/smart-account-client/index.md) will apply 50% buffer to the estimated `maxPriorityFeePerGas`, then set the `maxPriorityFeePerGas` on the user operation as the larger value between the buffered `maxPriorityFeePerGas` fee and the min `maxPriorityFeePerGas` which is `100_000_000n` here. ```ts /* diff --git a/site/packages/aa-core/provider/types/userOperationOverrides.md b/site/packages/aa-core/smart-account-client/types/userOperationOverrides.md similarity index 86% rename from site/packages/aa-core/provider/types/userOperationOverrides.md rename to site/packages/aa-core/smart-account-client/types/userOperationOverrides.md index 3dd0f07d32..8aa64a6cee 100644 --- a/site/packages/aa-core/provider/types/userOperationOverrides.md +++ b/site/packages/aa-core/smart-account-client/types/userOperationOverrides.md @@ -18,14 +18,14 @@ next: Contains override values to be applied on the user operation reqeust to be constructed or sent. Available fields include `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` or `paymasterAndData`. -These override values are available from each middleware of the `SmartAccountProvider`. For example, the default middlewares such as [`gasEstimator`](/packages/aa-core/provider/withGasEstimator.md) or [`feeDataGetter`](/packages/aa-core/provider/withFeeDataGetter.md) apply the overrides values to the estimated values if the override values are provided. +These override values are available from each middleware of the `SmartAccountProvider`. For example, the default middlewares such as `gasEstimator` or `feeEstimator` apply the overrides values to the estimated values if the override values are provided. Other than the `paymasterAndData` field, the override fields could be either the absolute value or the percentage value. In the default middlewares, if the override value is an absolute value, it simply overrides the estimated value. If the override value is a percentage value, the estimated value is _bumped_ with the indicated percentage value. For example, if the override value is `{ percentage: 10 }` for the `maxPriorityFeePerGas` field, then 10% bump is applied to the estimated `maxPriorityFeePerGas` of the user operation. The `paymasterAndData` only allows an absolute value override, and if the override value is provided, then the paymaster middleware is bypassed entirely. Refer to our guide [How to Handle User Operations that are Not Eligible for Gas Sponsorship](/tutorials/sponsoring-gas/gas-sponsorship-eligibility.md) on the example of using the `paymasterAndData` override to bypass the paymaster middleware to fallback to the user paying the gas fee instead of the gas being subsidized by the paymaster. :::tip Note -Note that if you are using your own middleware, for example a custom `feeDataGetter` using [`withFeeDataGetter`](/packages/aa-core/provider/withFeeDataGetter.md) method on the provider, then the default `feeDataGetter` middleware is overriden. As you are opting out of using the default middleware, you are also responsible for handling the `UserOperationOverrides` appropriately. +Note that if you are using your own middleware, for example a custom `feeEstimator` using config method on the client, then the default `feeEstimator` middleware is overriden. As you are opting out of using the default middleware, you are also responsible for handling the `UserOperationOverrides` appropriately. ::: ```ts @@ -86,6 +86,6 @@ const txHash = await provider.waitForUserOperationTransaction({ }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: diff --git a/site/packages/aa-ethers/account-signer/getBundlerClient.md b/site/packages/aa-ethers/account-signer/getBundlerClient.md new file mode 100644 index 0000000000..18b11c455e --- /dev/null +++ b/site/packages/aa-ethers/account-signer/getBundlerClient.md @@ -0,0 +1,37 @@ +--- +outline: deep +head: + - - meta + - property: og:title + content: AccountSigner • getBundlerClient + - - meta + - name: description + content: Overview of the getBundlerClient method on AccountSigner in aa-ethers + - - meta + - property: og:description + content: Overview of the getBundlerClient method on AccountSigner in aa-ethers +--- + +# getBundlerClient + +`getBundlerClient` is a method on `AccountSigner` that gets the underlying viem client which has [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) capability. + +## Usage + +::: code-group + +```ts [example.ts] +import { signer } from "./ethers-signer"; + +// get the signer's underlying viem client with EIP-4337 capabilties +const client = signer.getBundlerClient(); +``` + +<<< @/snippets/ethers-signer.ts +::: + +## Returns + +### `BundlerClient` + +The provider's underlying `BundlerClient` diff --git a/site/packages/aa-ethers/account-signer/getPublicErc4337Client.md b/site/packages/aa-ethers/account-signer/getPublicErc4337Client.md deleted file mode 100644 index 6f5a22db94..0000000000 --- a/site/packages/aa-ethers/account-signer/getPublicErc4337Client.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: AccountSigner • getPublicErc4337Client - - - meta - - name: description - content: Overview of the getPublicErc4337Client method on AccountSigner in aa-ethers - - - meta - - property: og:description - content: Overview of the getPublicErc4337Client method on AccountSigner in aa-ethers ---- - -# getPublicErc4337Client - -`getPublicErc4337Client` is a method on `AccountSigner` that gets the underlying viem client which has [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) capability. - -## Usage - -::: code-group - -```ts [example.ts] -import { signer } from "./ethers-signer"; - -// get the signer's underlying viem client with EIP-4337 capabilties -const client = signer.getPublicErc4337Client(); -``` - -<<< @/snippets/ethers-signer.ts -::: - -## Returns - -### `PublicErc4337Client` - -The provider's underlying `PublicErc4337Client` diff --git a/site/packages/aa-ethers/account-signer/introduction.md b/site/packages/aa-ethers/account-signer/introduction.md index 520bb6de98..d257409303 100644 --- a/site/packages/aa-ethers/account-signer/introduction.md +++ b/site/packages/aa-ethers/account-signer/introduction.md @@ -21,7 +21,7 @@ Notable differences between `EthersProviderAdapter` and `JsonRpcProvider` are im 1. [`getAddress`](/packages/aa-ethers/account-signer/getAddress) -- gets the `AccountSigner`'s smart account address. 2. [`signMessage`](/packages/aa-ethers/account-signer/signMessage) -- signs messages with the `AccountSigner`'s owner address. 3. [`sendTransaction`](/packages/aa-ethers/account-signer/sendTransaction) -- sends transactions on behalf of the `AccountSigner`'s smart account, with request and response formatted as if you were using the ethers.js library. -4. [`getPublicErc4337Client`](/packages/aa-ethers/account-signer/getPublicErc4337Client) -- gets the underlying viem cliemt with ERC-4337 compatability. +4. [`getBundlerClient`](/packages/aa-ethers/account-signer/getBundlerClient) -- gets the underlying viem cliemt with ERC-4337 compatability. 5. [`connect`](/packages/aa-ethers/account-signer/connect) -- connects the inputted provider to an account and returns an `AccountSigner`. ## Usage @@ -44,7 +44,7 @@ const txn = await signer.sendTransaction({ }); // get the signer's underlying viem client with EIP-4337 capabilties -const client = signer.getPublicErc4337Client(); +const client = signer.getBundlerClient(); ``` <<< @/snippets/ethers-signer.ts diff --git a/site/packages/aa-ethers/provider-adapter/connectToAccount.md b/site/packages/aa-ethers/provider-adapter/connectToAccount.md index 14597289e9..415d78b61a 100644 --- a/site/packages/aa-ethers/provider-adapter/connectToAccount.md +++ b/site/packages/aa-ethers/provider-adapter/connectToAccount.md @@ -26,12 +26,12 @@ head: ## Returns -### `AccountSigner` +### `AccountSigner` -A new instance of a connected `AccountSigner`for any implementation class of `ISmartContractAccount` +A new instance of a connected `AccountSigner`for any implementation class of `SmartContractAccount` ## Parameters -### `fn: (rpcClient: PublicErc4337Client) => TAccount extends ISmartContractAccount` +### `account: TAccount extends SmartContractAccount` A function that takes in the provider's rpcClient and returns an AccountSigner diff --git a/site/packages/aa-ethers/provider-adapter/constructor.md b/site/packages/aa-ethers/provider-adapter/constructor.md index 72e5786edb..74d68968a2 100644 --- a/site/packages/aa-ethers/provider-adapter/constructor.md +++ b/site/packages/aa-ethers/provider-adapter/constructor.md @@ -70,10 +70,10 @@ A new instance of an `EthersProviderAdapter`. Either: -- `rpcProvider: string | PublicErc4337Client` -- a JSON-RPC URL, or a viem Client that supports ERC-4337 methods and Viem public actions. See [createPublicErc4337Client](/packages/aa-core/client/createPublicErc4337Client.md). +- `rpcProvider: string | BundlerClient` -- a JSON-RPC URL, or a viem Client that supports ERC-4337 methods and Viem public actions. See [createBundlerClient](/packages/aa-core/bundler-client/index.md). - `chainId: number` -- the ID of thechain on which to create the provider. Or: -- `accountProvider: SmartAccountProvider` -- See [SmartAccountProvider](/packages/aa-core/provider/constructor.md). +- `accountProvider: SmartAccountProvider` -- See [SmartAccountProvider](/packages/aa-core/smart-account-client/index.md). diff --git a/site/packages/aa-ethers/provider-adapter/getBundlerClient.md b/site/packages/aa-ethers/provider-adapter/getBundlerClient.md new file mode 100644 index 0000000000..aaccb59edc --- /dev/null +++ b/site/packages/aa-ethers/provider-adapter/getBundlerClient.md @@ -0,0 +1,37 @@ +--- +outline: deep +head: + - - meta + - property: og:title + content: EthersProviderAdapter • getBundlerClient + - - meta + - name: description + content: Overview of the getBundlerClient method on EthersProviderAdapter in aa-ethers + - - meta + - property: og:description + content: Overview of the getBundlerClient method on EthersProviderAdapter in aa-ethers +--- + +# getBundlerClient + +`getBundlerClient` is a method on `EthersProviderAdapter` that gets the underlying viem client which has [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) capability. + +## Usage + +::: code-group + +```ts [example.ts] +import { provider } from "./ethers-provider"; + +// get the provider's underlying viem client with EIP-4337 capabilties +const client = provider.getBundlerClient(); +``` + +<<< @/snippets/ethers-provider.ts +::: + +## Returns + +### `BundlerClient` + +The provider's underlying `BundlerClient` diff --git a/site/packages/aa-ethers/provider-adapter/getPublicErc4337Client.md b/site/packages/aa-ethers/provider-adapter/getPublicErc4337Client.md deleted file mode 100644 index 9796ef7a30..0000000000 --- a/site/packages/aa-ethers/provider-adapter/getPublicErc4337Client.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -outline: deep -head: - - - meta - - property: og:title - content: EthersProviderAdapter • getPublicErc4337Client - - - meta - - name: description - content: Overview of the getPublicErc4337Client method on EthersProviderAdapter in aa-ethers - - - meta - - property: og:description - content: Overview of the getPublicErc4337Client method on EthersProviderAdapter in aa-ethers ---- - -# getPublicErc4337Client - -`getPublicErc4337Client` is a method on `EthersProviderAdapter` that gets the underlying viem client which has [EIP-4337](https://eips.ethereum.org/EIPS/eip-4337) capability. - -## Usage - -::: code-group - -```ts [example.ts] -import { provider } from "./ethers-provider"; - -// get the provider's underlying viem client with EIP-4337 capabilties -const client = provider.getPublicErc4337Client(); -``` - -<<< @/snippets/ethers-provider.ts -::: - -## Returns - -### `PublicErc4337Client` - -The provider's underlying `PublicErc4337Client` diff --git a/site/packages/aa-ethers/provider-adapter/introduction.md b/site/packages/aa-ethers/provider-adapter/introduction.md index ccd29cbfd3..86e87f32c9 100644 --- a/site/packages/aa-ethers/provider-adapter/introduction.md +++ b/site/packages/aa-ethers/provider-adapter/introduction.md @@ -20,7 +20,7 @@ Notable differences between `EthersProviderAdapter` and `JsonRpcProvider` are im 1. [`send`](/packages/aa-ethers/provider-adapter/send) -- sends [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193)-compliant requests through the account provider. 2. [`connectToAccount`](/packages/aa-ethers/provider-adapter/connectToAccount) -- connects the provider to an account and returns an `AccountSigner`. -3. [`getPublicErc4337Client`](/packages/aa-ethers/provider-adapter/getPublicErc4337Client) -- gets the underlying viem cliemt with ERC-4337 compatability. +3. [`getBundlerClient`](/packages/aa-ethers/provider-adapter/getBundlerClient) -- gets the underlying viem cliemt with ERC-4337 compatability. 4. [`fromEthersProvider`](/packages/aa-ethers/provider-adapter/fromEthersProvider) -- static method that converts an `ethers.js` `JsonRpcProvider` to an `EthersProviderAdapter`. ## Usage @@ -35,25 +35,25 @@ import { } from "@alchemy/aa-accounts"; import { LocalAccountSigner, type SmartAccountSigner } from "@alchemy/aa-core"; import { polygonMumbai } from "@alchemy/aa-core"; +import { http } from "viem"; + // [!code focus:99] // EIP-1193 compliant requests const chainId = await provider.send("eth_chainId", []); // get the provider's underlying viem client with EIP-4337 capabilties -const client = provider.getPublicErc4337Client(); +const client = provider.getBundlerClient(); // connect the provider to an AccountSigner const owner: SmartAccountSigner = LocalAccountSigner.mnemonicToAccountSigner( process.env.YOUR_OWNER_MNEMONIC! ); const signer = provider.connectToAccount( - (rpcClient) => - new LightSmartContractAccount({ - chain: polygonMumbai, - factoryAddress: getDefaultLightAccountFactoryAddress(polygonMumbai), - rpcClient, - owner, - }) + await createLightAccount({ + chain, + transport: http("RPC_URL"), + owner, + }) ); ``` diff --git a/site/snippets/alchemy-smartAccountClient.ts b/site/snippets/alchemy-smartAccountClient.ts new file mode 100644 index 0000000000..25846a1a97 --- /dev/null +++ b/site/snippets/alchemy-smartAccountClient.ts @@ -0,0 +1,9 @@ +import { createAlchemySmartAccountClient } from "@alchemy/aa-alchemy"; +import { polygonMumbai } from "@alchemy/aa-core"; + +const chain = polygonMumbai; + +export const provider = createAlchemySmartAccountClient({ + apiKey: "demo", + chain, +}); diff --git a/site/snippets/bundlerClient.ts b/site/snippets/bundlerClient.ts new file mode 100644 index 0000000000..c9398fd28e --- /dev/null +++ b/site/snippets/bundlerClient.ts @@ -0,0 +1,7 @@ +import { createBundlerClient, mainnet } from "@alchemy/aa-core"; +import { http } from "viem"; + +export const client = createBundlerClient({ + chain: mainnet, + transport: http("https://eth-mainnet.g.alchemy.com/v2/demo"), +}); diff --git a/site/snippets/client.ts b/site/snippets/client.ts deleted file mode 100644 index 8e1907b968..0000000000 --- a/site/snippets/client.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { createPublicErc4337Client, mainnet } from "@alchemy/aa-core"; - -export const client = createPublicErc4337Client({ - chain: mainnet, - rpcUrl: "https://eth-mainnet.g.alchemy.com/v2/demo", -}); diff --git a/site/snippets/core-provider.ts b/site/snippets/core-provider.ts index ad7fd878ab..359cbf9225 100644 --- a/site/snippets/core-provider.ts +++ b/site/snippets/core-provider.ts @@ -1,27 +1,24 @@ -import { - LightSmartContractAccount, - getDefaultLightAccountFactoryAddress, -} from "@alchemy/aa-accounts"; +import { createLightAccount } from "@alchemy/aa-accounts"; import { LocalAccountSigner, - SmartAccountProvider, SmartAccountSigner, + createSmartAccountClient, polygonMumbai, } from "@alchemy/aa-core"; +import { http } from "viem"; const chain = polygonMumbai; -const owner: SmartAccountSigner = - LocalAccountSigner.mnemonicToAccountSigner(YOUR_OWNER_MNEMONIC); +const owner: SmartAccountSigner = LocalAccountSigner.mnemonicToAccountSigner( + "YOUR_OWNER_MNEMONIC" +); +const rpcTransport = http("https://polygon-mumbai.g.alchemy.com/v2/demo"); -export const provider = new SmartAccountProvider({ - rpcProvider: "https://polygon-mumbai.g.alchemy.com/v2/demo", +export const provider = createSmartAccountClient({ + transport: rpcTransport, chain, -}).connect( - (rpcClient) => - new LightSmartContractAccount({ - chain, - factoryAddress: getDefaultLightAccountFactoryAddress(chain), - rpcClient, - owner, - }) -); + account: await createLightAccount({ + transport: rpcTransport, + chain, + owner, + }), +}); diff --git a/site/snippets/enhanced-apis-example/nft.ts b/site/snippets/enhanced-apis-example/nft.ts index 171c05ff28..2f4820d046 100644 --- a/site/snippets/enhanced-apis-example/nft.ts +++ b/site/snippets/enhanced-apis-example/nft.ts @@ -1,5 +1,8 @@ -import { AlchemyProvider } from "@alchemy/aa-alchemy"; -import { sepolia } from "@alchemy/aa-core"; +import { + alchemyEnhancedApiActions, + createLightAccountAlchemyClient, +} from "@alchemy/aa-alchemy"; +import { LocalAccountSigner, sepolia } from "@alchemy/aa-core"; import { Alchemy, Network } from "alchemy-sdk"; const alchemy = new Alchemy({ @@ -7,12 +10,15 @@ const alchemy = new Alchemy({ apiKey: "YOUR_API_KEY", }); -const provider = new AlchemyProvider({ - chain: sepolia, - apiKey: "YOUR_API_KEY", -}).withAlchemyEnhancedApis(alchemy); +const provider = ( + await createLightAccountAlchemyClient({ + chain: sepolia, + apiKey: "YOUR_API_KEY", + owner: LocalAccountSigner.mnemonicToAccountSigner("OWNER_MNEMONIC"), + }) +).extend(alchemyEnhancedApiActions(alchemy)); -const address = await provider.getAddress(); +const address = provider.getAddress(); // get all NFTs owned by the smart account export const nfts = provider.nft.getNftsForOwner(address); diff --git a/site/snippets/enhanced-apis-example/token.ts b/site/snippets/enhanced-apis-example/token.ts index bff9b3bb1c..0443bbfd32 100644 --- a/site/snippets/enhanced-apis-example/token.ts +++ b/site/snippets/enhanced-apis-example/token.ts @@ -1,5 +1,8 @@ -import { AlchemyProvider } from "@alchemy/aa-alchemy"; -import { sepolia } from "@alchemy/aa-core"; +import { + alchemyEnhancedApiActions, + createLightAccountAlchemyClient, +} from "@alchemy/aa-alchemy"; +import { LocalAccountSigner, sepolia } from "@alchemy/aa-core"; import { Alchemy, Network } from "alchemy-sdk"; const alchemy = new Alchemy({ @@ -7,12 +10,15 @@ const alchemy = new Alchemy({ apiKey: "YOUR_API_KEY", }); -const provider = new AlchemyProvider({ - chain: sepolia, - apiKey: "YOUR_API_KEY", -}).withAlchemyEnhancedApis(alchemy); +const provider = ( + await createLightAccountAlchemyClient({ + chain: sepolia, + apiKey: "YOUR_API_KEY", + owner: LocalAccountSigner.mnemonicToAccountSigner("OWNER_MNEMONIC"), + }) +).extend(alchemyEnhancedApiActions(alchemy)); -const address = await provider.getAddress(); +const address = provider.getAddress(); // get all tokens owned by the smart account export const tokenBalances = provider.core.getTokenBalances(address); diff --git a/site/snippets/ethers-signer.ts b/site/snippets/ethers-signer.ts index bcd07733af..2ce20ffddc 100644 --- a/site/snippets/ethers-signer.ts +++ b/site/snippets/ethers-signer.ts @@ -1,12 +1,10 @@ -import { - LightSmartContractAccount, - getDefaultLightAccountFactoryAddress, -} from "@alchemy/aa-accounts"; +import { createLightAccount } from "@alchemy/aa-accounts"; import { LocalAccountSigner, SmartAccountSigner, polygonMumbai, } from "@alchemy/aa-core"; +import { http } from "viem"; import { provider } from "./ethers-provider.js"; const owner: SmartAccountSigner = LocalAccountSigner.mnemonicToAccountSigner( @@ -17,11 +15,9 @@ const chain = polygonMumbai; // 2. Connect the provider to the smart account signer export const signer = provider.connectToAccount( - (rpcClient) => - new LightSmartContractAccount({ - chain, - factoryAddress: getDefaultLightAccountFactoryAddress(chain), - rpcClient, - owner, - }) + await createLightAccount({ + chain, + transport: http("RPC_URL"), + owner, + }) ); diff --git a/site/snippets/light-account-alchemy-provider.ts b/site/snippets/light-account-alchemy-client.ts similarity index 55% rename from site/snippets/light-account-alchemy-provider.ts rename to site/snippets/light-account-alchemy-client.ts index 2c2690ccec..f077d4cd29 100644 --- a/site/snippets/light-account-alchemy-provider.ts +++ b/site/snippets/light-account-alchemy-client.ts @@ -1,7 +1,7 @@ -import { createLightAccountAlchemyProvider } from "@alchemy/aa-alchemy"; +import { createLightAccountAlchemyClient } from "@alchemy/aa-alchemy"; import { LocalAccountSigner, sepolia } from "@alchemy/aa-core"; -export const provider = createLightAccountAlchemyProvider({ +export const smartAccountClient = await createLightAccountAlchemyClient({ apiKey: "YOUR_API_KEY", chain: sepolia, owner: LocalAccountSigner.mnemonicToAccountSigner("OWNER_MNEMONIC"), diff --git a/site/snippets/light-account-client.ts b/site/snippets/light-account-client.ts new file mode 100644 index 0000000000..635f774040 --- /dev/null +++ b/site/snippets/light-account-client.ts @@ -0,0 +1,9 @@ +import { createLightAccountClient } from "@alchemy/aa-accounts"; +import { LocalAccountSigner, sepolia } from "@alchemy/aa-core"; +import { http } from "viem"; + +export const provider = createLightAccountClient({ + transport: http(`${sepolia.rpcUrls.alchemy.http[0]}/${"YOUR_API_KEY"}`), + chain: sepolia, + owner: LocalAccountSigner.mnemonicToAccountSigner("OWNER_MNEMONIC"), +}); diff --git a/site/snippets/light-account-provider.ts b/site/snippets/light-account-provider.ts deleted file mode 100644 index 5502427377..0000000000 --- a/site/snippets/light-account-provider.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { createLightAccountProvider } from "@alchemy/aa-accounts"; -import { LocalAccountSigner, sepolia } from "@alchemy/aa-core"; - -export const provider = createLightAccountProvider({ - rpcProvider: `${sepolia.rpcUrls.alchemy.http[0]}/${"YOUR_API_KEY"}`, - chain: sepolia, - owner: LocalAccountSigner.mnemonicToAccountSigner("OWNER_MNEMONIC"), -}); diff --git a/site/snippets/privy.ts b/site/snippets/privy.ts index 5f1c04a3b5..0c85abc962 100644 --- a/site/snippets/privy.ts +++ b/site/snippets/privy.ts @@ -43,7 +43,7 @@ const privySigner: SmartAccountSigner = new WalletClientSigner( "privy" // signerType ); -// Create an Alchemy Provider with the smart account signer +// Create an Alchemy Smart Account Client with the smart account signer export const provider = new AlchemyProvider({ apiKey: "ALCHEMY_API_KEY", chain: sepolia, diff --git a/site/snippets/provider.ts b/site/snippets/provider.ts deleted file mode 100644 index 3209146d3d..0000000000 --- a/site/snippets/provider.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { - LightSmartContractAccount, - getDefaultLightAccountFactoryAddress, -} from "@alchemy/aa-accounts"; -import { AlchemyProvider } from "@alchemy/aa-alchemy"; -import { LocalAccountSigner, sepolia, type Hex } from "@alchemy/aa-core"; - -const chain = sepolia; -const PRIVATE_KEY = "0xYourEOAPrivateKey" as Hex; -const owner = LocalAccountSigner.privateKeyToAccountSigner(PRIVATE_KEY); - -export const provider = new AlchemyProvider({ - // get your Alchemy API key at https://dashboard.alchemy.com - apiKey: "ALCHEMY_API_KEY", - chain, -}).connect( - (rpcClient) => - new LightSmartContractAccount({ - rpcClient, - owner, - chain, - factoryAddress: getDefaultLightAccountFactoryAddress(chain), - }) -); diff --git a/site/snippets/send-uo-example/calldata.ts b/site/snippets/send-uo-example/calldata.ts index 7e6602db78..1430ec8706 100644 --- a/site/snippets/send-uo-example/calldata.ts +++ b/site/snippets/send-uo-example/calldata.ts @@ -1,5 +1,5 @@ +import { smartAccountClient } from "snippets/light-account-alchemy-client"; import { encodeFunctionData } from "viem"; -import { connectedProvider } from "./connect-account.js"; // this is an example ABI for a contract with a "mint" function const AlchemyTokenAbi = [ @@ -15,5 +15,5 @@ const AlchemyTokenAbi = [ export const uoCallData = encodeFunctionData({ abi: AlchemyTokenAbi, functionName: "mint", - args: [await connectedProvider.getAddress()], + args: [smartAccountClient.getAddress()], }); diff --git a/site/snippets/send-uo-example/connect-account.ts b/site/snippets/send-uo-example/connect-account.ts deleted file mode 100644 index 6486ff4c9e..0000000000 --- a/site/snippets/send-uo-example/connect-account.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { - LightSmartContractAccount, - getDefaultLightAccountFactoryAddress, -} from "@alchemy/aa-accounts"; -import { - LocalAccountSigner, - sepolia, - type SmartAccountSigner, -} from "@alchemy/aa-core"; -import { provider } from "./create-provider.js"; - -const chain = sepolia; -const PRIVATE_KEY = "0xYourEOAPrivateKey"; -const eoaSigner: SmartAccountSigner = - LocalAccountSigner.privateKeyToAccountSigner(`0x${PRIVATE_KEY}`); - -export const connectedProvider = provider.connect( - (rpcClient) => - new LightSmartContractAccount({ - chain, - owner: eoaSigner, - factoryAddress: getDefaultLightAccountFactoryAddress(chain), - rpcClient, - }) -); diff --git a/site/snippets/send-uo-example/create-provider.ts b/site/snippets/send-uo-example/create-provider.ts deleted file mode 100644 index 9c36fac54c..0000000000 --- a/site/snippets/send-uo-example/create-provider.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { AlchemyProvider } from "@alchemy/aa-alchemy"; -import { sepolia } from "@alchemy/aa-core"; - -export const provider = new AlchemyProvider({ - apiKey: "ALCHEMY_API_KEY", // replace with your Alchemy API Key - chain: sepolia, -}); diff --git a/site/snippets/send-uo-example/full-example.ts b/site/snippets/send-uo-example/full-example.ts index cbdddadcb8..ebb0c6dce0 100644 --- a/site/snippets/send-uo-example/full-example.ts +++ b/site/snippets/send-uo-example/full-example.ts @@ -1,8 +1,4 @@ -import { - LightSmartContractAccount, - getDefaultLightAccountFactoryAddress, -} from "@alchemy/aa-accounts"; -import { AlchemyProvider } from "@alchemy/aa-alchemy"; +import { createLightAccountAlchemyClient } from "@alchemy/aa-alchemy"; import { LocalAccountSigner, sepolia, @@ -10,25 +6,18 @@ import { } from "@alchemy/aa-core"; import { encodeFunctionData } from "viem"; -const provider = new AlchemyProvider({ - apiKey: "ALCHEMY_API_KEY", // replace with your Alchemy API Key - chain: sepolia, -}); - -const chain = sepolia; const PRIVATE_KEY = "0xYourEOAPrivateKey"; const eoaSigner: SmartAccountSigner = LocalAccountSigner.privateKeyToAccountSigner(`0x${PRIVATE_KEY}`); -const connectedProvider = provider.connect( - (rpcClient) => - new LightSmartContractAccount({ - chain, - owner: eoaSigner, - factoryAddress: getDefaultLightAccountFactoryAddress(chain), - rpcClient, - }) -); +const client = await createLightAccountAlchemyClient({ + apiKey: "ALCHEMY_API_KEY", // replace with your Alchemy API Key + chain: sepolia, + owner: eoaSigner, + gasManagerConfig: { + policyId: "POLICY_ID", // replace with your policy id, get yours at https://dashboard.alchemy.com/ + }, +}); // this is an example ABI for a contract with a "mint" function const AlchemyTokenAbi = [ @@ -44,18 +33,16 @@ const AlchemyTokenAbi = [ export const uoCallData = encodeFunctionData({ abi: AlchemyTokenAbi, functionName: "mint", - args: [await connectedProvider.getAddress()], + args: [client.getAddress()], }); -connectedProvider.withAlchemyGasManager({ - policyId: "POLICY_ID", // replace with your policy id, get yours at https://dashboard.alchemy.com/ -}); - -const uo = await connectedProvider.sendUserOperation({ - target: "0xTargetAddress", - data: uoCallData, +const uo = await client.sendUserOperation({ + uo: { + target: "0xTargetAddress", + data: uoCallData, + }, }); -const txHash = await connectedProvider.waitForUserOperationTransaction(uo.hash); +const txHash = await client.waitForUserOperationTransaction(uo); console.log(txHash); diff --git a/site/snippets/send-uo-example/send-uo.ts b/site/snippets/send-uo-example/send-uo.ts index 1a9cd90849..92e1245e20 100644 --- a/site/snippets/send-uo-example/send-uo.ts +++ b/site/snippets/send-uo-example/send-uo.ts @@ -1,15 +1,13 @@ +import { smartAccountClient } from "../light-account-alchemy-client.js"; import { uoCallData } from "./calldata.js"; -import { connectedProvider } from "./connect-account.js"; -connectedProvider.withAlchemyGasManager({ - policyId: "POLICY_ID", // replace with your policy id, get yours at https://dashboard.alchemy.com/ +const uo = await smartAccountClient.sendUserOperation({ + uo: { + target: "0xTARGET_ADDRESS", + data: uoCallData, + }, }); -const uo = await connectedProvider.sendUserOperation({ - target: "0xTARGET_ADDRESS", - data: uoCallData, -}); - -const txHash = await connectedProvider.waitForUserOperationTransaction(uo.hash); +const txHash = await smartAccountClient.waitForUserOperationTransaction(uo); console.log(txHash); diff --git a/site/snippets/sim-uo-example/sim-method.ts b/site/snippets/sim-uo-example/sim-method.ts index 9e43bc7567..cf07f9cefc 100644 --- a/site/snippets/sim-uo-example/sim-method.ts +++ b/site/snippets/sim-uo-example/sim-method.ts @@ -1,5 +1,15 @@ -import { UserOperationCallData } from "@alchemy/aa-core"; -import { provider } from "../provider.js"; +import { createLightAccountAlchemyClient } from "@alchemy/aa-alchemy"; +import { + LocalAccountSigner, + UserOperationCallData, + sepolia, +} from "@alchemy/aa-core"; + +export const smartAccountClient = await createLightAccountAlchemyClient({ + apiKey: "YOUR_API_KEY", + chain: sepolia, + owner: LocalAccountSigner.mnemonicToAccountSigner("OWNER_MNEMONIC"), +}); const uoStruct: UserOperationCallData = { target: "0xTARGET_ADDRESS", @@ -7,14 +17,16 @@ const uoStruct: UserOperationCallData = { value: 1n, }; -const uoSimResult = await provider.simulateUserOperationAssetChanges(uoStruct); +const uoSimResult = await smartAccountClient.simulateUserOperation({ + uo: uoStruct, +}); if (uoSimResult.error) { console.error(uoSimResult.error.message); } -const uo = await provider.sendUserOperation(uoStruct); +const uo = await smartAccountClient.sendUserOperation({ uo: uoStruct }); -const txHash = await provider.waitForUserOperationTransaction(uo.hash); +const txHash = await smartAccountClient.waitForUserOperationTransaction(uo); console.log(txHash); diff --git a/site/snippets/sim-uo-example/sim-middleware.ts b/site/snippets/sim-uo-example/sim-middleware.ts index 579ddb799d..1543005127 100644 --- a/site/snippets/sim-uo-example/sim-middleware.ts +++ b/site/snippets/sim-uo-example/sim-middleware.ts @@ -1,15 +1,21 @@ -import { provider } from "../provider.js"; +import { createLightAccountAlchemyClient } from "@alchemy/aa-alchemy"; +import { LocalAccountSigner, sepolia } from "@alchemy/aa-core"; -const providerWithSimulation = provider.withAlchemyUserOpSimulation(); +export const smartAccountClient = await createLightAccountAlchemyClient({ + apiKey: "YOUR_API_KEY", + chain: sepolia, + owner: LocalAccountSigner.mnemonicToAccountSigner("OWNER_MNEMONIC"), + useSimulation: true, +}); -const uo = await providerWithSimulation.sendUserOperation({ - target: "0xTARGET_ADDRESS", - data: "0xDATA", - value: 1n, +const uo = await smartAccountClient.sendUserOperation({ + uo: { + target: "0xTARGET_ADDRESS", + data: "0xDATA", + value: 1n, + }, }); -const txHash = await providerWithSimulation.waitForUserOperationTransaction( - uo.hash -); +const txHash = await smartAccountClient.waitForUserOperationTransaction(uo); console.log(txHash); diff --git a/site/snippets/smartAccountClient.ts b/site/snippets/smartAccountClient.ts new file mode 100644 index 0000000000..cbea36e6eb --- /dev/null +++ b/site/snippets/smartAccountClient.ts @@ -0,0 +1,13 @@ +import { createLightAccountClient } from "@alchemy/aa-accounts"; +import { LocalAccountSigner, sepolia, type Hex } from "@alchemy/aa-core"; +import { http } from "viem"; + +const chain = sepolia; +const PRIVATE_KEY = "0xYourEOAPrivateKey" as Hex; +const owner = LocalAccountSigner.privateKeyToAccountSigner(PRIVATE_KEY); + +export const smartAccountClient = await createLightAccountClient({ + transport: http("https://eth-sepolia.alchemyapi.io/v2/ALCHEMY_API_KEY"), + chain, + owner, +}); diff --git a/site/tutorials/batching-transactions.md b/site/tutorials/batching-transactions.md index 050a33576c..80bd8217f2 100644 --- a/site/tutorials/batching-transactions.md +++ b/site/tutorials/batching-transactions.md @@ -20,7 +20,7 @@ head: # How to Submit Batch Transactions -One benefit of Smart Contract Accounts is that it's possible to batch transactions in one `UserOperation` (UO). Not all Smart Contract Accounts support batching. But, if the `ISmartContractAccount` implementation you're using has the [`encodeBatchExecute`](/packages/aa-core/accounts/optional/encodeBatchExecute.md) method, then implementations of `SmartAccountProvider` will allow you to make those calls. +One benefit of Smart Contract Accounts is that it's possible to batch transactions in one `UserOperation` (UO). Not all Smart Contract Accounts support batching. But, if the `ISmartContractAccount` implementation you're using has the [`encodeBatchExecute`](/packages/aa-core/accounts/) method, then implementations of `SmartAccountProvider` will allow you to make those calls. There are two ways you can batch transactions using `SmartAccountProvider`: @@ -39,7 +39,7 @@ When you batch transactions, the transaction actions (`target`s and `calldata`s) The batched UO gets executed by the account calling the `executeBatch` method on the [`SimpleAccount`](https://github.com/eth-infinitism/account-abstraction/blob/ver0.6.0/contracts/samples/SimpleAccount.sol) or [`LightAccount`](https://github.com/alchemyplatform/light-account/blob/v1.0.2/src/LightAccount.sol) smart contracts. `executeBatch` processes the input array of transactions data linearly, guaranteeing the execution order of those transactions to be **sequential**. ::: -## Batching using [`sendUserOperation`](/packages/aa-core/provider/sendUserOperation.md) +## Batching using [`sendUserOperation`](/packages/aa-core/smart-account-client/actions/sendUserOperation.md) The `SmartAccountProvider` supports passing either a single UO or an array of UOs to `sendUserOperation`. If you pass an array, the provider will batch the transactions into a single User Operation and submit it to the bundler. Let's see an example: @@ -61,11 +61,11 @@ const { hash } = await provider.sendUserOperation([ ]); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: -## Batching using [`sendTransactions`](/packages/aa-core/provider/sendTransactions.md) +## Batching using [`sendTransactions`](/packages/aa-core/smart-account-client/actions/sendTransactions.md) The `SmartAccountProvider` supports sending UOs and waiting for them to be mined in a transaction via the `sendTransaction` and `sendTransactions` methods. The latter allows for batching in the same way `sendUserOperation`: @@ -87,6 +87,6 @@ const hash = await provider.sendTransactions([ ]); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: diff --git a/site/tutorials/enhanced-apis/nft.md b/site/tutorials/enhanced-apis/nft.md index f13ed79685..0e046b7419 100644 --- a/site/tutorials/enhanced-apis/nft.md +++ b/site/tutorials/enhanced-apis/nft.md @@ -22,13 +22,13 @@ head: We provide several [Enhanced APIs](https://www.alchemy.com/enhanced-apis/?a=ak-docs), which are especially useful for querying information about the smart accounts you create using Account Kit, such as the account's owned NFTs using the [NFT API](https://www.alchemy.com/nft-api/?a=ak-docs). -For the purposes of our example, we'll use the NFT API to query our smart account's data by extending the Alchemy Provider [with Enhanced APIs](/packages/aa-alchemy/provider/withAlchemyEnhancedApis.md). +For the purposes of our example, we'll use the NFT API to query our smart account's data by extending the Alchemy Smart Account Client [with Enhanced APIs](/packages/aa-alchemy/smart-account-client/actions/alchemyEnhancedApiActions.md). ## 1. Install the [`alchemy-sdk`](https://github.com/alchemyplatform/alchemy-sdk-js) We have developed a Typescript SDK to make development with the Enhanced APIs simple. The SDK includes ways to leverage Alchemy's Simulation API, Token API, Transact API, NFT API, Webhooks and Websockets, and more across our supported chains. Take a look at the code [here](https://github.com/alchemyplatform/alchemy-sdk-js). -We will use the Alchemy SDK Client to extend our Alchemy Provider using the provider's [`withAlchemyEnhancedApis`](/packages/aa-alchemy/provider/withAlchemyEnhancedApis.md) method. That way, our provider will have direct access to the Enhanced APIs. +We will use the Alchemy SDK Client to extend our Alchemy Smart Account Client using the provider's [`alchemyEnhancedApiActions`](/packages/aa-alchemy/smart-account-client/actions/alchemyEnhancedApiActions.md) method. That way, our provider will have direct access to the Enhanced APIs. To use the Alchemy SDK in our project directory, we'll need to install the required package: @@ -44,16 +44,16 @@ yarn add alchemy-sdk ::: -## 2. Extend the Alchemy Provider with Enhanced APIs +## 2. Extend the Alchemy Smart Account Client with Enhanced APIs -Then, all we need to do is create an `alchemy` client from the Alchemy SDK, create an `AlchemyProvider` from Account Kit, and then extend the provider with functionality from the SDK client using `withAlchemyEnhancedApis`. We can get the smart account's address from the `AlchemyProvider` in order to fetch the smart account's NFT in just 1 line of code! +Then, all we need to do is create an `alchemy` client from the Alchemy SDK, create an `AlchemySmartAccountClient` from Account Kit, and then extend the provider with functionality from the SDK client using `alchemyEnhancedApiActions`. We can get the smart account's address from the `AlchemySmartAccountClient` in order to fetch the smart account's NFT in just 1 line of code! <<< @/snippets/enhanced-apis-example/nft.ts :::tip Note -Note that we must configure the Alchemy SDK client to have the same API Key and blockchain network as Alchemy Provider it is extending via `withAlchemyEnhancedApis`. This method explicitly checks this requirement and will throw an error at runtime if not satisfied. +Note that we must configure the Alchemy SDK client to have the same API Key and blockchain network as Alchemy Smart Account Client it is extending via `alchemyEnhancedApiActions`. This method explicitly checks this requirement and will throw an error at runtime if not satisfied. -Additionally, since the Alchemy SDK client does not yet support JWT authentication, an `AlchemyProvider` initialized with JWTs cannot use this method. We must be initialize the provider with an API key or RPC URL. +Additionally, since the Alchemy SDK client does not yet support JWT authentication, an `AlchemySmartAccountClient` initialized with JWTs cannot use this method. We must be initialize the provider with an API key or RPC URL. ::: That's it! There are so many more Enhanced APIs the the Alchemy SDK exposes, and can be useful for development with Account Abstraction. Try it out [here](https://github.com/alchemyplatform/alchemy-sdk-js), and check out [How to fetch a Smart Account's ERC-20 Tokens](/tutorials/enhanced-apis/token) for another example. diff --git a/site/tutorials/enhanced-apis/token.md b/site/tutorials/enhanced-apis/token.md index 98cf5c0b6f..7188827a1e 100644 --- a/site/tutorials/enhanced-apis/token.md +++ b/site/tutorials/enhanced-apis/token.md @@ -22,13 +22,13 @@ head: Alchemy provides several [Enhanced APIs](https://www.alchemy.com/enhanced-apis/?a=ak-docs), which are especially useful for querying information about the smart accounts you create using Account Kit, such as the account's ERC-20 Token balances using the [Token API](https://www.alchemy.com/token-api/?a=ak-docs). -For the purposes of our example, we'll use the Token API to query our smart account's data by extending the Alchemy Provider [with Enhanced APIs](/packages/aa-alchemy/provider/withAlchemyEnhancedApis.md). +For the purposes of our example, we'll use the Token API to query our smart account's data by extending the Alchemy Smart Account Client [with Enhanced APIs](/packages/aa-alchemy/smart-account-client/actions/alchemyEnhancedApiActions.md). ## 1. Install the [`alchemy-sdk`](https://github.com/alchemyplatform/alchemy-sdk-js) Alchemy has developed a Typescript SDK to make development with the Enhanced APIs simple. The SDK includes ways to leverage Alchemy's Simulation API, Token API, Transact API, NFT API, Webhooks and Websockets, and more across Alchemy's supported chains. Take a look at the code [here](https://github.com/alchemyplatform/alchemy-sdk-js). -We will use the Alchemy SDK Client to extend our Alchemy Provider using the provider's [`withAlchemyEnhancedApis`](/packages/aa-alchemy/provider/withAlchemyEnhancedApis.md) method. That way, our provider will have direct access to the Enhanced APIs. +We will use the Alchemy SDK Client to extend our Alchemy Smart Account Client using the provider's [`alchemyEnhancedApiActions`](/packages/aa-alchemy/smart-account-client/actions/alchemyEnhancedApiActions.md) method. That way, our provider will have direct access to the Enhanced APIs. To use the Alchemy SDK in our project directory, we'll need to install the required package: @@ -44,16 +44,16 @@ yarn add alchemy-sdk ::: -## 2. Extend the Alchemy Provider with Enhanced APIs +## 2. Extend the Alchemy Smart Account Client with Enhanced APIs -Then, all we need to do is create an `alchemy` client from the Alchemy SDK, create an `AlchemyProvider` from Account Kit, and then extend the provider with functionality from the SDK client using `withAlchemyEnhancedApis`. We can get the smart account's address from the `AlchemyProvider` in order to fetch the smart account's ERC-20 Tokens in just 1 line of code! +Then, all we need to do is create an `alchemy` client from the Alchemy SDK, create an `AlchemySmartAccountClient` from Account Kit, and then extend the provider with functionality from the SDK client using `withAlchemyEnhancedApis`. We can get the smart account's address from the `AlchemySmartAccountClient` in order to fetch the smart account's ERC-20 Tokens in just 1 line of code! <<< @/snippets/enhanced-apis-example/token.ts :::tip Note -Note that we must configure the Alchemy SDK client to have the same API Key and blockchain network as Alchemy Provider it is extending via `withAlchemyEnhancedApis`. This method explicitly checks this requirement and will throw an error at runtime if not satisfied. +Note that we must configure the Alchemy SDK client to have the same API Key and blockchain network as Alchemy Smart Account Client it is extending via `alchemyEnhancedApiActions`. This method explicitly checks this requirement and will throw an error at runtime if not satisfied. -Additionally, since the Alchemy SDK client does not yet support JWT authentication, an `AlchemyProvider` initialized with JWTs cannot use this method. We must be initialize the provider with an API key or RPC URL. +Additionally, since the Alchemy SDK client does not yet support JWT authentication, an `AlchemySmartAccountClient` initialized with JWTs cannot use this method. We must be initialize the provider with an API key or RPC URL. ::: That's it! There are so many more Enhanced APIs the the Alchemy SDK exposes, and can be useful for development with Account Abstraction. Try it out [here](https://github.com/alchemyplatform/alchemy-sdk-js), and check out [How to fetch a Smart Account's NFTs](/tutorials/enhanced-apis/nft) for another example. diff --git a/site/tutorials/send-user-operation.md b/site/tutorials/send-user-operation.md index d60f184e1c..f838e4cbb9 100644 --- a/site/tutorials/send-user-operation.md +++ b/site/tutorials/send-user-operation.md @@ -23,27 +23,19 @@ prev: # How to Send a User Operation -This guide will show you how to send a User Operation with Account Kit by creating an Alchemy Provider, connecting it to a Light Account (a type of smart account implementation), and sending a User Operation from that provider. By the end of this guide, you'll have a basic understanding of how to use the SDK. +This guide will show you how to send a User Operation with Account Kit by creating an Alchemy Smart Account Client, connecting it to a Light Account (a type of smart account implementation), and sending a User Operation from that provider. By the end of this guide, you'll have a basic understanding of how to use the SDK. ## 1. Create Your Provider -Using the SDK, we'll create an Alchemy Provider. As it is, the providers gives you methods to query information related to user operations and smart accounts. To create a provider, you'll need an Alchemy API Key or RPC URL, which you can access from the [Alchemy Dashboard](https://dashboard.alchemy.com/signup/?a=aa-docs). +Using the SDK, we'll create an Alchemy Smart Account Client. As it is, the providers gives you methods to query information related to user operations and smart accounts. To create a provider, you'll need an Alchemy API Key or RPC URL, which you can access from the [Alchemy Dashboard](https://dashboard.alchemy.com/signup/?a=aa-docs). -See [Alchemy Provider](/packages/aa-alchemy/provider/introduction.md) for more details. +See [Alchemy Smart Account Client](/packages/aa-alchemy/smart-account-client/) for more details. -<<< @/snippets/send-uo-example/create-provider.ts +<<< @/snippets/light-account-alchemy-client.ts -## 2. Connect Your Smart Account +## 2. Construct The CallData -To send User Operations, we must connect the `provider` with a smart account. The Light Account is our gas-optimized smart account implementation, which we'll use in this example. - -See [Light Account](/packages/aa-accounts/light-account/introduction.md) for more details. - -<<< @/snippets/send-uo-example/connect-account.ts - -## 3. Construct The CallData - -The best part of Account Kit is that it abstracts the differences between User Operation calldata and standard Transaction calldata, such that you can pass in typical calldata to [sendUserOperation](/packages/aa-core/provider/waitForUserOperationTransaction.md) as if it was a transaction sent from your smart account, and we'll wrap it as necessary to generate calldata as it would be as a User Operation. +The best part of Account Kit is that it abstracts the differences between User Operation calldata and standard Transaction calldata, such that you can pass in typical calldata to [sendUserOperation](/packages/aa-core/smart-account-client/actions/waitForUserOperationTransaction.md) as if it was a transaction sent from your smart account, and we'll wrap it as necessary to generate calldata as it would be as a User Operation. The second best part of Account Kit is it's build atop [viem](https://viem.sh/). This means we can leverage utility methods to easily generate calldata, with type safety, using a smart contract's ABI. @@ -51,13 +43,13 @@ The second best part of Account Kit is it's build atop [viem](https://viem.sh/). Some other helpful viem methods include: [encodeFunctionData](https://viem.sh/docs/contract/encodeFunctionData.html), [decodeFunctionData](https://viem.sh/docs/contract/decodeFunctionData.html), and [decodeFunctionResult](https://viem.sh/docs/contract/decodeFunctionResult.html). -## 4. Send The User Operation +## 3. Send The User Operation -Now we'll use the connected provider to send a user operation. We'll use the [sendUserOperation](/packages/aa-core/provider/sendUserOperation.md) method on the provider. +Now we'll use the connected provider to send a user operation. We'll use the [sendUserOperation](/packages/aa-core/smart-account-client/actions/sendUserOperation.md) method on the provider. -You can either send ETH to the smart account to pay for User Operation's gas, or you can connect your provider to our Gas Manager using the [withAlchemyGasManager](/packages/aa-alchemy/provider/withAlchemyGasManager.md) method to sponsor the UO's gas. We'll use the latter approach below. You can go to the [Alchemy Dashboard](https://dashboard.alchemy.com/gas-manager/?a=ak-docs) to get a Gas Manager policy ID. +You can either send ETH to the smart account to pay for User Operation's gas, or you can connect your provider to our Gas Manager using the [withAlchemyGasManager](/packages/aa-alchemy/middleware/alchemyGasManagerMiddleware.md) method to sponsor the UO's gas. We'll use the latter approach below. You can go to the [Alchemy Dashboard](https://dashboard.alchemy.com/gas-manager/?a=ak-docs) to get a Gas Manager policy ID. -We'll also want to wait for the transaction which contains the User Operation, so that we know the User Operation executed on-chain. We can use the [waitForUserOperationTransaction](/packages/aa-core/provider/waitForUserOperationTransaction.md) method on provider to do so, as seen below. +We'll also want to wait for the transaction which contains the User Operation, so that we know the User Operation executed on-chain. We can use the [waitForUserOperationTransaction](/packages/aa-core/smart-account-client/actions/waitForUserOperationTransaction.md) method on provider to do so, as seen below. <<< @/snippets/send-uo-example/send-uo.ts diff --git a/site/tutorials/sim-user-operation.md b/site/tutorials/sim-user-operation.md index fff8a298a7..5559fa99bd 100644 --- a/site/tutorials/sim-user-operation.md +++ b/site/tutorials/sim-user-operation.md @@ -31,33 +31,25 @@ Please note that the UO simulation results are based on the blockchain's state a This could lead to different outcomes than predicted. For instance, if a UO's effect is conditional on the current state of a contract, and this state is altered before the UO is executed, the final result may not match the simulation. Please be aware of this potential variance and consider it while using UO simulations. -::: - -There are two ways that Account Kit supports UO simulation on an `AlchemyProvider`: - -1. using the [`withAlchemyUserOpSimulation`](/packages/aa-alchemy/provider/withAlchemyUserOpSimulation) middleware -2. using the [`simulateUserOperationAssetChanges`](/packages/aa-alchemy/provider/simulateUserOperationAssetChanges) method -## 1. Using [`withAlchemyUserOpSimulation`](/packages/aa-alchemy/provider/withAlchemyUserOpSimulation) +## 1. Using [`alchemyUserOperationSimulator` middleware](/packages/aa-alchemy/middleware/alchemyUserOperationSimulator) -To simulate User Operations, we must connect the `provider` with the middleware to simulate `UserOperations` before sending them. This can be done in a single line code, as show below! +To simulate User Operations, we must create an Alchemy Client and pass in the `useSimulation` flag to true. -Then, whenever you call a method on the provider which generates the UO to send (e.g. [`sendUserOperation`](/packages/aa-core/provider/sendUserOperation), [`sendTransaction`](/packages/aa-core/provider/sendTransaction), [`sendTransactions`](/packages/aa-core/provider/sendTransactions), [`buildUserOperation`](/packages/aa-core/provider/buildUserOperation), or [`buildUserOperationFromTx`](/packages/aa-core/provider/buildUserOperationFromTx)), the provider will also simulate which assets change as a result of the UO, and if simulation fails, the provider will not send the UO unnecessarily! +Then, whenever you call a method on the provider which generates the UO to send (e.g. [`sendUserOperation`](/packages/aa-core/smart-account-client/actions/sendUserOperation), [`sendTransaction`](/packages/aa-core/smart-account-client/actions/sendTransaction), [`sendTransactions`](/packages/aa-core/smart-account-client/actions/sendTransactions), [`buildUserOperation`](/packages/aa-core/smart-account-client/actions/buildUserOperation), or [`buildUserOperationFromTx`](/packages/aa-core/smart-account-client/actions/buildUserOperationFromTx)), the provider will also simulate which assets change as a result of the UO, and if simulation fails, the provider will not send the UO unnecessarily! ::: code-group <<< @/snippets/sim-uo-example/sim-middleware.ts -<<< @/snippets/provider.ts ::: -## 2. Using [`simulateUserOperationAssetChanges`](/packages/aa-alchemy/provider/simulateUserOperationAssetChanges) +## 2. Using [`simulateUserOperation`](/packages/aa-alchemy/smart-account-client/actions/simulateUserOperation) -You can also selectively simulate UOs by calling the [`simulateUserOperationAssetChanges`](/packages/aa-alchemy/provider/simulateUserOperationAssetChanges) method before sending a UO. You'd be responsible for catching any errors like how it's done below, but this is a nice alternative to always running simulation. +You can also selectively simulate UOs by calling the [`simulateUserOperation`](/packages/aa-alchemy/smart-account-client/actions/simulateUserOperation)) method before sending a UO. You'd be responsible for catching any errors like how it's done below, but this is a nice alternative to always running simulation. ::: code-group <<< @/snippets/sim-uo-example/sim-method.ts -<<< @/snippets/provider.ts ::: diff --git a/site/tutorials/sponsoring-gas/gas-sponsorship-eligibility.md b/site/tutorials/sponsoring-gas/gas-sponsorship-eligibility.md index 28552eb77b..8d61333363 100644 --- a/site/tutorials/sponsoring-gas/gas-sponsorship-eligibility.md +++ b/site/tutorials/sponsoring-gas/gas-sponsorship-eligibility.md @@ -24,7 +24,7 @@ As mentioned from the previous guide on [How to Sponsor Gas for a User Operation But what happens when the user operation you are sending fails to satisfy the criteria set in the gas manager policy? How do you check if the user operation is eligible for gas sponsorship before sending the user operation? -If you do send the user operation that is not eligible for the gas sponsorship under your Gas Manager policy, [`sendUserOperation`](/packages/aa-core/provider/sendUserOperation.md) or [`sendTransaction`](/packages/aa-core/provider/sendTransaction.md) will fail due to the error thrown during the [`PaymasterMiddleware`](/packages/aa-core/provider/withPaymasterMiddleware.md) failure. You can follow the guide below to check for gas sponsorship eligibility in advance. +If you do send the user operation that is not eligible for the gas sponsorship under your Gas Manager policy, [`sendUserOperation`](/packages/aa-core/smart-account-client/actions/sendUserOperation.md) or [`sendTransaction`](/packages/aa-core/smart-account-client/actions/sendTransaction.md) will fail due to the error thrown during the [`PaymasterMiddleware`](/packages/aa-core/smart-account-client/#common-to-both) failure. You can follow the guide below to check for gas sponsorship eligibility in advance. ## 1. How to Check if a User Operation is Eligible for Gas Sponsorship @@ -46,13 +46,13 @@ provider.withAlchemyGasManager({ }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: -Then, before you call `sendUserOperation` on the provider, you can use [`checkGasSponsorshipEligibility`](/packages/aa-core/provider/checkGasSponsorshipEligibility.md) to verify the eligibility of the connected account for gas sponsorship concerning the upcoming `UserOperation` (UO) that is intended to be sent. +Then, before you call `sendUserOperation` on the provider, you can use [`checkGasSponsorshipEligibility`](/packages/aa-core/smart-account-client/actions/checkGasSponsorshipEligibility.md) to verify the eligibility of the connected account for gas sponsorship concerning the upcoming `UserOperation` (UO) that is intended to be sent. -Internally, this method invokes [`buildUserOperation`](/packages/aa-core/provider/buildUserOperation.md), which navigates through the middleware pipeline, including the `PaymasterMiddleware`. Its purpose is to construct the UO struct meant for transmission to the bundler. Following the construction of the UO struct, this function verifies if the resulting structure contains a non-empty `paymasterAndData` field. +Internally, this method invokes [`buildUserOperation`](/packages/aa-core/smart-account-client/actions/buildUserOperation.md), which navigates through the middleware pipeline, including the `PaymasterMiddleware`. Its purpose is to construct the UO struct meant for transmission to the bundler. Following the construction of the UO struct, this function verifies if the resulting structure contains a non-empty `paymasterAndData` field. You can utilize this method before sending the user operation to confirm its eligibility for gas sponsorship. Depending on the outcome, it allows you to tailor the user experience accordingly, based on eligibility. @@ -76,7 +76,7 @@ If you attempt to execute the `sendUserOperation` method for user operations ine This section of the guide elucidates how you can circumvent the `PaymasterMiddleware`, enabling the sending of user operations without gas sponsorship. This functionality permits the sending of user operations where users pay the gas fee themselves via their smart account. -When employing various methods on `SmartAccountProvider` to send user operations (e.g., [`sendUserOperation`](/packages/aa-core/provider/sendUserOperation.md) or [`sendTransaction`](/packages/aa-core/provider/sendTransaction.md)), apart from the `UserOperationCallData` or `BatchUserOperationCallData`, you have the option to include an additional parameter named `overrides`. This parameter allows the specification of override values for `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` or `paymasterAndData`. To bypass the `PaymasterMiddleware`, you can specifically set the `paymasterAndData` override. For example, assigning an empty hex string (`0x`) to the `paymasterAndData` field in the overrides would result in the user operation being sent without the paymaster covering the gas fee, but rather paid from the user's own smart account. +When employing various methods on `SmartAccountProvider` to send user operations (e.g., [`sendUserOperation`](/packages/aa-core/smart-account-client/actions/sendUserOperation.md) or [`sendTransaction`](/packages/aa-core/smart-account-client/actions/sendTransaction.md)), apart from the `UserOperationCallData` or `BatchUserOperationCallData`, you have the option to include an additional parameter named `overrides`. This parameter allows the specification of override values for `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `preVerificationGas`, `verificationGasLimit` or `paymasterAndData`. To bypass the `PaymasterMiddleware`, you can specifically set the `paymasterAndData` override. For example, assigning an empty hex string (`0x`) to the `paymasterAndData` field in the overrides would result in the user operation being sent without the paymaster covering the gas fee, but rather paid from the user's own smart account. ```ts [bypass-paymaster-middleware.ts] // If gas sponsorship ineligible, baypass paymaster middleware by passing in the paymasterAndData override diff --git a/site/tutorials/sponsoring-gas/sponsoring-gas.md b/site/tutorials/sponsoring-gas/sponsoring-gas.md index 642224a668..b381b8e8a9 100644 --- a/site/tutorials/sponsoring-gas/sponsoring-gas.md +++ b/site/tutorials/sponsoring-gas/sponsoring-gas.md @@ -30,7 +30,7 @@ After [installing `aa-sdk`](/overview/getting-started#install-the-packages) in y First, create an `AlchemyProvider`. You'll use this to send UOs and interact with the blockchain. -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts Remember to replace `ALCHEMY_API_KEY` with your Alchemy API key. If you don't have one yet, you can create an API key on the [Alchemy dashboard](https://dashboard.alchemy.com/signup/?a=aa-docs). @@ -78,7 +78,7 @@ const { hash } = await provider.sendUserOperation({ }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: @@ -111,7 +111,7 @@ const { hash } = await provider.sendUserOperation({ }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: diff --git a/site/tutorials/transferring-ownership.md b/site/tutorials/transferring-ownership.md index 1c201d4070..6c978881bd 100644 --- a/site/tutorials/transferring-ownership.md +++ b/site/tutorials/transferring-ownership.md @@ -49,7 +49,7 @@ const newOwner = "0x..."; // the address of the new owner const hash = LightSmartContractAccount.transferOwnership(provider, newOwner); // [!code focus:99] ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: @@ -94,8 +94,8 @@ const { hash: userOperationHash } = provider.sendUserOperation({ }); ``` -<<< @/snippets/provider.ts +<<< @/snippets/smartAccountClient.ts ::: -See the [`LightSmartContractAccount`](/packages/aa-accounts/light-account/introduction) docs for more details about our Light Account implementation. +See the [`LightAccount`](/packages/aa-accounts/light-account/) docs for more details about our Light Account implementation. diff --git a/yarn.lock b/yarn.lock index 287536737b..ffeadef36e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,6 +22,59 @@ resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.9.2.tgz#60111a5d9db45b2e5cbb6231b0bb8d97e8659316" integrity sha512-0h+FrQDqe2Wn+IIGFkTCd4aAwTJ+7834Ek1COohCyV26AXhwQ7WQaz+4F/nLOeVl/3BtWHOHLPsq46V8YB46Eg== +"@alchemy/aa-accounts@^2.1.0", "@alchemy/aa-accounts@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@alchemy/aa-accounts/-/aa-accounts-2.4.0.tgz#c5afd75e5aad732f60ec96e09da463d6ee8619bd" + integrity sha512-+RGBzhkeh6nXFOV02Kb6vg5B6thWzNDes2jPTG39vq3YkF6Q97jAEMtM9e2kq/iP9cJlHHk6duSOD/hcLUnKfg== + dependencies: + "@alchemy/aa-core" "^2.3.1" + viem "^1.21.4" + +"@alchemy/aa-alchemy@^2.1.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@alchemy/aa-alchemy/-/aa-alchemy-2.4.0.tgz#fd40d76b1fb1f6b529a16f5c1ab74abcbe40a944" + integrity sha512-SuvU1/ivQ4e+M6qq3N/m6dlZ8i84LmmEnCCL4HTXgyqbok6ITNOrIWfeK3SmocADR0WQ+FPnEAB4Dp8oeQjKdA== + dependencies: + "@alchemy/aa-core" "^2.3.1" + viem "^1.21.4" + optionalDependencies: + "@alchemy/aa-accounts" "^2.4.0" + alchemy-sdk "^3.0.0" + +"@alchemy/aa-core@^2.0.0", "@alchemy/aa-core@^2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@alchemy/aa-core/-/aa-core-2.3.1.tgz#ebd0abc2a71d1e5803cbbd0b0584a62a681c9a27" + integrity sha512-iADsVGbhm4rbvFwcauKwD8u5AbzoE+8d8iQpagGHkPDpcNVzFP/FHv48jvdg9M52kf4h2XGdrQviT02bdJFTKw== + dependencies: + abitype "^0.8.3" + eventemitter3 "^5.0.1" + viem "^1.21.4" + zod "^3.22.4" + +"@alchemy/aa-signers@^2.0.0": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@alchemy/aa-signers/-/aa-signers-2.3.1.tgz#d60efcc64a27cac37c20de383d0de6cdcb8c7b5b" + integrity sha512-JDRfKH+//YmJpi1jFagoBYz/jaDPCkuSTKEROp5brXc3jWQ6bJwirkYKwhha2h5UcZdUSYsvdfH0InspQSWIUw== + dependencies: + "@alchemy/aa-core" "^2.3.1" + viem "^1.21.4" + optionalDependencies: + "@arcana/auth" "^1.0.8" + "@fireblocks/fireblocks-web3-provider" "^1.2.6" + "@lit-protocol/crypto" "3.0.24" + "@lit-protocol/lit-node-client" "3.0.24" + "@lit-protocol/pkp-ethers" "3.0.24" + "@lit-protocol/types" "3.0.24" + "@particle-network/auth" "^1.2.2" + "@particle-network/provider" "^1.2.1" + "@portal-hq/web" "^0.0.8" + "@turnkey/http" "^2.4.2" + "@turnkey/viem" "^0.4.2" + "@usecapsule/web-sdk" "^0.29.4" + "@web3auth/base" "^7.1.0" + "@web3auth/modal" "^7.1.1" + magic-sdk "^21.3.0" + "@algolia/autocomplete-core@1.9.3": version "1.9.3" resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz#1d56482a768c33aae0868c8533049e02e8961be7" @@ -4040,11 +4093,6 @@ fireblocks-sdk "^3.1.4" web3-providers-http "1.8.0" -"@gar/promisify@^1.1.3": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" - integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== - "@humanwhocodes/config-array@^0.11.13": version "0.11.13" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297" @@ -4124,12 +4172,7 @@ wrap-ansi "^8.1.0" wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" -"@isaacs/string-locale-compare@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz#291c227e93fd407a96ecd59879a35809120e432b" - integrity sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ== - -"@jest/schemas@^29.4.3": +"@jest/schemas@^29.6.3": version "29.6.3" resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== @@ -4181,101 +4224,75 @@ resolved "https://registry.yarnpkg.com/@ledgerhq/connect-kit-loader/-/connect-kit-loader-1.1.2.tgz#d550e3c1f046e4c796f32a75324b03606b7e226a" integrity sha512-mscwGroSJQrCTjtNGBu+18FQbZYA4+q6Tyx6K7CXHl6AwgZKbWfZYdgP2F+fyZcRUdGRsMX8QtvU61VcGGtO1A== -"@lerna/child-process@6.6.2": - version "6.6.2" - resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-6.6.2.tgz#5d803c8dee81a4e013dc428292e77b365cba876c" - integrity sha512-QyKIWEnKQFnYu2ey+SAAm1A5xjzJLJJj3bhIZd3QKyXKKjaJ0hlxam/OsWSltxTNbcyH1jRJjC6Cxv31usv0Ag== - dependencies: - chalk "^4.1.0" - execa "^5.0.0" - strong-log-transformer "^2.1.0" - -"@lerna/create@6.6.2": - version "6.6.2" - resolved "https://registry.yarnpkg.com/@lerna/create/-/create-6.6.2.tgz#39a36d80cddb355340c297ed785aa76f4498177f" - integrity sha512-xQ+1Y7D+9etvUlE+unhG/TwmM6XBzGIdFBaNoW8D8kyOa9M2Jf3vdEtAxVa7mhRz66CENfhL/+I/QkVaa7pwbQ== +"@lerna/create@8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@lerna/create/-/create-8.0.2.tgz#30d1ed29bb2f97d579546759e48f472a4ce9dba2" + integrity sha512-AueSlfiYXqEmy9/EIc17mjlaHFuv734dfgVBegyoefIA7hdeoExtsXnACWf8Tw5af6gwyTL3KAp6QQyc1sTuZQ== dependencies: - "@lerna/child-process" "6.6.2" - dedent "^0.7.0" - fs-extra "^9.1.0" - init-package-json "^3.0.2" - npm-package-arg "8.1.1" - p-reduce "^2.1.0" - pacote "15.1.1" - pify "^5.0.0" - semver "^7.3.4" - slash "^3.0.0" - validate-npm-package-license "^3.0.4" - validate-npm-package-name "^4.0.0" - yargs-parser "20.2.4" - -"@lerna/legacy-package-management@6.6.2": - version "6.6.2" - resolved "https://registry.yarnpkg.com/@lerna/legacy-package-management/-/legacy-package-management-6.6.2.tgz#411c395e72e563ab98f255df77e4068627a85bb0" - integrity sha512-0hZxUPKnHwehUO2xC4ldtdX9bW0W1UosxebDIQlZL2STnZnA2IFmIk2lJVUyFW+cmTPQzV93jfS0i69T9Z+teg== - dependencies: - "@npmcli/arborist" "6.2.3" - "@npmcli/run-script" "4.1.7" - "@nrwl/devkit" ">=15.5.2 < 16" - "@octokit/rest" "19.0.3" - byte-size "7.0.0" + "@npmcli/run-script" "7.0.2" + "@nx/devkit" ">=17.1.2 < 18" + "@octokit/plugin-enterprise-rest" "6.0.1" + "@octokit/rest" "19.0.11" + byte-size "8.1.1" chalk "4.1.0" clone-deep "4.0.1" - cmd-shim "5.0.0" + cmd-shim "6.0.1" columnify "1.6.0" - config-chain "1.1.12" - conventional-changelog-core "4.2.4" - conventional-recommended-bump "6.1.0" - cosmiconfig "7.0.0" + conventional-changelog-core "5.0.1" + conventional-recommended-bump "7.0.1" + cosmiconfig "^8.2.0" dedent "0.7.0" - dot-prop "6.0.1" execa "5.0.0" - file-url "3.0.0" - find-up "5.0.0" - fs-extra "9.1.0" - get-port "5.1.1" + fs-extra "^11.1.1" get-stream "6.0.0" git-url-parse "13.1.0" glob-parent "5.1.2" globby "11.1.0" - graceful-fs "4.2.10" + graceful-fs "4.2.11" has-unicode "2.0.1" - inquirer "8.2.4" - is-ci "2.0.0" + ini "^1.3.8" + init-package-json "5.0.0" + inquirer "^8.2.4" + is-ci "3.0.1" is-stream "2.0.0" - libnpmpublish "7.1.4" + js-yaml "4.1.0" + libnpmpublish "7.3.0" load-json-file "6.2.0" - make-dir "3.1.0" + lodash "^4.17.21" + make-dir "4.0.0" minimatch "3.0.5" multimatch "5.0.0" node-fetch "2.6.7" npm-package-arg "8.1.1" npm-packlist "5.1.1" - npm-registry-fetch "14.0.3" - npmlog "6.0.2" + npm-registry-fetch "^14.0.5" + npmlog "^6.0.2" + nx ">=17.1.2 < 18" p-map "4.0.0" p-map-series "2.1.0" p-queue "6.6.2" - p-waterfall "2.1.1" - pacote "15.1.1" + p-reduce "^2.1.0" + pacote "^17.0.5" pify "5.0.0" - pretty-format "29.4.3" - read-cmd-shim "3.0.0" - read-package-json "5.0.1" + read-cmd-shim "4.0.0" + read-package-json "6.0.4" resolve-from "5.0.0" - semver "7.3.8" + rimraf "^4.4.1" + semver "^7.3.4" signal-exit "3.0.7" - slash "3.0.0" - ssri "9.0.1" + slash "^3.0.0" + ssri "^9.0.1" strong-log-transformer "2.1.0" tar "6.1.11" temp-dir "1.0.0" - tempy "1.0.0" upath "2.0.1" - uuid "8.3.2" - write-file-atomic "4.0.1" + uuid "^9.0.0" + validate-npm-package-license "^3.0.4" + validate-npm-package-name "5.0.0" + write-file-atomic "5.0.1" write-pkg "4.0.0" - yargs "16.2.0" + yargs "17.7.2" + yargs-parser "21.1.1" "@lit-labs/ssr-dom-shim@^1.0.0", "@lit-labs/ssr-dom-shim@^1.1.0": version "1.1.2" @@ -5022,52 +5039,16 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@npmcli/arborist@6.2.3": - version "6.2.3" - resolved "https://registry.yarnpkg.com/@npmcli/arborist/-/arborist-6.2.3.tgz#31f8aed2588341864d3811151d929c01308f8e71" - integrity sha512-lpGOC2ilSJXcc2zfW9QtukcCTcMbl3fVI0z4wvFB2AFIl0C+Q6Wv7ccrpdrQa8rvJ1ZVuc6qkX7HVTyKlzGqKA== - dependencies: - "@isaacs/string-locale-compare" "^1.1.0" - "@npmcli/fs" "^3.1.0" - "@npmcli/installed-package-contents" "^2.0.0" - "@npmcli/map-workspaces" "^3.0.2" - "@npmcli/metavuln-calculator" "^5.0.0" - "@npmcli/name-from-folder" "^2.0.0" - "@npmcli/node-gyp" "^3.0.0" - "@npmcli/package-json" "^3.0.0" - "@npmcli/query" "^3.0.0" - "@npmcli/run-script" "^6.0.0" - bin-links "^4.0.1" - cacache "^17.0.4" - common-ancestor-path "^1.0.1" - hosted-git-info "^6.1.1" - json-parse-even-better-errors "^3.0.0" - json-stringify-nice "^1.1.4" - minimatch "^6.1.6" - nopt "^7.0.0" - npm-install-checks "^6.0.0" - npm-package-arg "^10.1.0" - npm-pick-manifest "^8.0.1" - npm-registry-fetch "^14.0.3" - npmlog "^7.0.1" - pacote "^15.0.8" - parse-conflict-json "^3.0.0" - proc-log "^3.0.0" - promise-all-reject-late "^1.0.0" - promise-call-limit "^1.0.1" - read-package-json-fast "^3.0.2" - semver "^7.3.7" - ssri "^10.0.1" - treeverse "^3.0.0" - walk-up-path "^1.0.0" - -"@npmcli/fs@^2.1.0": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-2.1.2.tgz#a9e2541a4a2fec2e69c29b35e6060973da79b865" - integrity sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ== +"@npmcli/agent@^2.0.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@npmcli/agent/-/agent-2.2.0.tgz#e81f00fdb2a670750ff7731bbefb47ecbf0ccf44" + integrity sha512-2yThA1Es98orMkpSLVqlDZAMPK3jHJhifP2gnNUdk1754uZ8yI5c+ulCoVG+WlntQA6MzhrURMXjSd9Z7dJ2/Q== dependencies: - "@gar/promisify" "^1.1.3" - semver "^7.3.5" + agent-base "^7.1.0" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.1" + lru-cache "^10.0.1" + socks-proxy-agent "^8.0.1" "@npmcli/fs@^3.1.0": version "3.1.0" @@ -5076,21 +5057,21 @@ dependencies: semver "^7.3.5" -"@npmcli/git@^4.0.0", "@npmcli/git@^4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-4.1.0.tgz#ab0ad3fd82bc4d8c1351b6c62f0fa56e8fe6afa6" - integrity sha512-9hwoB3gStVfa0N31ymBmrX+GuDGdVA/QWShZVqE0HK2Af+7QGGrCTbZia/SW0ImUTjTne7SP91qxDmtXvDHRPQ== +"@npmcli/git@^5.0.0": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-5.0.4.tgz#d18c50f99649e6e89e8b427318134f582498700c" + integrity sha512-nr6/WezNzuYUppzXRaYu/W4aT5rLxdXqEFupbh6e/ovlYFQ8hpu1UUPV3Ir/YTl+74iXl2ZOMlGzudh9ZPUchQ== dependencies: - "@npmcli/promise-spawn" "^6.0.0" - lru-cache "^7.4.4" - npm-pick-manifest "^8.0.0" + "@npmcli/promise-spawn" "^7.0.0" + lru-cache "^10.0.1" + npm-pick-manifest "^9.0.0" proc-log "^3.0.0" promise-inflight "^1.0.1" promise-retry "^2.0.1" semver "^7.3.5" - which "^3.0.0" + which "^4.0.0" -"@npmcli/installed-package-contents@^2.0.0", "@npmcli/installed-package-contents@^2.0.1": +"@npmcli/installed-package-contents@^2.0.1": version "2.0.2" resolved "https://registry.yarnpkg.com/@npmcli/installed-package-contents/-/installed-package-contents-2.0.2.tgz#bfd817eccd9e8df200919e73f57f9e3d9e4f9e33" integrity sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ== @@ -5098,180 +5079,138 @@ npm-bundled "^3.0.0" npm-normalize-package-bin "^3.0.0" -"@npmcli/map-workspaces@^3.0.2": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@npmcli/map-workspaces/-/map-workspaces-3.0.4.tgz#15ad7d854292e484f7ba04bc30187a8320dba799" - integrity sha512-Z0TbvXkRbacjFFLpVpV0e2mheCh+WzQpcqL+4xp49uNJOxOnIAPZyXtUxZ5Qn3QBTGKA11Exjd9a5411rBrhDg== - dependencies: - "@npmcli/name-from-folder" "^2.0.0" - glob "^10.2.2" - minimatch "^9.0.0" - read-package-json-fast "^3.0.0" - -"@npmcli/metavuln-calculator@^5.0.0": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@npmcli/metavuln-calculator/-/metavuln-calculator-5.0.1.tgz#426b3e524c2008bcc82dbc2ef390aefedd643d76" - integrity sha512-qb8Q9wIIlEPj3WeA1Lba91R4ZboPL0uspzV0F9uwP+9AYMVB2zOoa7Pbk12g6D2NHAinSbHh6QYmGuRyHZ874Q== - dependencies: - cacache "^17.0.0" - json-parse-even-better-errors "^3.0.0" - pacote "^15.0.0" - semver "^7.3.5" - -"@npmcli/move-file@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-2.0.1.tgz#26f6bdc379d87f75e55739bab89db525b06100e4" - integrity sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ== - dependencies: - mkdirp "^1.0.4" - rimraf "^3.0.2" - -"@npmcli/name-from-folder@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@npmcli/name-from-folder/-/name-from-folder-2.0.0.tgz#c44d3a7c6d5c184bb6036f4d5995eee298945815" - integrity sha512-pwK+BfEBZJbKdNYpHHRTNBwBoqrN/iIMO0AiGvYsp3Hoaq0WbgGSWQR6SCldZovoDpY3yje5lkFUe6gsDgJ2vg== - -"@npmcli/node-gyp@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-2.0.0.tgz#8c20e53e34e9078d18815c1d2dda6f2420d75e35" - integrity sha512-doNI35wIe3bBaEgrlPfdJPaCpUR89pJWep4Hq3aRdh6gKazIVWfs0jHttvSSoq47ZXgC7h73kDsUl8AoIQUB+A== - "@npmcli/node-gyp@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz#101b2d0490ef1aa20ed460e4c0813f0db560545a" integrity sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA== -"@npmcli/package-json@^3.0.0": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@npmcli/package-json/-/package-json-3.1.1.tgz#5628332aac90fa1b4d6f98e03988c5958b35e0c5" - integrity sha512-+UW0UWOYFKCkvszLoTwrYGrjNrT8tI5Ckeb/h+Z1y1fsNJEctl7HmerA5j2FgmoqFaLI2gsA1X9KgMFqx/bRmA== +"@npmcli/package-json@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@npmcli/package-json/-/package-json-5.0.0.tgz#77d0f8b17096763ccbd8af03b7117ba6e34d6e91" + integrity sha512-OI2zdYBLhQ7kpNPaJxiflofYIpkNLi+lnGdzqUOfRmCF3r2l1nadcjtCYMJKv/Utm/ZtlffaUuTiAktPHbc17g== dependencies: - "@npmcli/git" "^4.1.0" + "@npmcli/git" "^5.0.0" glob "^10.2.2" + hosted-git-info "^7.0.0" json-parse-even-better-errors "^3.0.0" - normalize-package-data "^5.0.0" - npm-normalize-package-bin "^3.0.1" + normalize-package-data "^6.0.0" proc-log "^3.0.0" + semver "^7.5.3" -"@npmcli/promise-spawn@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-3.0.0.tgz#53283b5f18f855c6925f23c24e67c911501ef573" - integrity sha512-s9SgS+p3a9Eohe68cSI3fi+hpcZUmXq5P7w0kMlAsWVtR7XbK3ptkZqKT2cK1zLDObJ3sR+8P59sJE0w/KTL1g== - dependencies: - infer-owner "^1.0.4" - -"@npmcli/promise-spawn@^6.0.0", "@npmcli/promise-spawn@^6.0.1": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz#c8bc4fa2bd0f01cb979d8798ba038f314cfa70f2" - integrity sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg== +"@npmcli/promise-spawn@^7.0.0": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-7.0.1.tgz#a836de2f42a2245d629cf6fbb8dd6c74c74c55af" + integrity sha512-P4KkF9jX3y+7yFUxgcUdDtLy+t4OlDGuEBLNs57AZsfSfg+uV6MLndqGpnl4831ggaEdXwR50XFoZP4VFtHolg== dependencies: - which "^3.0.0" + which "^4.0.0" -"@npmcli/query@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@npmcli/query/-/query-3.0.1.tgz#77d63ceb7d27ed748da3cc8b50d45fc341448ed6" - integrity sha512-0jE8iHBogf/+bFDj+ju6/UMLbJ39c8h6nSe6qile+dB7PJ0iV3gNqcb2vtt6WWCBrxv9uAjzUT/8vroluulidA== +"@npmcli/run-script@7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-7.0.2.tgz#497e7f058799497889df65900c711312252276d3" + integrity sha512-Omu0rpA8WXvcGeY6DDzyRoY1i5DkCBkzyJ+m2u7PD6quzb0TvSqdIPOkTn8ZBOj7LbbcbMfZ3c5skwSu6m8y2w== dependencies: - postcss-selector-parser "^6.0.10" + "@npmcli/node-gyp" "^3.0.0" + "@npmcli/promise-spawn" "^7.0.0" + node-gyp "^10.0.0" + read-package-json-fast "^3.0.0" + which "^4.0.0" -"@npmcli/run-script@4.1.7": - version "4.1.7" - resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-4.1.7.tgz#b1a2f57568eb738e45e9ea3123fb054b400a86f7" - integrity sha512-WXr/MyM4tpKA4BotB81NccGAv8B48lNH0gRoILucbcAhTQXLCoi6HflMV3KdXubIqvP9SuLsFn68Z7r4jl+ppw== +"@npmcli/run-script@^7.0.0": + version "7.0.4" + resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-7.0.4.tgz#9f29aaf4bfcf57f7de2a9e28d1ef091d14b2e6eb" + integrity sha512-9ApYM/3+rBt9V80aYg6tZfzj3UWdiYyCt7gJUD1VJKvWF5nwKDSICXbYIQbspFTq6TOpbsEtIC0LArB8d9PFmg== dependencies: - "@npmcli/node-gyp" "^2.0.0" - "@npmcli/promise-spawn" "^3.0.0" - node-gyp "^9.0.0" - read-package-json-fast "^2.0.3" - which "^2.0.2" + "@npmcli/node-gyp" "^3.0.0" + "@npmcli/package-json" "^5.0.0" + "@npmcli/promise-spawn" "^7.0.0" + node-gyp "^10.0.0" + which "^4.0.0" -"@npmcli/run-script@^6.0.0": - version "6.0.2" - resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-6.0.2.tgz#a25452d45ee7f7fb8c16dfaf9624423c0c0eb885" - integrity sha512-NCcr1uQo1k5U+SYlnIrbAh3cxy+OQT1VtqiAbxdymSlptbzBb62AjH2xXgjNCoP073hoa1CfCAcwoZ8k96C4nA== +"@nrwl/devkit@17.3.0": + version "17.3.0" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-17.3.0.tgz#6b7a60c098776485b60e7133b1ce365eb23e125c" + integrity sha512-3QUCvRisp0Iwwl7VEFQPQUU7wpqGEv9kJBNBtgmhe68ydusdNPk+d0npwkvH23BYPuswTI2MUJyLkdeiB58Ovw== dependencies: - "@npmcli/node-gyp" "^3.0.0" - "@npmcli/promise-spawn" "^6.0.0" - node-gyp "^9.0.0" - read-package-json-fast "^3.0.0" - which "^3.0.0" + "@nx/devkit" "17.3.0" -"@nrwl/cli@15.9.7": - version "15.9.7" - resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-15.9.7.tgz#1db113f5cb1cfe63213097be1ece041eef33da1f" - integrity sha512-1jtHBDuJzA57My5nLzYiM372mJW0NY6rFKxlWt5a0RLsAZdPTHsd8lE3Gs9XinGC1jhXbruWmhhnKyYtZvX/zA== +"@nrwl/tao@17.3.0": + version "17.3.0" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-17.3.0.tgz#e17cd8cca12bdba8cd09aa81e92b26471e0f9a51" + integrity sha512-Bhz+MvAk8CjQtclpEOagGiKzgoziwe+35SlHtvFqzZClAuB8BAx+3ZDNJZcEpDRNfodKqodMUy2OEf6pbzw/LA== dependencies: - nx "15.9.7" + nx "17.3.0" + tslib "^2.3.0" -"@nrwl/devkit@>=15.5.2 < 16": - version "15.9.7" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-15.9.7.tgz#14d19ec82ff4209c12147a97f1cdea05d8f6c087" - integrity sha512-Sb7Am2TMT8AVq8e+vxOlk3AtOA2M0qCmhBzoM1OJbdHaPKc0g0UgSnWRml1kPGg5qfPk72tWclLoZJ5/ut0vTg== +"@nx/devkit@17.3.0", "@nx/devkit@>=17.1.2 < 18": + version "17.3.0" + resolved "https://registry.yarnpkg.com/@nx/devkit/-/devkit-17.3.0.tgz#04c7afd357e21e5fc68a7b8648345a0aa90497e3" + integrity sha512-KPUkEwkGYrg5hDqqXc7sdv4PNXHyWtGwzkBZA3p/RjPieKcQSsTcUwTxQ+taOE4v877n0HuC7hcuLueLSbYGiQ== dependencies: + "@nrwl/devkit" "17.3.0" ejs "^3.1.7" + enquirer "~2.3.6" ignore "^5.0.4" - semver "7.5.4" + semver "7.5.3" tmp "~0.2.1" tslib "^2.3.0" + yargs-parser "21.1.1" -"@nrwl/nx-darwin-arm64@15.9.7": - version "15.9.7" - resolved "https://registry.yarnpkg.com/@nrwl/nx-darwin-arm64/-/nx-darwin-arm64-15.9.7.tgz#a2cb7390c782b8acf3bb8806a3002620226a933d" - integrity sha512-aBUgnhlkrgC0vu0fK6eb9Vob7eFnkuknrK+YzTjmLrrZwj7FGNAeyGXSlyo1dVokIzjVKjJg2saZZ0WQbfuCJw== - -"@nrwl/nx-darwin-x64@15.9.7": - version "15.9.7" - resolved "https://registry.yarnpkg.com/@nrwl/nx-darwin-x64/-/nx-darwin-x64-15.9.7.tgz#af0437e726aeb97eb660646bfd9a7da5ba7a0a6f" - integrity sha512-L+elVa34jhGf1cmn38Z0sotQatmLovxoASCIw5r1CBZZeJ5Tg7Y9nOwjRiDixZxNN56hPKXm6xl9EKlVHVeKlg== - -"@nrwl/nx-linux-arm-gnueabihf@15.9.7": - version "15.9.7" - resolved "https://registry.yarnpkg.com/@nrwl/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-15.9.7.tgz#e29f4d31afa903bfb4d0fd7421e19be1086eae87" - integrity sha512-pqmfqqEUGFu6PmmHKyXyUw1Al0Ki8PSaR0+ndgCAb1qrekVDGDfznJfaqxN0JSLeolPD6+PFtLyXNr9ZyPFlFg== - -"@nrwl/nx-linux-arm64-gnu@15.9.7": - version "15.9.7" - resolved "https://registry.yarnpkg.com/@nrwl/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-15.9.7.tgz#eb2880a24d3268dd93583d21a6a0b9ff96bb23b4" - integrity sha512-NYOa/eRrqmM+In5g3M0rrPVIS9Z+q6fvwXJYf/KrjOHqqan/KL+2TOfroA30UhcBrwghZvib7O++7gZ2hzwOnA== - -"@nrwl/nx-linux-arm64-musl@15.9.7": - version "15.9.7" - resolved "https://registry.yarnpkg.com/@nrwl/nx-linux-arm64-musl/-/nx-linux-arm64-musl-15.9.7.tgz#5d04913c4672a96cefa78491824620d8a8bcfd7f" - integrity sha512-zyStqjEcmbvLbejdTOrLUSEdhnxNtdQXlmOuymznCzYUEGRv+4f7OAepD3yRoR0a/57SSORZmmGQB7XHZoYZJA== - -"@nrwl/nx-linux-x64-gnu@15.9.7": - version "15.9.7" - resolved "https://registry.yarnpkg.com/@nrwl/nx-linux-x64-gnu/-/nx-linux-x64-gnu-15.9.7.tgz#cf7f61fd87f35a793e6824952a6eb12242fe43fd" - integrity sha512-saNK5i2A8pKO3Il+Ejk/KStTApUpWgCxjeUz9G+T8A+QHeDloZYH2c7pU/P3jA9QoNeKwjVO9wYQllPL9loeVg== - -"@nrwl/nx-linux-x64-musl@15.9.7": - version "15.9.7" - resolved "https://registry.yarnpkg.com/@nrwl/nx-linux-x64-musl/-/nx-linux-x64-musl-15.9.7.tgz#2bec23c3696780540eb47fa1358dda780c84697f" - integrity sha512-extIUThYN94m4Vj4iZggt6hhMZWQSukBCo8pp91JHnDcryBg7SnYmnikwtY1ZAFyyRiNFBLCKNIDFGkKkSrZ9Q== - -"@nrwl/nx-win32-arm64-msvc@15.9.7": - version "15.9.7" - resolved "https://registry.yarnpkg.com/@nrwl/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-15.9.7.tgz#21b56ef3ab4190370effea71bd83fdc3e47ec69c" - integrity sha512-GSQ54hJ5AAnKZb4KP4cmBnJ1oC4ILxnrG1mekxeM65c1RtWg9NpBwZ8E0gU3xNrTv8ZNsBeKi/9UhXBxhsIh8A== - -"@nrwl/nx-win32-x64-msvc@15.9.7": - version "15.9.7" - resolved "https://registry.yarnpkg.com/@nrwl/nx-win32-x64-msvc/-/nx-win32-x64-msvc-15.9.7.tgz#1677ab1dcce921706b5677dc2844e3e0027f8bd5" - integrity sha512-x6URof79RPd8AlapVbPefUD3ynJZpmah3tYaYZ9xZRMXojVtEHV8Qh5vysKXQ1rNYJiiB8Ah6evSKWLbAH60tw== - -"@nrwl/tao@15.9.7": - version "15.9.7" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-15.9.7.tgz#c0e78c99caa6742762f7558f20d8524bc9015e97" - integrity sha512-OBnHNvQf3vBH0qh9YnvBQQWyyFZ+PWguF6dJ8+1vyQYlrLVk/XZ8nJ4ukWFb+QfPv/O8VBmqaofaOI9aFC4yTw== - dependencies: - nx "15.9.7" +"@nx/nx-darwin-arm64@17.3.0": + version "17.3.0" + resolved "https://registry.yarnpkg.com/@nx/nx-darwin-arm64/-/nx-darwin-arm64-17.3.0.tgz#0bdbdd130a63a11da18dd1e2f350e9bcab314098" + integrity sha512-NDR/HjahhNLx9Q4TjR5/W3IedSkdtK+kUZ09EceVeX33HNdeLjkFA26QtVVmGbhnogLcywAX0KELn7oGv2nO+A== + +"@nx/nx-darwin-x64@17.3.0": + version "17.3.0" + resolved "https://registry.yarnpkg.com/@nx/nx-darwin-x64/-/nx-darwin-x64-17.3.0.tgz#3751b8f42b8abe5ea54c9fd7c6143849d70d12e7" + integrity sha512-3qxOZnHTPTUXAH8WGCtllAXE2jodStDNSkGVeEcDuIK4NO5tFfF4oVCLKKYcnqKsJOVNTS9B/aJG2bVGbaWYVQ== + +"@nx/nx-freebsd-x64@17.3.0": + version "17.3.0" + resolved "https://registry.yarnpkg.com/@nx/nx-freebsd-x64/-/nx-freebsd-x64-17.3.0.tgz#8b510bc8b3e4a63807e71696aac557e14297d198" + integrity sha512-kVGK/wSbRRWqL3sAXlR5diI29kDisutUMaxs5dWxzRzY0U/+Kwon6ayLU1/HGwEykXFhCJE7r9vSqCrnn67dzg== + +"@nx/nx-linux-arm-gnueabihf@17.3.0": + version "17.3.0" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-17.3.0.tgz#7acca82fad3936d7b6afb33724fa10061195a700" + integrity sha512-nb+jsh7zDkXjHEaAM5qmJR0X0wQ1yPbAYJuZSf8oZkllVYXcAofiAf21EqgKHq7vr4sZiCmlDaT16DheM3jyVA== + +"@nx/nx-linux-arm64-gnu@17.3.0": + version "17.3.0" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-17.3.0.tgz#ebc50581afe07859e3b6fa0bee1e4036b2399e80" + integrity sha512-9LkGk2paZn5Ehg/rya8GCISr+CgMz3MZ5PTOO/yEGk6cv6kQSmhZdjUi3wMOQidIqpolRK0MrhSL9DUz8Htl4A== + +"@nx/nx-linux-arm64-musl@17.3.0": + version "17.3.0" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-17.3.0.tgz#8f8c4a9f3fb8f49543c70fb240b02fa56f4cfbe1" + integrity sha512-bMykIGtziR90xLOCdzVDzaLgMXDvCf2Y7KpAj/EqJXpC0j9RmQdkm7VyO3//xN6rpcWjMcn1wgHQ1rPV65vETg== + +"@nx/nx-linux-x64-gnu@17.3.0": + version "17.3.0" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-17.3.0.tgz#a04435ced16d7145eeb93297dd1394b01d807b79" + integrity sha512-Y3KbMhVcgvVvplyVlWzHaSKqGKqWLPTcuXnnNzuWSqLC9q+UdaDE/6+7SryHbJABM2juMHbo9JNp5LlKp3bkEg== + +"@nx/nx-linux-x64-musl@17.3.0": + version "17.3.0" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-17.3.0.tgz#2aebfd21db20e6cddeded56e8aee1e2f9aef5658" + integrity sha512-QvAIZPqvrqI+s2Ddpkb0TE4yRJgXAlL8I+rIA8U+6y266rT5sVJZFPUWubkFWe/PSmqv3l4KqPcsvHTiIzldFA== + +"@nx/nx-win32-arm64-msvc@17.3.0": + version "17.3.0" + resolved "https://registry.yarnpkg.com/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-17.3.0.tgz#d5db483a801878078809fc12424ce3a177512985" + integrity sha512-uoG3g0eZ9lYWZi4CpEVd04fIs+4lqpmU/FAaB3/K+Tfj9daSEIB6j57EX81ECDRB16k74VUdcI32qLAtD8KIMw== + +"@nx/nx-win32-x64-msvc@17.3.0": + version "17.3.0" + resolved "https://registry.yarnpkg.com/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-17.3.0.tgz#48888d453522eea1715fb13af9a2cf3d87ca6901" + integrity sha512-ekoejj7ZXMSNYrgQwd/7thCNTHbDRggsqPw5LlTa/jPonsQ4TAPzmLBJUF8hCKn43xXLXaFufK4V1OMxlP1Hfg== "@octokit/auth-token@^3.0.0": version "3.0.4" resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-3.0.4.tgz#70e941ba742bdd2b49bdb7393e821dea8520a3db" integrity sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ== -"@octokit/core@^4.0.0": +"@octokit/core@^4.2.1": version "4.2.4" resolved "https://registry.yarnpkg.com/@octokit/core/-/core-4.2.4.tgz#d8769ec2b43ff37cc3ea89ec4681a20ba58ef907" integrity sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ== @@ -5302,16 +5241,6 @@ "@octokit/types" "^9.0.0" universal-user-agent "^6.0.0" -"@octokit/openapi-types@^12.11.0": - version "12.11.0" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.11.0.tgz#da5638d64f2b919bca89ce6602d059f1b52d3ef0" - integrity sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ== - -"@octokit/openapi-types@^14.0.0": - version "14.0.0" - resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-14.0.0.tgz#949c5019028c93f189abbc2fb42f333290f7134a" - integrity sha512-HNWisMYlR8VCnNurDU6os2ikx0s0VyEjDYHNS/h4cgb8DeOxQ0n72HyinUtdDVxJhFy3FWLGl0DJhfEWk3P5Iw== - "@octokit/openapi-types@^18.0.0": version "18.1.1" resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-18.1.1.tgz#09bdfdabfd8e16d16324326da5148010d765f009" @@ -5322,25 +5251,25 @@ resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz#e07896739618dab8da7d4077c658003775f95437" integrity sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw== -"@octokit/plugin-paginate-rest@^3.0.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-3.1.0.tgz#86f8be759ce2d6d7c879a31490fd2f7410b731f0" - integrity sha512-+cfc40pMzWcLkoDcLb1KXqjX0jTGYXjKuQdFQDc6UAknISJHnZTiBqld6HDwRJvD4DsouDKrWXNbNV0lE/3AXA== +"@octokit/plugin-paginate-rest@^6.1.2": + version "6.1.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz#f86456a7a1fe9e58fec6385a85cf1b34072341f8" + integrity sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ== dependencies: - "@octokit/types" "^6.41.0" + "@octokit/tsconfig" "^1.0.2" + "@octokit/types" "^9.2.3" "@octokit/plugin-request-log@^1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85" integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== -"@octokit/plugin-rest-endpoint-methods@^6.0.0": - version "6.8.1" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.8.1.tgz#97391fda88949eb15f68dc291957ccbe1d3e8ad1" - integrity sha512-QrlaTm8Lyc/TbU7BL/8bO49vp+RZ6W3McxxmmQTgYxf2sWkO8ZKuj4dLhPNJD6VCUW1hetCmeIM0m6FTVpDiEg== +"@octokit/plugin-rest-endpoint-methods@^7.1.2": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.2.3.tgz#37a84b171a6cb6658816c82c4082ac3512021797" + integrity sha512-I5Gml6kTAkzVlN7KCtjOM+Ruwe/rQppp0QU372K1GP7kNOYEKe8Xn5BW4sE62JAHdwpq95OQK/qGNyKQMUzVgA== dependencies: - "@octokit/types" "^8.1.1" - deprecation "^2.3.1" + "@octokit/types" "^10.0.0" "@octokit/request-error@^3.0.0": version "3.0.3" @@ -5363,31 +5292,29 @@ node-fetch "^2.6.7" universal-user-agent "^6.0.0" -"@octokit/rest@19.0.3": - version "19.0.3" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-19.0.3.tgz#b9a4e8dc8d53e030d611c053153ee6045f080f02" - integrity sha512-5arkTsnnRT7/sbI4fqgSJ35KiFaN7zQm0uQiQtivNQLI8RQx8EHwJCajcTUwmaCMNDg7tdCvqAnc7uvHHPxrtQ== +"@octokit/rest@19.0.11": + version "19.0.11" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-19.0.11.tgz#2ae01634fed4bd1fca5b642767205ed3fd36177c" + integrity sha512-m2a9VhaP5/tUw8FwfnW2ICXlXpLPIqxtg3XcAiGMLj/Xhw3RSBfZ8le/466ktO1Gcjr8oXudGnHhxV1TXJgFxw== dependencies: - "@octokit/core" "^4.0.0" - "@octokit/plugin-paginate-rest" "^3.0.0" + "@octokit/core" "^4.2.1" + "@octokit/plugin-paginate-rest" "^6.1.2" "@octokit/plugin-request-log" "^1.0.4" - "@octokit/plugin-rest-endpoint-methods" "^6.0.0" + "@octokit/plugin-rest-endpoint-methods" "^7.1.2" -"@octokit/types@^6.41.0": - version "6.41.0" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.41.0.tgz#e58ef78d78596d2fb7df9c6259802464b5f84a04" - integrity sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg== - dependencies: - "@octokit/openapi-types" "^12.11.0" +"@octokit/tsconfig@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@octokit/tsconfig/-/tsconfig-1.0.2.tgz#59b024d6f3c0ed82f00d08ead5b3750469125af7" + integrity sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA== -"@octokit/types@^8.1.1": - version "8.2.1" - resolved "https://registry.yarnpkg.com/@octokit/types/-/types-8.2.1.tgz#a6de091ae68b5541f8d4fcf9a12e32836d4648aa" - integrity sha512-8oWMUji8be66q2B9PmEIUyQm00VPDPun07umUWSaCwxmeaquFBro4Hcc3ruVoDo3zkQyZBlRvhIMEYS3pBhanw== +"@octokit/types@^10.0.0": + version "10.0.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-10.0.0.tgz#7ee19c464ea4ada306c43f1a45d444000f419a4a" + integrity sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg== dependencies: - "@octokit/openapi-types" "^14.0.0" + "@octokit/openapi-types" "^18.0.0" -"@octokit/types@^9.0.0": +"@octokit/types@^9.0.0", "@octokit/types@^9.2.3": version "9.3.2" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-9.3.2.tgz#3f5f89903b69f6a2d196d78ec35f888c0013cac5" integrity sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA== @@ -5463,14 +5390,6 @@ resolved "https://registry.yarnpkg.com/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.3.0.tgz#14e7246289861acc589fd608de39fe5d8b4bb0a7" integrity sha512-dLx+0XRdMnVI62kU3wbXvbIRhLck4aE28bIGKbRGS7BJNt54IIj9+c/Dkqb+7DJEbHUZAX1bwaoM8PqVlHJmCA== -"@parcel/watcher@2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.4.tgz#f300fef4cc38008ff4b8c29d92588eced3ce014b" - integrity sha512-cTDi+FUDBIUOBKEtj+nhiJ71AZVlkAsQFuGQTun5tV9mwQBQgZvhCzG+URPQc8myeN32yRVZEfVAPCs1RW+Jvg== - dependencies: - node-addon-api "^3.2.1" - node-gyp-build "^4.3.0" - "@parcel/watcher@^2.3.0": version "2.3.0" resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.3.0.tgz#803517abbc3981a1a1221791d9f59dc0590d50f9" @@ -5814,7 +5733,19 @@ dependencies: "@sigstore/protobuf-specs" "^0.2.0" -"@sigstore/protobuf-specs@^0.2.0": +"@sigstore/bundle@^2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@sigstore/bundle/-/bundle-2.1.1.tgz#7fad9a1728939301607103722ac6f2a083d2f09a" + integrity sha512-v3/iS+1nufZdKQ5iAlQKcCsoh0jffQyABvYIxKsZQFWc4ubuGjwZklFHpDgV6O6T7vvV78SW5NHI91HFKEcxKg== + dependencies: + "@sigstore/protobuf-specs" "^0.2.1" + +"@sigstore/core@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@sigstore/core/-/core-0.2.0.tgz#2d8ecae2c38a59a52b1dcbd6110014d88de08a80" + integrity sha512-THobAPPZR9pDH2CAvDLpkrYedt7BlZnsyxDe+Isq4ZmGfPy5juOFZq487vCU2EgKD7aHSiTfE/i7sN7aEdzQnA== + +"@sigstore/protobuf-specs@^0.2.0", "@sigstore/protobuf-specs@^0.2.1": version "0.2.1" resolved "https://registry.yarnpkg.com/@sigstore/protobuf-specs/-/protobuf-specs-0.2.1.tgz#be9ef4f3c38052c43bd399d3f792c97ff9e2277b" integrity sha512-XTWVxnWJu+c1oCshMLwnKvz8ZQJJDVOlciMfgpJBQbThVjKTCG8dwyhgLngBD2KN0ap9F/gOV8rFDEx8uh7R2A== @@ -5828,6 +5759,16 @@ "@sigstore/protobuf-specs" "^0.2.0" make-fetch-happen "^11.0.1" +"@sigstore/sign@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@sigstore/sign/-/sign-2.2.1.tgz#b37383db1f25ab20cfec980d23ce08e6f99e6caf" + integrity sha512-U5sKQEj+faE1MsnLou1f4DQQHeFZay+V9s9768lw48J4pKykPj34rWyI1lsMOGJ3Mae47Ye6q3HAJvgXO21rkQ== + dependencies: + "@sigstore/bundle" "^2.1.1" + "@sigstore/core" "^0.2.0" + "@sigstore/protobuf-specs" "^0.2.1" + make-fetch-happen "^13.0.0" + "@sigstore/tuf@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@sigstore/tuf/-/tuf-1.0.3.tgz#2a65986772ede996485728f027b0514c0b70b160" @@ -5836,6 +5777,23 @@ "@sigstore/protobuf-specs" "^0.2.0" tuf-js "^1.1.7" +"@sigstore/tuf@^2.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@sigstore/tuf/-/tuf-2.3.0.tgz#de64925ea10b16f3a7e77535d91eaf22be4dd904" + integrity sha512-S98jo9cpJwO1mtQ+2zY7bOdcYyfVYCUaofCG6wWRzk3pxKHVAkSfshkfecto2+LKsx7Ovtqbgb2LS8zTRhxJ9Q== + dependencies: + "@sigstore/protobuf-specs" "^0.2.1" + tuf-js "^2.2.0" + +"@sigstore/verify@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@sigstore/verify/-/verify-0.1.0.tgz#c017aadb1a516ab4a10651cece29463aa9540bfe" + integrity sha512-2UzMNYAa/uaz11NhvgRnIQf4gpLTJ59bhb8ESXaoSS5sxedfS+eLak8bsdMc+qpNQfITUTFoSKFx5h8umlRRiA== + dependencies: + "@sigstore/bundle" "^2.1.1" + "@sigstore/core" "^0.2.0" + "@sigstore/protobuf-specs" "^0.2.1" + "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" @@ -6308,6 +6266,11 @@ resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-1.0.0.tgz#eade9fd1f537993bc1f0949f3aea276ecc4fab31" integrity sha512-QTnf++uxunWvG2z3UFNzAoQPHxnSXOwtaI3iJ+AohhV+5vONuArPjJE7aPXPVXfXJsqrVbZBu9b81AJoSd09IQ== +"@tufjs/canonical-json@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz#a52f61a3d7374833fca945b2549bc30a2dd40d0a" + integrity sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA== + "@tufjs/models@1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@tufjs/models/-/models-1.0.4.tgz#5a689630f6b9dbda338d4b208019336562f176ef" @@ -6316,6 +6279,14 @@ "@tufjs/canonical-json" "1.0.0" minimatch "^9.0.0" +"@tufjs/models@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tufjs/models/-/models-2.0.0.tgz#c7ab241cf11dd29deb213d6817dabb8c99ce0863" + integrity sha512-c8nj8BaOExmZKO2DXhDfegyhSGcG9E/mPN3U13L+/PsoWm1uaGiHHjxqSHQiasDBQwDA3aHuw9+9spYAP1qvvg== + dependencies: + "@tufjs/canonical-json" "2.0.0" + minimatch "^9.0.3" + "@turnkey/api-key-stamper@0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@turnkey/api-key-stamper/-/api-key-stamper-0.3.0.tgz#b562be7b9c4d7b9874077ba068ac641a7f9c22c0" @@ -7843,7 +7814,7 @@ dependencies: argparse "^2.0.1" -JSONStream@^1.0.4, JSONStream@^1.3.5: +JSONStream@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== @@ -7856,11 +7827,6 @@ abab@^2.0.6: resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== -abbrev@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - abbrev@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-2.0.0.tgz#cf59829b8b4f03f89dda2771cb7f3653828c89bf" @@ -7945,6 +7911,13 @@ agent-base@6, agent-base@^6.0.2: dependencies: debug "4" +agent-base@^7.0.2, agent-base@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.0.tgz#536802b76bc0b34aa50195eb2442276d613e3434" + integrity sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg== + dependencies: + debug "^4.3.4" + agentkeepalive@^4.2.1, agentkeepalive@^4.3.0: version "4.5.0" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" @@ -8101,7 +8074,7 @@ apg-js@^4.1.1: resolved "https://registry.yarnpkg.com/apg-js/-/apg-js-4.2.1.tgz#cae595e8300fa4c5bc7ef755da9ac4289b70a62c" integrity sha512-S3unf9jb9XrhmZYC27L5yits1p/+HqN6lksrkqKEv1U0Ytu+ENkIkOMV5+iutFjBaY9JTUCDQFS1svHsy3uNZA== -"aproba@^1.0.3 || ^2.0.0", aproba@^2.0.0: +"aproba@^1.0.3 || ^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== @@ -8119,14 +8092,6 @@ are-we-there-yet@^3.0.0: delegates "^1.0.0" readable-stream "^3.6.0" -are-we-there-yet@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-4.0.1.tgz#05a6fc0e5f70771b673e82b0f915616e0ace8fd3" - integrity sha512-2zuA+jpOYBRgoBCfa+fB87Rk0oGJjDX6pxGzqH6f33NzUhG25Xur6R0u0Z9VVAq8Z5JvQpQI6j6rtonuivC8QA== - dependencies: - delegates "^1.0.0" - readable-stream "^4.1.0" - arg@^4.1.0: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" @@ -8324,11 +8289,6 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - atomic-sleep@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" @@ -8387,7 +8347,7 @@ axios@^0.27.2: follow-redirects "^1.14.9" form-data "^4.0.0" -axios@^1.0.0, axios@^1.3.6, axios@^1.4.0: +axios@^1.3.6, axios@^1.4.0: version "1.6.2" resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.2.tgz#de67d42c755b571d3e698df1b6504cde9b0ee9f2" integrity sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A== @@ -8396,6 +8356,15 @@ axios@^1.0.0, axios@^1.3.6, axios@^1.4.0: form-data "^4.0.0" proxy-from-env "^1.1.0" +axios@^1.5.1: + version "1.6.7" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.7.tgz#7b48c2e27c96f9c68a2f8f31e2ab19f59b06b0a7" + integrity sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA== + dependencies: + follow-redirects "^1.15.4" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + axobject-query@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.1.tgz#39c378a6e3b06ca679f29138151e45b2b32da62a" @@ -8512,16 +8481,6 @@ bignumber.js@*, bignumber.js@^9.0.0, bignumber.js@^9.1.2: resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== -bin-links@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-4.0.3.tgz#9e4a3c5900830aee3d7f52178b65e01dcdde64a5" - integrity sha512-obsRaULtJurnfox/MDwgq6Yo9kzbv1CPTk/1/s7Z/61Lezc8IKkFCOXNeVLXz0456WRzBQmSsDWlai2tIhBsfA== - dependencies: - cmd-shim "^6.0.0" - npm-normalize-package-bin "^3.0.0" - read-cmd-shim "^4.0.0" - write-file-atomic "^5.0.0" - binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" @@ -8810,51 +8769,45 @@ busboy@1.6.0: dependencies: streamsearch "^1.1.0" -byte-size@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-7.0.0.tgz#36528cd1ca87d39bd9abd51f5715dc93b6ceb032" - integrity sha512-NNiBxKgxybMBtWdmvx7ZITJi4ZG+CYUgwOSZTfqB1qogkRHrhbQE/R2r5Fh94X+InN5MCYz6SvB/ejHMj/HbsQ== +byte-size@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-8.1.1.tgz#3424608c62d59de5bfda05d31e0313c6174842ae" + integrity sha512-tUkzZWK0M/qdoLEqikxBWe4kumyuwjl3HO6zHTr4yEI23EojPtLYXdG1+AQY7MN0cGyNDvEaJ8wiYQm6P2bPxg== cac@^6.7.12, cac@^6.7.14: version "6.7.14" resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== -cacache@^16.1.0: - version "16.1.3" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-16.1.3.tgz#a02b9f34ecfaf9a78c9f4bc16fceb94d5d67a38e" - integrity sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ== +cacache@^17.0.0: + version "17.1.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-17.1.4.tgz#b3ff381580b47e85c6e64f801101508e26604b35" + integrity sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A== dependencies: - "@npmcli/fs" "^2.1.0" - "@npmcli/move-file" "^2.0.0" - chownr "^2.0.0" - fs-minipass "^2.1.0" - glob "^8.0.1" - infer-owner "^1.0.4" + "@npmcli/fs" "^3.1.0" + fs-minipass "^3.0.0" + glob "^10.2.2" lru-cache "^7.7.1" - minipass "^3.1.6" + minipass "^7.0.3" minipass-collect "^1.0.2" minipass-flush "^1.0.5" minipass-pipeline "^1.2.4" - mkdirp "^1.0.4" p-map "^4.0.0" - promise-inflight "^1.0.1" - rimraf "^3.0.2" - ssri "^9.0.0" + ssri "^10.0.0" tar "^6.1.11" - unique-filename "^2.0.0" + unique-filename "^3.0.0" -cacache@^17.0.0, cacache@^17.0.4: - version "17.1.4" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-17.1.4.tgz#b3ff381580b47e85c6e64f801101508e26604b35" - integrity sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A== +cacache@^18.0.0: + version "18.0.2" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-18.0.2.tgz#fd527ea0f03a603be5c0da5805635f8eef00c60c" + integrity sha512-r3NU8h/P+4lVUHfeRw1dtgQYar3DZMm4/cm2bZgOvrFC/su7budSOeqh52VJIC4U4iG1WWwV6vRW0znqBvxNuw== dependencies: "@npmcli/fs" "^3.1.0" fs-minipass "^3.0.0" glob "^10.2.2" - lru-cache "^7.7.1" + lru-cache "^10.0.1" minipass "^7.0.3" - minipass-collect "^1.0.2" + minipass-collect "^2.0.1" minipass-flush "^1.0.5" minipass-pipeline "^1.2.4" p-map "^4.0.0" @@ -9045,12 +8998,7 @@ chownr@^2.0.0: resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== -ci-info@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" - integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - -ci-info@^3.6.1: +ci-info@^3.2.0, ci-info@^3.6.1: version "3.9.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== @@ -9187,17 +9135,10 @@ cluster-key-slot@^1.1.0: resolved "https://registry.yarnpkg.com/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz#88ddaa46906e303b5de30d3153b7d9fe0a0c19ac" integrity sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA== -cmd-shim@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-5.0.0.tgz#8d0aaa1a6b0708630694c4dbde070ed94c707724" - integrity sha512-qkCtZ59BidfEwHltnJwkyVZn+XQojdAySM1D1gSeh11Z4pW1Kpolkyo53L5noc0nrxmIvyFwTmJRo4xs7FFLPw== - dependencies: - mkdirp-infer-owner "^2.0.0" - -cmd-shim@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-6.0.2.tgz#435fd9e5c95340e61715e19f90209ed6fcd9e0a4" - integrity sha512-+FFYbB0YLaAkhkcrjkyNLYDiOsFSfRjwjY19LXk/psmMx1z00xlCv7hhQoTGXXIKi+YXHL/iiFo8NqMVQX9nOw== +cmd-shim@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-6.0.1.tgz#a65878080548e1dca760b3aea1e21ed05194da9d" + integrity sha512-S9iI9y0nKR4hwEQsVWpyxld/6kRfGepGfzff83FcaiEBpmvlbA2nnGe7Cylgrx2f/p1P5S5wpRm9oL8z1PbS3Q== color-convert@^1.9.0: version "1.9.3" @@ -9278,11 +9219,6 @@ commander@^4.0.0: resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== -common-ancestor-path@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz#4f7d2d1394d91b7abdf51871c62f71eadb0182a7" - integrity sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w== - compare-func@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-2.0.0.tgz#fb65e75edbddfd2e568554e8b5b05fff7a51fcb3" @@ -9330,14 +9266,6 @@ concordance@^5.0.4: semver "^7.3.2" well-known-symbols "^2.0.0" -config-chain@1.1.12: - version "1.1.12" - resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" - integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== - dependencies: - ini "^1.3.4" - proto-list "~1.2.1" - confusing-browser-globals@^1.0.11: version "1.0.11" resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" @@ -9362,13 +9290,12 @@ constant-case@^3.0.4: tslib "^2.0.3" upper-case "^2.0.2" -conventional-changelog-angular@5.0.12: - version "5.0.12" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.12.tgz#c979b8b921cbfe26402eb3da5bbfda02d865a2b9" - integrity sha512-5GLsbnkR/7A89RyHLvvoExbiGbd9xKdKqDTrArnPbOqBqG/2wIosu0fHwpeIRI8Tl94MhVNBXcLJZl92ZQ5USw== +conventional-changelog-angular@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz#5eec8edbff15aa9b1680a8dcfbd53e2d7eb2ba7a" + integrity sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ== dependencies: compare-func "^2.0.0" - q "^1.5.1" conventional-changelog-angular@^6.0.0: version "6.0.0" @@ -9384,65 +9311,48 @@ conventional-changelog-conventionalcommits@^6.1.0: dependencies: compare-func "^2.0.0" -conventional-changelog-core@4.2.4: - version "4.2.4" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.4.tgz#e50d047e8ebacf63fac3dc67bf918177001e1e9f" - integrity sha512-gDVS+zVJHE2v4SLc6B0sLsPiloR0ygU7HaDW14aNJE1v4SlqJPILPl/aJC7YdtRE4CybBf8gDwObBvKha8Xlyg== +conventional-changelog-core@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-5.0.1.tgz#3c331b155d5b9850f47b4760aeddfc983a92ad49" + integrity sha512-Rvi5pH+LvgsqGwZPZ3Cq/tz4ty7mjijhr3qR4m9IBXNbxGGYgTVVO+duXzz9aArmHxFtwZ+LRkrNIMDQzgoY4A== dependencies: add-stream "^1.0.0" - conventional-changelog-writer "^5.0.0" - conventional-commits-parser "^3.2.0" - dateformat "^3.0.0" - get-pkg-repo "^4.0.0" - git-raw-commits "^2.0.8" + conventional-changelog-writer "^6.0.0" + conventional-commits-parser "^4.0.0" + dateformat "^3.0.3" + get-pkg-repo "^4.2.1" + git-raw-commits "^3.0.0" git-remote-origin-url "^2.0.0" - git-semver-tags "^4.1.1" - lodash "^4.17.15" - normalize-package-data "^3.0.0" - q "^1.5.1" + git-semver-tags "^5.0.0" + normalize-package-data "^3.0.3" read-pkg "^3.0.0" read-pkg-up "^3.0.0" - through2 "^4.0.0" -conventional-changelog-preset-loader@^2.3.4: - version "2.3.4" - resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" - integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== +conventional-changelog-preset-loader@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-3.0.0.tgz#14975ef759d22515d6eabae6396c2ae721d4c105" + integrity sha512-qy9XbdSLmVnwnvzEisjxdDiLA4OmV3o8db+Zdg4WiFw14fP3B6XNz98X0swPPpkTd/pc1K7+adKgEDM1JCUMiA== -conventional-changelog-writer@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-5.0.1.tgz#e0757072f045fe03d91da6343c843029e702f359" - integrity sha512-5WsuKUfxW7suLblAbFnxAcrvf6r+0b7GvNaWUwUIk0bXMnENP/PEieGKVUQrjPqwPT4o3EPAASBXiY6iHooLOQ== +conventional-changelog-writer@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-6.0.1.tgz#d8d3bb5e1f6230caed969dcc762b1c368a8f7b01" + integrity sha512-359t9aHorPw+U+nHzUXHS5ZnPBOizRxfQsWT5ZDHBfvfxQOAik+yfuhKXG66CN5LEWPpMNnIMHUTCKeYNprvHQ== dependencies: - conventional-commits-filter "^2.0.7" - dateformat "^3.0.0" + conventional-commits-filter "^3.0.0" + dateformat "^3.0.3" handlebars "^4.7.7" json-stringify-safe "^5.0.1" - lodash "^4.17.15" - meow "^8.0.0" - semver "^6.0.0" - split "^1.0.0" - through2 "^4.0.0" + meow "^8.1.2" + semver "^7.0.0" + split "^1.0.1" -conventional-commits-filter@^2.0.7: - version "2.0.7" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz#f8d9b4f182fce00c9af7139da49365b136c8a0b3" - integrity sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA== +conventional-commits-filter@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-3.0.0.tgz#bf1113266151dd64c49cd269e3eb7d71d7015ee2" + integrity sha512-1ymej8b5LouPx9Ox0Dw/qAO2dVdfpRFq28e5Y0jJEU8ZrLdy0vOSkkIInwmxErFGhg6SALro60ZrwYFVTUDo4Q== dependencies: lodash.ismatch "^4.4.0" - modify-values "^1.0.0" - -conventional-commits-parser@^3.2.0: - version "3.2.4" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz#a7d3b77758a202a9b2293d2112a8d8052c740972" - integrity sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q== - dependencies: - JSONStream "^1.0.4" - is-text-path "^1.0.1" - lodash "^4.17.15" - meow "^8.0.0" - split2 "^3.0.0" - through2 "^4.0.0" + modify-values "^1.0.1" conventional-commits-parser@^4.0.0: version "4.0.0" @@ -9454,19 +9364,18 @@ conventional-commits-parser@^4.0.0: meow "^8.1.2" split2 "^3.2.2" -conventional-recommended-bump@6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.1.0.tgz#cfa623285d1de554012f2ffde70d9c8a22231f55" - integrity sha512-uiApbSiNGM/kkdL9GTOLAqC4hbptObFo4wW2QRyHsKciGAfQuLU1ShZ1BIVI/+K2BE/W1AWYQMCXAsv4dyKPaw== +conventional-recommended-bump@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-7.0.1.tgz#ec01f6c7f5d0e2491c2d89488b0d757393392424" + integrity sha512-Ft79FF4SlOFvX4PkwFDRnaNiIVX7YbmqGU0RwccUaiGvgp3S0a8ipR2/Qxk31vclDNM+GSdJOVs2KrsUCjblVA== dependencies: concat-stream "^2.0.0" - conventional-changelog-preset-loader "^2.3.4" - conventional-commits-filter "^2.0.7" - conventional-commits-parser "^3.2.0" - git-raw-commits "^2.0.8" - git-semver-tags "^4.1.1" - meow "^8.0.0" - q "^1.5.1" + conventional-changelog-preset-loader "^3.0.0" + conventional-commits-filter "^3.0.0" + conventional-commits-parser "^4.0.0" + git-raw-commits "^3.0.0" + git-semver-tags "^5.0.0" + meow "^8.1.2" convert-source-map@^1.5.0: version "1.9.0" @@ -9519,17 +9428,6 @@ cosmiconfig-typescript-loader@^4.0.0: resolved "https://registry.yarnpkg.com/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.4.0.tgz#f3feae459ea090f131df5474ce4b1222912319f9" integrity sha512-BabizFdC3wBHhbI4kJh0VkQP9GkBfoHPydD0COMce1nJ1kJAB3F2TmJ/I7diULBKtmEWSwEbuN/KDtgnmUUVmw== -cosmiconfig@7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3" - integrity sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA== - dependencies: - "@types/parse-json" "^4.0.0" - import-fresh "^3.2.1" - parse-json "^5.0.0" - path-type "^4.0.0" - yaml "^1.10.0" - cosmiconfig@^7.0.0: version "7.1.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.1.0.tgz#1443b9afa596b670082ea46cbd8f6a62b84635f6" @@ -9541,7 +9439,7 @@ cosmiconfig@^7.0.0: path-type "^4.0.0" yaml "^1.10.0" -cosmiconfig@^8.0.0: +cosmiconfig@^8.0.0, cosmiconfig@^8.2.0: version "8.3.6" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.3.6.tgz#060a2b871d66dba6c8538ea1118ba1ac16f5fae3" integrity sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA== @@ -9658,11 +9556,6 @@ crypto-js@^4.1.1: resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631" integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q== -crypto-random-string@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" - integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== - css-box-model@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/css-box-model/-/css-box-model-1.2.1.tgz#59951d3b81fd6b2074a62d49444415b0d2b4d7c1" @@ -9778,7 +9671,7 @@ date-time@^3.1.0: dependencies: time-zone "^1.0.0" -dateformat@^3.0.0: +dateformat@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== @@ -9901,20 +9794,6 @@ defu@^6.1.2, defu@^6.1.3: resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.3.tgz#6d7f56bc61668e844f9f593ace66fd67ef1205fd" integrity sha512-Vy2wmG3NTkmHNg/kzpuvHhkqeIx3ODWqasgCRbKtbXEN0G+HpEEv9BtJLp7ZG1CZloFaC41Ah3ZFbq7aqCqMeQ== -del@^6.0.0: - version "6.1.1" - resolved "https://registry.yarnpkg.com/del/-/del-6.1.1.tgz#3b70314f1ec0aa325c6b14eb36b95786671edb7a" - integrity sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg== - dependencies: - globby "^11.0.1" - graceful-fs "^4.2.4" - is-glob "^4.0.1" - is-path-cwd "^2.2.0" - is-path-inside "^3.0.2" - p-map "^4.0.0" - rimraf "^3.0.2" - slash "^3.0.0" - delay@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" @@ -9935,7 +9814,7 @@ denque@^2.1.0: resolved "https://registry.yarnpkg.com/denque/-/denque-2.1.0.tgz#e93e1a6569fb5e66f16a3c2a2964617d349d6ab1" integrity sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw== -deprecation@^2.0.0, deprecation@^2.3.1: +deprecation@^2.0.0: version "2.3.1" resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== @@ -9997,6 +9876,11 @@ didyoumean@^1.2.2: resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== +diff-sequences@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== + diff@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" @@ -10071,13 +9955,6 @@ dot-case@^3.0.4: no-case "^3.0.4" tslib "^2.0.3" -dot-prop@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-6.0.1.tgz#fc26b3cf142b9e59b74dbd39ed66ce620c681083" - integrity sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA== - dependencies: - is-obj "^2.0.0" - dot-prop@^5.1.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" @@ -10085,7 +9962,7 @@ dot-prop@^5.1.0: dependencies: is-obj "^2.0.0" -dotenv-expand@^10.0.0: +dotenv-expand@^10.0.0, dotenv-expand@~10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-10.0.0.tgz#12605d00fb0af6d0a592e6558585784032e4ef37" integrity sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A== @@ -10095,10 +9972,10 @@ dotenv@^16.0.3, dotenv@^16.3.1: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== -dotenv@~10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" - integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== +dotenv@~16.3.1: + version "16.3.2" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.2.tgz#3cb611ce5a63002dbabf7c281bc331f69d28f03f" + integrity sha512-HTlk5nmhkm8F6JcdXvHIzaorzCoziNQT9mGxLPVXW8wJF1TiGSL60ZGB4gHWabHOaMmWmhvk2/lPHfnBiT78AQ== draggabilly@^3.0.0: version "3.0.0" @@ -10237,10 +10114,10 @@ env-paths@^2.2.0: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== -envinfo@^7.7.4: - version "7.11.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.11.0.tgz#c3793f44284a55ff8c82faf1ffd91bc6478ea01f" - integrity sha512-G9/6xF1FPbIw0TtalAMaVPpiq2aDEuKLXM314jPVAO9r2fo2a4BLqMNkmRS7O/xPPZ+COAhGIz3ETvHEV3eUcg== +envinfo@7.8.1: + version "7.8.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" + integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== err-code@^2.0.2: version "2.0.3" @@ -11127,17 +11004,6 @@ fast-fifo@^1.0.0: resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c" integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ== -fast-glob@3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" - integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - fast-glob@^3.2.9, fast-glob@^3.3.0, fast-glob@^3.3.1: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" @@ -11228,11 +11094,6 @@ file-uri-to-path@1.0.0: resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== -file-url@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/file-url/-/file-url-3.0.0.tgz#247a586a746ce9f7a8ed05560290968afc262a77" - integrity sha512-g872QGsHexznxkIAdK8UiZRe7SkE6kvylShU4Nsj8NvfvZag7S0QuQ4IgvPDkk75HxgjIVDwycFTDAgIiO4nDA== - filelist@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" @@ -11257,14 +11118,6 @@ find-root@^1.1.0: resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng== -find-up@5.0.0, find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - find-up@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" @@ -11280,6 +11133,14 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + find-up@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790" @@ -11345,6 +11206,11 @@ follow-redirects@^1.14.0, follow-redirects@^1.14.8, follow-redirects@^1.14.9, fo resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== +follow-redirects@^1.15.4: + version "1.15.5" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.5.tgz#54d4d6d062c0fa7d9d17feb008461550e3ba8020" + integrity sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" @@ -11409,16 +11275,6 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== -fs-extra@9.1.0, fs-extra@^9.1.0: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - fs-extra@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" @@ -11428,7 +11284,7 @@ fs-extra@^10.1.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^11.0.0, fs-extra@^11.1.0: +fs-extra@^11.0.0, fs-extra@^11.1.0, fs-extra@^11.1.1: version "11.2.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== @@ -11437,7 +11293,7 @@ fs-extra@^11.0.0, fs-extra@^11.1.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-minipass@^2.0.0, fs-minipass@^2.1.0: +fs-minipass@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== @@ -11495,20 +11351,6 @@ gauge@^4.0.3: strip-ansi "^6.0.1" wide-align "^1.1.5" -gauge@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-5.0.1.tgz#1efc801b8ff076b86ef3e9a7a280a975df572112" - integrity sha512-CmykPMJGuNan/3S4kZOpvvPYSNqSHANiWnh9XcMU2pSjtBfF0XzZ2p1bFAxTbnFxyBuPxQYHhzwaoOmUdqzvxQ== - dependencies: - aproba "^1.0.3 || ^2.0.0" - color-support "^1.1.3" - console-control-strings "^1.1.0" - has-unicode "^2.0.1" - signal-exit "^4.0.1" - string-width "^4.2.3" - strip-ansi "^6.0.1" - wide-align "^1.1.5" - gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -11544,7 +11386,7 @@ get-nonce@^1.0.0: resolved "https://registry.yarnpkg.com/get-nonce/-/get-nonce-1.0.1.tgz#fdf3f0278073820d2ce9426c18f07481b1e0cdf3" integrity sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q== -get-pkg-repo@^4.0.0: +get-pkg-repo@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz#75973e1c8050c73f48190c52047c4cee3acbf385" integrity sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA== @@ -11599,7 +11441,7 @@ get-tsconfig@^4.5.0: dependencies: resolve-pkg-maps "^1.0.0" -git-raw-commits@^2.0.11, git-raw-commits@^2.0.8: +git-raw-commits@^2.0.11: version "2.0.11" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.11.tgz#bc3576638071d18655e1cc60d7f524920008d723" integrity sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A== @@ -11610,6 +11452,15 @@ git-raw-commits@^2.0.11, git-raw-commits@^2.0.8: split2 "^3.0.0" through2 "^4.0.0" +git-raw-commits@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-3.0.0.tgz#5432f053a9744f67e8db03dbc48add81252cfdeb" + integrity sha512-b5OHmZ3vAgGrDn/X0kS+9qCfNKWe4K/jFnhwzVWWg0/k5eLa3060tZShrRg8Dja5kPc+YjS0Gc6y7cRr44Lpjw== + dependencies: + dargs "^7.0.0" + meow "^8.1.2" + split2 "^3.2.2" + git-remote-origin-url@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" @@ -11618,13 +11469,13 @@ git-remote-origin-url@^2.0.0: gitconfiglocal "^1.0.0" pify "^2.3.0" -git-semver-tags@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-4.1.1.tgz#63191bcd809b0ec3e151ba4751c16c444e5b5780" - integrity sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA== +git-semver-tags@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-5.0.1.tgz#db748aa0e43d313bf38dcd68624d8443234e1c15" + integrity sha512-hIvOeZwRbQ+7YEUmCkHqo8FOLQZCEn18yevLHADlFPZY02KJGsu5FZt9YW/lybfK2uhWFI7Qg/07LekJiTv7iA== dependencies: - meow "^8.0.0" - semver "^6.0.0" + meow "^8.1.2" + semver "^7.0.0" git-up@^7.0.0: version "7.0.0" @@ -11667,18 +11518,6 @@ glob-to-regexp@^0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@7.1.4: - version "7.1.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" - integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" @@ -11703,7 +11542,7 @@ glob@7.1.7: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^10.2.2: +glob@^10.2.2, glob@^10.3.10: version "10.3.10" resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.10.tgz#0351ebb809fd187fe421ab96af83d3a70715df4b" integrity sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g== @@ -11714,7 +11553,7 @@ glob@^10.2.2: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" -glob@^7.1.3, glob@^7.1.4: +glob@^7.1.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -11781,7 +11620,7 @@ globalthis@^1.0.1, globalthis@^1.0.3: dependencies: define-properties "^1.1.3" -globby@11.1.0, globby@^11.0.1, globby@^11.1.0: +globby@11.1.0, globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -11811,12 +11650,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@4.2.10: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6: +graceful-fs@4.2.11, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -12070,20 +11904,20 @@ hosted-git-info@^4.0.0, hosted-git-info@^4.0.1: dependencies: lru-cache "^6.0.0" -hosted-git-info@^5.0.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-5.2.1.tgz#0ba1c97178ef91f3ab30842ae63d6a272341156f" - integrity sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw== - dependencies: - lru-cache "^7.5.1" - -hosted-git-info@^6.0.0, hosted-git-info@^6.1.1: +hosted-git-info@^6.0.0: version "6.1.1" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-6.1.1.tgz#629442c7889a69c05de604d52996b74fe6f26d58" integrity sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w== dependencies: lru-cache "^7.5.1" +hosted-git-info@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-7.0.1.tgz#9985fcb2700467fecf7f33a4d4874e30680b5322" + integrity sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA== + dependencies: + lru-cache "^10.0.1" + html-encoding-sniffer@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9" @@ -12103,7 +11937,7 @@ html-void-elements@^3.0.0: resolved "https://registry.yarnpkg.com/html-void-elements/-/html-void-elements-3.0.0.tgz#fc9dbd84af9e747249034d4d62602def6517f1d7" integrity sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg== -http-cache-semantics@^4.1.0, http-cache-semantics@^4.1.1: +http-cache-semantics@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== @@ -12122,6 +11956,14 @@ http-proxy-agent@^5.0.0: agent-base "6" debug "4" +http-proxy-agent@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz#e9096c5afd071a3fce56e6252bb321583c124673" + integrity sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + http-shutdown@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/http-shutdown/-/http-shutdown-1.2.2.tgz#41bc78fc767637c4c95179bc492f312c0ae64c5f" @@ -12135,6 +11977,14 @@ https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1: agent-base "6" debug "4" +https-proxy-agent@^7.0.1: + version "7.0.2" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz#e2645b846b90e96c6e6f347fb5b2e41f1590b09b" + integrity sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA== + dependencies: + agent-base "^7.0.2" + debug "4" + human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -12219,7 +12069,7 @@ ignore-walk@^5.0.1: dependencies: minimatch "^5.0.1" -ignore-walk@^6.0.0: +ignore-walk@^6.0.4: version "6.0.4" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-6.0.4.tgz#89950be94b4f522225eb63a13c56badb639190e9" integrity sha512-t7sv42WkwFkyKbivUCglsQW5YWMskWtbEf4MNKX5u/CCWHKSPzN4FtBQGsQZgCLbxOzpVlcbWVK5KB3auIOjSw== @@ -12244,7 +12094,7 @@ import-fresh@^3.0.0, import-fresh@^3.2.1, import-fresh@^3.3.0: parent-module "^1.0.0" resolve-from "^4.0.0" -import-local@^3.0.2: +import-local@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== @@ -12262,11 +12112,6 @@ indent-string@^4.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== -infer-owner@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" - integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== - inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -12280,23 +12125,23 @@ inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3, resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== -ini@^1.3.2, ini@^1.3.4: +ini@^1.3.2, ini@^1.3.4, ini@^1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -init-package-json@3.0.2, init-package-json@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-3.0.2.tgz#f5bc9bac93f2bdc005778bc2271be642fecfcd69" - integrity sha512-YhlQPEjNFqlGdzrBfDNRLhvoSgX7iQRgSxgsNknRQ9ITXFT7UMfVMWhBTOh2Y+25lRnGrv5Xz8yZwQ3ACR6T3A== +init-package-json@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-5.0.0.tgz#030cf0ea9c84cfc1b0dc2e898b45d171393e4b40" + integrity sha512-kBhlSheBfYmq3e0L1ii+VKe3zBTLL5lDCDWR+f9dLmEGSB3MqLlMlsolubSsyI88Bg6EA+BIMlomAnQ1SwgQBw== dependencies: - npm-package-arg "^9.0.1" - promzard "^0.3.0" - read "^1.0.7" - read-package-json "^5.0.0" + npm-package-arg "^10.0.0" + promzard "^1.0.0" + read "^2.0.0" + read-package-json "^6.0.0" semver "^7.3.5" validate-npm-package-license "^3.0.4" - validate-npm-package-name "^4.0.0" + validate-npm-package-name "^5.0.0" inline-style-prefixer@^7.0.0: version "7.0.0" @@ -12306,27 +12151,6 @@ inline-style-prefixer@^7.0.0: css-in-js-utils "^3.1.0" fast-loops "^1.1.3" -inquirer@8.2.4: - version "8.2.4" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.4.tgz#ddbfe86ca2f67649a67daa6f1051c128f684f0b4" - integrity sha512-nn4F01dxU8VeKfq192IjLsxu0/OmMZ4Lg3xKAns148rCaXP6ntAoEkVYZThWjwON8AlzdZZi6oqnhNbxUG9hVg== - dependencies: - ansi-escapes "^4.2.1" - chalk "^4.1.1" - cli-cursor "^3.1.0" - cli-width "^3.0.0" - external-editor "^3.0.3" - figures "^3.0.0" - lodash "^4.17.21" - mute-stream "0.0.8" - ora "^5.4.1" - run-async "^2.4.0" - rxjs "^7.5.5" - string-width "^4.1.0" - strip-ansi "^6.0.0" - through "^2.3.6" - wrap-ansi "^7.0.0" - inquirer@^8.2.4: version "8.2.6" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.6.tgz#733b74888195d8d400a67ac332011b5fae5ea562" @@ -12602,12 +12426,12 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-ci@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" - integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== +is-ci@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" + integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ== dependencies: - ci-info "^2.0.0" + ci-info "^3.2.0" is-core-module@^2.11.0, is-core-module@^2.13.0, is-core-module@^2.13.1, is-core-module@^2.5.0, is-core-module@^2.8.1: version "2.13.1" @@ -12736,12 +12560,7 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== -is-path-cwd@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" - integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== - -is-path-inside@^3.0.2, is-path-inside@^3.0.3: +is-path-inside@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== @@ -12900,6 +12719,11 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +isexe@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-3.1.1.tgz#4a407e2bd78ddfb14bea0c27c6f7072dde775f0d" + integrity sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ== + iso-url@^1.1.5: version "1.2.1" resolved "https://registry.yarnpkg.com/iso-url/-/iso-url-1.2.1.tgz#db96a49d8d9a64a1c889fc07cc525d093afb1811" @@ -13055,6 +12879,21 @@ jayson@^4.1.0: uuid "^8.3.2" ws "^7.4.5" +"jest-diff@>=29.4.3 < 30", jest-diff@^29.4.1: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" + integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== + dependencies: + chalk "^4.0.0" + diff-sequences "^29.6.3" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" + +jest-get-type@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" + integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== + jiti@^1.19.1, jiti@^1.20.0: version "1.21.0" resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.0.tgz#7c97f8fe045724e136a397f7340475244156105d" @@ -13144,7 +12983,7 @@ json-parse-better-errors@^1.0.1: resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== -json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: +json-parse-even-better-errors@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== @@ -13192,11 +13031,6 @@ json-stable-stringify@^1.0.2: jsonify "^0.0.1" object-keys "^1.1.1" -json-stringify-nice@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz#2c937962b80181d3f317dd39aa323e14f5a60a67" - integrity sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw== - json-stringify-safe@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -13273,16 +13107,6 @@ jszip@^3.10.1: readable-stream "~2.3.6" setimmediate "^1.0.5" -just-diff-apply@^5.2.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/just-diff-apply/-/just-diff-apply-5.5.0.tgz#771c2ca9fa69f3d2b54e7c3f5c1dfcbcc47f9f0f" - integrity sha512-OYTthRfSh55WOItVqwpefPtNt2VdKsq5AnAK6apdtR6yCH8pr0CmSr710J0Mf+WdQy7K/OzMy7K2MgAfdQURDw== - -just-diff@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/just-diff/-/just-diff-6.0.2.tgz#03b65908543ac0521caf6d8eb85035f7d27ea285" - integrity sha512-S59eriX5u3/QhMNq3v/gm8Kd0w8OS6Tz2FS1NG4blv+z0MuQcBRJyFWjdovM0Rad4/P4aUPFtnkNjMjyMlMSYA== - jwa@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" @@ -13343,87 +13167,85 @@ language-tags@^1.0.9: dependencies: language-subtag-registry "^0.3.20" -lerna@^6.6.1: - version "6.6.2" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-6.6.2.tgz#ad921f913aca4e7307123a598768b6f15ca5804f" - integrity sha512-W4qrGhcdutkRdHEaDf9eqp7u4JvI+1TwFy5woX6OI8WPe4PYBdxuILAsvhp614fUG41rKSGDKlOh+AWzdSidTg== - dependencies: - "@lerna/child-process" "6.6.2" - "@lerna/create" "6.6.2" - "@lerna/legacy-package-management" "6.6.2" - "@npmcli/arborist" "6.2.3" - "@npmcli/run-script" "4.1.7" - "@nrwl/devkit" ">=15.5.2 < 16" +lerna@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-8.0.2.tgz#ef014c4daacb886a602af94e6e7ca8994e140e97" + integrity sha512-nnOIGI5V5Af9gfraNcMVoV1Fry/y7/h3nCQYk0/CMzBYDD+xbNL3DH8+c82AJkNR5ABslmpXjW4DLJ11/1b3CQ== + dependencies: + "@lerna/create" "8.0.2" + "@npmcli/run-script" "7.0.2" + "@nx/devkit" ">=17.1.2 < 18" "@octokit/plugin-enterprise-rest" "6.0.1" - "@octokit/rest" "19.0.3" - byte-size "7.0.0" + "@octokit/rest" "19.0.11" + byte-size "8.1.1" chalk "4.1.0" clone-deep "4.0.1" - cmd-shim "5.0.0" + cmd-shim "6.0.1" columnify "1.6.0" - config-chain "1.1.12" - conventional-changelog-angular "5.0.12" - conventional-changelog-core "4.2.4" - conventional-recommended-bump "6.1.0" - cosmiconfig "7.0.0" + conventional-changelog-angular "7.0.0" + conventional-changelog-core "5.0.1" + conventional-recommended-bump "7.0.1" + cosmiconfig "^8.2.0" dedent "0.7.0" - dot-prop "6.0.1" - envinfo "^7.7.4" + envinfo "7.8.1" execa "5.0.0" - fs-extra "9.1.0" + fs-extra "^11.1.1" get-port "5.1.1" get-stream "6.0.0" git-url-parse "13.1.0" glob-parent "5.1.2" globby "11.1.0" - graceful-fs "4.2.10" + graceful-fs "4.2.11" has-unicode "2.0.1" - import-local "^3.0.2" - init-package-json "3.0.2" + import-local "3.1.0" + ini "^1.3.8" + init-package-json "5.0.0" inquirer "^8.2.4" - is-ci "2.0.0" + is-ci "3.0.1" is-stream "2.0.0" - js-yaml "^4.1.0" - libnpmaccess "^6.0.3" - libnpmpublish "7.1.4" + jest-diff ">=29.4.3 < 30" + js-yaml "4.1.0" + libnpmaccess "7.0.2" + libnpmpublish "7.3.0" load-json-file "6.2.0" - make-dir "3.1.0" + lodash "^4.17.21" + make-dir "4.0.0" minimatch "3.0.5" multimatch "5.0.0" node-fetch "2.6.7" npm-package-arg "8.1.1" npm-packlist "5.1.1" - npm-registry-fetch "^14.0.3" + npm-registry-fetch "^14.0.5" npmlog "^6.0.2" - nx ">=15.5.2 < 16" + nx ">=17.1.2 < 18" p-map "4.0.0" p-map-series "2.1.0" p-pipe "3.1.0" p-queue "6.6.2" p-reduce "2.1.0" p-waterfall "2.1.1" - pacote "15.1.1" + pacote "^17.0.5" pify "5.0.0" - read-cmd-shim "3.0.0" - read-package-json "5.0.1" + read-cmd-shim "4.0.0" + read-package-json "6.0.4" resolve-from "5.0.0" rimraf "^4.4.1" semver "^7.3.8" signal-exit "3.0.7" slash "3.0.0" - ssri "9.0.1" + ssri "^9.0.1" strong-log-transformer "2.1.0" tar "6.1.11" temp-dir "1.0.0" - typescript "^3 || ^4" - upath "^2.0.1" - uuid "8.3.2" + typescript ">=3 < 6" + upath "2.0.1" + uuid "^9.0.0" validate-npm-package-license "3.0.4" - validate-npm-package-name "4.0.0" - write-file-atomic "4.0.1" + validate-npm-package-name "5.0.0" + write-file-atomic "5.0.1" write-pkg "4.0.0" - yargs "16.2.0" - yargs-parser "20.2.4" + yargs "17.7.2" + yargs-parser "21.1.1" levn@^0.4.1: version "0.4.1" @@ -13433,20 +13255,18 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -libnpmaccess@^6.0.3: - version "6.0.4" - resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-6.0.4.tgz#2dd158bd8a071817e2207d3b201d37cf1ad6ae6b" - integrity sha512-qZ3wcfIyUoW0+qSFkMBovcTrSGJ3ZeyvpR7d5N9pEYv/kXs8sHP2wiqEIXBKLFrZlmM0kR0RJD7mtfLngtlLag== +libnpmaccess@7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-7.0.2.tgz#7f056c8c933dd9c8ba771fa6493556b53c5aac52" + integrity sha512-vHBVMw1JFMTgEk15zRsJuSAg7QtGGHpUSEfnbcRL1/gTBag9iEfJbyjpDmdJmwMhvpoLoNBtdAUCdGnaP32hhw== dependencies: - aproba "^2.0.0" - minipass "^3.1.1" - npm-package-arg "^9.0.1" - npm-registry-fetch "^13.0.0" + npm-package-arg "^10.1.0" + npm-registry-fetch "^14.0.3" -libnpmpublish@7.1.4: - version "7.1.4" - resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-7.1.4.tgz#a0d138e00e52a0c71ffc82273acf0082fc2dfb36" - integrity sha512-mMntrhVwut5prP4rJ228eEbEyvIzLWhqFuY90j5QeXBCTT2pWSMno7Yo2S2qplPUr02zPurGH4heGLZ+wORczg== +libnpmpublish@7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-7.3.0.tgz#2ceb2b36866d75a6cd7b4aa748808169f4d17e37" + integrity sha512-fHUxw5VJhZCNSls0KLNEG0mCD2PN1i14gH5elGOgiVnU3VgTcRahagYP2LKI1m0tFCJ+XrAm0zVYyF5RCbXzcg== dependencies: ci-info "^3.6.1" normalize-package-data "^5.0.0" @@ -13765,7 +13585,7 @@ lodash@*, lodash@^4.17.15, lodash@^4.17.21: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@^4.1.0: +log-symbols@^4.0.0, log-symbols@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== @@ -13828,6 +13648,11 @@ lower-case@^2.0.2: dependencies: tslib "^2.0.3" +lru-cache@^10.0.1: + version "10.2.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3" + integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== + lru-cache@^10.0.2, "lru-cache@^9.1.1 || ^10.0.0": version "10.1.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.1.0.tgz#2098d41c2dc56500e6c88584aa656c84de7d0484" @@ -13847,7 +13672,7 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: +lru-cache@^7.5.1, lru-cache@^7.7.1: version "7.18.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== @@ -13869,12 +13694,12 @@ magic-string@^0.30.0, magic-string@^0.30.5: dependencies: "@jridgewell/sourcemap-codec" "^1.4.15" -make-dir@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== +make-dir@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== dependencies: - semver "^6.0.0" + semver "^7.5.3" make-dir@^2.1.0: version "2.1.0" @@ -13889,47 +13714,42 @@ make-error@^1.1.1: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== -make-fetch-happen@^10.0.3, make-fetch-happen@^10.0.6: - version "10.2.1" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz#f5e3835c5e9817b617f2770870d9492d28678164" - integrity sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w== +make-fetch-happen@^11.0.0, make-fetch-happen@^11.0.1, make-fetch-happen@^11.1.1: + version "11.1.1" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz#85ceb98079584a9523d4bf71d32996e7e208549f" + integrity sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w== dependencies: agentkeepalive "^4.2.1" - cacache "^16.1.0" - http-cache-semantics "^4.1.0" + cacache "^17.0.0" + http-cache-semantics "^4.1.1" http-proxy-agent "^5.0.0" https-proxy-agent "^5.0.0" is-lambda "^1.0.1" lru-cache "^7.7.1" - minipass "^3.1.6" - minipass-collect "^1.0.2" - minipass-fetch "^2.0.3" + minipass "^5.0.0" + minipass-fetch "^3.0.0" minipass-flush "^1.0.5" minipass-pipeline "^1.2.4" negotiator "^0.6.3" promise-retry "^2.0.1" socks-proxy-agent "^7.0.0" - ssri "^9.0.0" + ssri "^10.0.0" -make-fetch-happen@^11.0.0, make-fetch-happen@^11.0.1, make-fetch-happen@^11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz#85ceb98079584a9523d4bf71d32996e7e208549f" - integrity sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w== +make-fetch-happen@^13.0.0: + version "13.0.0" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-13.0.0.tgz#705d6f6cbd7faecb8eac2432f551e49475bfedf0" + integrity sha512-7ThobcL8brtGo9CavByQrQi+23aIfgYU++wg4B87AIS8Rb2ZBt/MEaDqzA00Xwv/jUjAjYkLHjVolYuTLKda2A== dependencies: - agentkeepalive "^4.2.1" - cacache "^17.0.0" + "@npmcli/agent" "^2.0.0" + cacache "^18.0.0" http-cache-semantics "^4.1.1" - http-proxy-agent "^5.0.0" - https-proxy-agent "^5.0.0" is-lambda "^1.0.1" - lru-cache "^7.7.1" - minipass "^5.0.0" + minipass "^7.0.2" minipass-fetch "^3.0.0" minipass-flush "^1.0.5" minipass-pipeline "^1.2.4" negotiator "^0.6.3" promise-retry "^2.0.1" - socks-proxy-agent "^7.0.0" ssri "^10.0.0" make-plural@*: @@ -14142,6 +13962,13 @@ minimatch@3.0.5: dependencies: brace-expansion "^1.1.7" +minimatch@9.0.3, minimatch@^9.0.0, minimatch@^9.0.1, minimatch@^9.0.3: + version "9.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" + minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -14156,13 +13983,6 @@ minimatch@^5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@^6.1.6: - version "6.2.0" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-6.2.0.tgz#2b70fd13294178c69c04dfc05aebdb97a4e79e42" - integrity sha512-sauLxniAmvnhhRjFwPNnJKaPFYyddAgbYdeUpHULtCT/GhzdCx/MDNy+Y40lBxTQUrMzDE8e0S43Z5uqfO0REg== - dependencies: - brace-expansion "^2.0.1" - minimatch@^8.0.2: version "8.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-8.0.4.tgz#847c1b25c014d4e9a7f68aaf63dedd668a626229" @@ -14170,13 +13990,6 @@ minimatch@^8.0.2: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.0, minimatch@^9.0.1: - version "9.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" - integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== - dependencies: - brace-expansion "^2.0.1" - minimist-options@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -14198,16 +14011,12 @@ minipass-collect@^1.0.2: dependencies: minipass "^3.0.0" -minipass-fetch@^2.0.3: - version "2.1.2" - resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-2.1.2.tgz#95560b50c472d81a3bc76f20ede80eaed76d8add" - integrity sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA== +minipass-collect@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-2.0.1.tgz#1621bc77e12258a12c60d34e2276ec5c20680863" + integrity sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw== dependencies: - minipass "^3.1.6" - minipass-sized "^1.0.3" - minizlib "^2.1.2" - optionalDependencies: - encoding "^0.1.13" + minipass "^7.0.3" minipass-fetch@^3.0.0: version "3.0.4" @@ -14249,14 +14058,14 @@ minipass-sized@^1.0.3: dependencies: minipass "^3.0.0" -minipass@^3.0.0, minipass@^3.1.1, minipass@^3.1.6: +minipass@^3.0.0, minipass@^3.1.1: version "3.3.6" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== dependencies: yallist "^4.0.0" -minipass@^4.0.0, minipass@^4.2.4: +minipass@^4.2.4: version "4.2.8" resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.8.tgz#f0010f64393ecfc1d1ccb5f582bcaf45f48e1a3a" integrity sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ== @@ -14266,7 +14075,7 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== -"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.3: +"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.0.2, minipass@^7.0.3: version "7.0.4" resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.4.tgz#dbce03740f50a4786ba994c1fb908844d27b038c" integrity sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ== @@ -14284,16 +14093,7 @@ minizlib@^2.1.1, minizlib@^2.1.2: minipass "^3.0.0" yallist "^4.0.0" -mkdirp-infer-owner@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/mkdirp-infer-owner/-/mkdirp-infer-owner-2.0.0.tgz#55d3b368e7d89065c38f32fd38e638f0ab61d316" - integrity sha512-sdqtiFt3lkOaYvTXSRIUjkIdPTcxgv5+fgqYE/5qgwdw12cOrAuzzgzvVExIkH/ul1oeHN3bCLOWSG3XOqbKKw== - dependencies: - chownr "^2.0.0" - infer-owner "^1.0.4" - mkdirp "^1.0.3" - -mkdirp@^1.0.3, mkdirp@^1.0.4: +mkdirp@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -14308,7 +14108,7 @@ mlly@^1.2.0, mlly@^1.4.2: pkg-types "^1.0.3" ufo "^1.3.0" -modify-values@^1.0.0: +modify-values@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== @@ -14400,11 +14200,16 @@ murmurhash3js-revisited@^3.0.0: resolved "https://registry.yarnpkg.com/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz#6bd36e25de8f73394222adc6e41fa3fac08a5869" integrity sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g== -mute-stream@0.0.8, mute-stream@~0.0.4: +mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== +mute-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e" + integrity sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA== + mz@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" @@ -14527,11 +14332,6 @@ node-addon-api@^2.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== -node-addon-api@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" - integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== - node-addon-api@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-5.1.0.tgz#49da1ca055e109a23d537e9de43c09cca21eb762" @@ -14585,35 +14385,32 @@ node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.7.1.tgz#cd7d2eb48e594874053150a9418ac85af83ca8f7" integrity sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg== -node-gyp@^9.0.0: - version "9.4.1" - resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-9.4.1.tgz#8a1023e0d6766ecb52764cc3a734b36ff275e185" - integrity sha512-OQkWKbjQKbGkMf/xqI1jjy3oCTgMKJac58G2+bjZb3fza6gW2YrCSdMQYaoTb70crvE//Gngr4f0AgVHmqHvBQ== +node-gyp@^10.0.0: + version "10.0.1" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-10.0.1.tgz#205514fc19e5830fa991e4a689f9e81af377a966" + integrity sha512-gg3/bHehQfZivQVfqIyy8wTdSymF9yTyP4CJifK73imyNMU8AIGQE2pUa7dNWfmMeG9cDVF2eehiRMv0LC1iAg== dependencies: env-paths "^2.2.0" exponential-backoff "^3.1.1" - glob "^7.1.4" + glob "^10.3.10" graceful-fs "^4.2.6" - make-fetch-happen "^10.0.3" - nopt "^6.0.0" - npmlog "^6.0.0" - rimraf "^3.0.2" + make-fetch-happen "^13.0.0" + nopt "^7.0.0" + proc-log "^3.0.0" semver "^7.3.5" tar "^6.1.2" - which "^2.0.2" + which "^4.0.0" + +node-machine-id@1.1.12: + version "1.1.12" + resolved "https://registry.yarnpkg.com/node-machine-id/-/node-machine-id-1.1.12.tgz#37904eee1e59b320bb9c5d6c0a59f3b469cb6267" + integrity sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ== node-releases@^2.0.14: version "2.0.14" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b" integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== -nopt@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-6.0.0.tgz#245801d8ebf409c6df22ab9d95b65e1309cdb16d" - integrity sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g== - dependencies: - abbrev "^1.0.0" - nopt@^7.0.0: version "7.2.0" resolved "https://registry.yarnpkg.com/nopt/-/nopt-7.2.0.tgz#067378c68116f602f552876194fd11f1292503d7" @@ -14631,7 +14428,7 @@ normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-package-data@^3.0.0: +normalize-package-data@^3.0.0, normalize-package-data@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e" integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== @@ -14641,16 +14438,6 @@ normalize-package-data@^3.0.0: semver "^7.3.4" validate-npm-package-license "^3.0.1" -normalize-package-data@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-4.0.1.tgz#b46b24e0616d06cadf9d5718b29b6d445a82a62c" - integrity sha512-EBk5QKKuocMJhB3BILuKhmaPjI8vNRSpIfO9woLC6NyHVkKKdVEdAO1mrT0ZfxNR1lKwCcTkuZfmGIFdizZ8Pg== - dependencies: - hosted-git-info "^5.0.0" - is-core-module "^2.8.1" - semver "^7.3.5" - validate-npm-package-license "^3.0.4" - normalize-package-data@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-5.0.0.tgz#abcb8d7e724c40d88462b84982f7cbf6859b4588" @@ -14661,6 +14448,16 @@ normalize-package-data@^5.0.0: semver "^7.3.5" validate-npm-package-license "^3.0.4" +normalize-package-data@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-6.0.0.tgz#68a96b3c11edd462af7189c837b6b1064a484196" + integrity sha512-UL7ELRVxYBHBgYEtZCXjxuD5vPxnmvMGq0jp/dGPKKrN7tfsBh2IY7TlJ15WWwdjRWD3RJbnsygUurTK3xkPkg== + dependencies: + hosted-git-info "^7.0.0" + is-core-module "^2.8.1" + semver "^7.3.5" + validate-npm-package-license "^3.0.4" + normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" @@ -14697,12 +14494,7 @@ npm-normalize-package-bin@^1.0.1: resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== -npm-normalize-package-bin@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz#9447a1adaaf89d8ad0abe24c6c84ad614a675fff" - integrity sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ== - -npm-normalize-package-bin@^3.0.0, npm-normalize-package-bin@^3.0.1: +npm-normalize-package-bin@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz#25447e32a9a7de1f51362c61a559233b89947832" integrity sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ== @@ -14726,15 +14518,15 @@ npm-package-arg@^10.0.0, npm-package-arg@^10.1.0: semver "^7.3.5" validate-npm-package-name "^5.0.0" -npm-package-arg@^9.0.1: - version "9.1.2" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-9.1.2.tgz#fc8acecb00235f42270dda446f36926ddd9ac2bc" - integrity sha512-pzd9rLEx4TfNJkovvlBSLGhq31gGu2QDexFPWT19yCDh0JgnRhlBLNo5759N0AJmBk+kQ9Y/hXoLnlgFD+ukmg== +npm-package-arg@^11.0.0: + version "11.0.1" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-11.0.1.tgz#f208b0022c29240a1c532a449bdde3f0a4708ebc" + integrity sha512-M7s1BD4NxdAvBKUPqqRW957Xwcl/4Zvo8Aj+ANrzvIPzGJZElrH7Z//rSaec2ORcND6FHHLnZeY8qgTpXDMFQQ== dependencies: - hosted-git-info "^5.0.0" - proc-log "^2.0.1" + hosted-git-info "^7.0.0" + proc-log "^3.0.0" semver "^7.3.5" - validate-npm-package-name "^4.0.0" + validate-npm-package-name "^5.0.0" npm-packlist@5.1.1: version "5.1.1" @@ -14746,60 +14538,47 @@ npm-packlist@5.1.1: npm-bundled "^1.1.2" npm-normalize-package-bin "^1.0.1" -npm-packlist@^7.0.0: - version "7.0.4" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-7.0.4.tgz#033bf74110eb74daf2910dc75144411999c5ff32" - integrity sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q== +npm-packlist@^8.0.0: + version "8.0.2" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-8.0.2.tgz#5b8d1d906d96d21c85ebbeed2cf54147477c8478" + integrity sha512-shYrPFIS/JLP4oQmAwDyk5HcyysKW8/JLTEA32S0Z5TzvpaeeX2yMFfoK1fjEBnCBvVyIB/Jj/GBFdm0wsgzbA== dependencies: - ignore-walk "^6.0.0" + ignore-walk "^6.0.4" -npm-pick-manifest@^8.0.0, npm-pick-manifest@^8.0.1: - version "8.0.2" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-8.0.2.tgz#2159778d9c7360420c925c1a2287b5a884c713aa" - integrity sha512-1dKY+86/AIiq1tkKVD3l0WI+Gd3vkknVGAggsFeBkTvbhMQ1OND/LKkYv4JtXPKUJ8bOTCyLiqEg2P6QNdK+Gg== +npm-pick-manifest@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-9.0.0.tgz#f87a4c134504a2c7931f2bb8733126e3c3bb7e8f" + integrity sha512-VfvRSs/b6n9ol4Qb+bDwNGUXutpy76x6MARw/XssevE0TnctIKcmklJZM5Z7nqs5z5aW+0S63pgCNbpkUNNXBg== dependencies: npm-install-checks "^6.0.0" npm-normalize-package-bin "^3.0.0" - npm-package-arg "^10.0.0" + npm-package-arg "^11.0.0" semver "^7.3.5" -npm-registry-fetch@14.0.3: - version "14.0.3" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-14.0.3.tgz#8545e321c2b36d2c6fe6e009e77e9f0e527f547b" - integrity sha512-YaeRbVNpnWvsGOjX2wk5s85XJ7l1qQBGAp724h8e2CZFFhMSuw9enom7K1mWVUtvXO1uUSFIAPofQK0pPN0ZcA== +npm-registry-fetch@^14.0.3, npm-registry-fetch@^14.0.5: + version "14.0.5" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz#fe7169957ba4986a4853a650278ee02e568d115d" + integrity sha512-kIDMIo4aBm6xg7jOttupWZamsZRkAqMqwqqbVXnUqstY5+tapvv6bkH/qMR76jdgV+YljEUCyWx3hRYMrJiAgA== dependencies: make-fetch-happen "^11.0.0" - minipass "^4.0.0" + minipass "^5.0.0" minipass-fetch "^3.0.0" minipass-json-stream "^1.0.1" minizlib "^2.1.2" npm-package-arg "^10.0.0" proc-log "^3.0.0" -npm-registry-fetch@^13.0.0: - version "13.3.1" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-13.3.1.tgz#bb078b5fa6c52774116ae501ba1af2a33166af7e" - integrity sha512-eukJPi++DKRTjSBRcDZSDDsGqRK3ehbxfFUcgaRd0Yp6kRwOwh2WVn0r+8rMB4nnuzvAk6rQVzl6K5CkYOmnvw== +npm-registry-fetch@^16.0.0: + version "16.1.0" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-16.1.0.tgz#10227b7b36c97bc1cf2902a24e4f710cfe62803c" + integrity sha512-PQCELXKt8Azvxnt5Y85GseQDJJlglTFM9L9U9gkv2y4e9s0k3GVDdOx3YoB6gm2Do0hlkzC39iCGXby+Wve1Bw== dependencies: - make-fetch-happen "^10.0.6" - minipass "^3.1.6" - minipass-fetch "^2.0.3" - minipass-json-stream "^1.0.1" - minizlib "^2.1.2" - npm-package-arg "^9.0.1" - proc-log "^2.0.0" - -npm-registry-fetch@^14.0.0, npm-registry-fetch@^14.0.3: - version "14.0.5" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz#fe7169957ba4986a4853a650278ee02e568d115d" - integrity sha512-kIDMIo4aBm6xg7jOttupWZamsZRkAqMqwqqbVXnUqstY5+tapvv6bkH/qMR76jdgV+YljEUCyWx3hRYMrJiAgA== - dependencies: - make-fetch-happen "^11.0.0" - minipass "^5.0.0" + make-fetch-happen "^13.0.0" + minipass "^7.0.2" minipass-fetch "^3.0.0" minipass-json-stream "^1.0.1" minizlib "^2.1.2" - npm-package-arg "^10.0.0" + npm-package-arg "^11.0.0" proc-log "^3.0.0" npm-run-path@^4.0.1: @@ -14816,7 +14595,7 @@ npm-run-path@^5.1.0: dependencies: path-key "^4.0.0" -npmlog@6.0.2, npmlog@^6.0.0, npmlog@^6.0.2: +npmlog@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" integrity sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg== @@ -14826,16 +14605,6 @@ npmlog@6.0.2, npmlog@^6.0.0, npmlog@^6.0.2: gauge "^4.0.3" set-blocking "^2.0.0" -npmlog@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-7.0.1.tgz#7372151a01ccb095c47d8bf1d0771a4ff1f53ac8" - integrity sha512-uJ0YFk/mCQpLBt+bxN88AKd+gyqZvZDbtiNxk6Waqcj2aPRyfVx8ITawkyQynxUagInjdYT1+qj4NfA5KJJUxg== - dependencies: - are-we-there-yet "^4.0.0" - console-control-strings "^1.1.0" - gauge "^5.0.0" - set-blocking "^2.0.0" - number-to-bn@1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" @@ -14849,56 +14618,56 @@ nwsapi@^2.2.4: resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.7.tgz#738e0707d3128cb750dddcfe90e4610482df0f30" integrity sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ== -nx@15.9.7, "nx@>=15.5.2 < 16": - version "15.9.7" - resolved "https://registry.yarnpkg.com/nx/-/nx-15.9.7.tgz#f0e713cedb8637a517d9c4795c99afec4959a1b6" - integrity sha512-1qlEeDjX9OKZEryC8i4bA+twNg+lB5RKrozlNwWx/lLJHqWPUfvUTvxh+uxlPYL9KzVReQjUuxMLFMsHNqWUrA== +nx@17.3.0, "nx@>=17.1.2 < 18", nx@^17.3.0: + version "17.3.0" + resolved "https://registry.yarnpkg.com/nx/-/nx-17.3.0.tgz#1e77f29a0e904d88d61dcdfff80ae90c6d964e3d" + integrity sha512-CoY0qUrO8xErbA/v/bbfDGs+KaD9MCO7PReqmIeyrtDNwFl6vnb+U2MpBxCsRP+YH2Oa8hI8Lu+kcnPktx2v6A== dependencies: - "@nrwl/cli" "15.9.7" - "@nrwl/tao" "15.9.7" - "@parcel/watcher" "2.0.4" + "@nrwl/tao" "17.3.0" "@yarnpkg/lockfile" "^1.1.0" "@yarnpkg/parsers" "3.0.0-rc.46" "@zkochan/js-yaml" "0.0.6" - axios "^1.0.0" + axios "^1.5.1" chalk "^4.1.0" cli-cursor "3.1.0" cli-spinners "2.6.1" - cliui "^7.0.2" - dotenv "~10.0.0" + cliui "^8.0.1" + dotenv "~16.3.1" + dotenv-expand "~10.0.0" enquirer "~2.3.6" - fast-glob "3.2.7" figures "3.2.0" flat "^5.0.2" fs-extra "^11.1.0" - glob "7.1.4" ignore "^5.0.4" + jest-diff "^29.4.1" js-yaml "4.1.0" jsonc-parser "3.2.0" lines-and-columns "~2.0.3" - minimatch "3.0.5" + minimatch "9.0.3" + node-machine-id "1.1.12" npm-run-path "^4.0.1" open "^8.4.0" - semver "7.5.4" + ora "5.3.0" + semver "7.5.3" string-width "^4.2.3" strong-log-transformer "^2.1.0" tar-stream "~2.2.0" tmp "~0.2.1" tsconfig-paths "^4.1.2" tslib "^2.3.0" - v8-compile-cache "2.3.0" yargs "^17.6.2" yargs-parser "21.1.1" optionalDependencies: - "@nrwl/nx-darwin-arm64" "15.9.7" - "@nrwl/nx-darwin-x64" "15.9.7" - "@nrwl/nx-linux-arm-gnueabihf" "15.9.7" - "@nrwl/nx-linux-arm64-gnu" "15.9.7" - "@nrwl/nx-linux-arm64-musl" "15.9.7" - "@nrwl/nx-linux-x64-gnu" "15.9.7" - "@nrwl/nx-linux-x64-musl" "15.9.7" - "@nrwl/nx-win32-arm64-msvc" "15.9.7" - "@nrwl/nx-win32-x64-msvc" "15.9.7" + "@nx/nx-darwin-arm64" "17.3.0" + "@nx/nx-darwin-x64" "17.3.0" + "@nx/nx-freebsd-x64" "17.3.0" + "@nx/nx-linux-arm-gnueabihf" "17.3.0" + "@nx/nx-linux-arm64-gnu" "17.3.0" + "@nx/nx-linux-arm64-musl" "17.3.0" + "@nx/nx-linux-x64-gnu" "17.3.0" + "@nx/nx-linux-x64-musl" "17.3.0" + "@nx/nx-win32-arm64-msvc" "17.3.0" + "@nx/nx-win32-x64-msvc" "17.3.0" object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" @@ -15051,6 +14820,20 @@ optionator@^0.9.3: prelude-ls "^1.2.1" type-check "^0.4.0" +ora@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.3.0.tgz#fb832899d3a1372fe71c8b2c534bbfe74961bb6f" + integrity sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g== + dependencies: + bl "^4.0.3" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-spinners "^2.5.0" + is-interactive "^1.0.0" + log-symbols "^4.0.0" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + ora@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" @@ -15219,51 +15002,27 @@ p-waterfall@2.1.1: dependencies: p-reduce "^2.0.0" -pacote@15.1.1: - version "15.1.1" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-15.1.1.tgz#94d8c6e0605e04d427610b3aacb0357073978348" - integrity sha512-eeqEe77QrA6auZxNHIp+1TzHQ0HBKf5V6c8zcaYZ134EJe1lCi+fjXATkNiEEfbG+e50nu02GLvUtmZcGOYabQ== - dependencies: - "@npmcli/git" "^4.0.0" - "@npmcli/installed-package-contents" "^2.0.1" - "@npmcli/promise-spawn" "^6.0.1" - "@npmcli/run-script" "^6.0.0" - cacache "^17.0.0" - fs-minipass "^3.0.0" - minipass "^4.0.0" - npm-package-arg "^10.0.0" - npm-packlist "^7.0.0" - npm-pick-manifest "^8.0.0" - npm-registry-fetch "^14.0.0" - proc-log "^3.0.0" - promise-retry "^2.0.1" - read-package-json "^6.0.0" - read-package-json-fast "^3.0.0" - sigstore "^1.0.0" - ssri "^10.0.0" - tar "^6.1.11" - -pacote@^15.0.0, pacote@^15.0.8: - version "15.2.0" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-15.2.0.tgz#0f0dfcc3e60c7b39121b2ac612bf8596e95344d3" - integrity sha512-rJVZeIwHTUta23sIZgEIM62WYwbmGbThdbnkt81ravBplQv+HjyroqnLRNH2+sLJHcGZmLRmhPwACqhfTcOmnA== +pacote@^17.0.5: + version "17.0.6" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-17.0.6.tgz#874bb59cda5d44ab784d0b6530fcb4a7d9b76a60" + integrity sha512-cJKrW21VRE8vVTRskJo78c/RCvwJCn1f4qgfxL4w77SOWrTCRcmfkYHlHtS0gqpgjv3zhXflRtgsrUCX5xwNnQ== dependencies: - "@npmcli/git" "^4.0.0" + "@npmcli/git" "^5.0.0" "@npmcli/installed-package-contents" "^2.0.1" - "@npmcli/promise-spawn" "^6.0.1" - "@npmcli/run-script" "^6.0.0" - cacache "^17.0.0" + "@npmcli/promise-spawn" "^7.0.0" + "@npmcli/run-script" "^7.0.0" + cacache "^18.0.0" fs-minipass "^3.0.0" - minipass "^5.0.0" - npm-package-arg "^10.0.0" - npm-packlist "^7.0.0" - npm-pick-manifest "^8.0.0" - npm-registry-fetch "^14.0.0" + minipass "^7.0.2" + npm-package-arg "^11.0.0" + npm-packlist "^8.0.0" + npm-pick-manifest "^9.0.0" + npm-registry-fetch "^16.0.0" proc-log "^3.0.0" promise-retry "^2.0.1" - read-package-json "^6.0.0" + read-package-json "^7.0.0" read-package-json-fast "^3.0.0" - sigstore "^1.3.0" + sigstore "^2.2.0" ssri "^10.0.0" tar "^6.1.11" @@ -15303,15 +15062,6 @@ parse-asn1@^5.0.0, parse-asn1@^5.1.6: pbkdf2 "^3.0.3" safe-buffer "^5.1.1" -parse-conflict-json@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/parse-conflict-json/-/parse-conflict-json-3.0.1.tgz#67dc55312781e62aa2ddb91452c7606d1969960c" - integrity sha512-01TvEktc68vwbJOtWZluyWeVGWjP+bZwXtPDMQVbBKzbJ/vZBif0L69KH1+cHv1SZ6e0FKLvjyHe8mqsIqYOmw== - dependencies: - json-parse-even-better-errors "^3.0.0" - just-diff "^6.0.0" - just-diff-apply "^5.2.0" - parse-duration@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/parse-duration/-/parse-duration-1.1.0.tgz#5192084c5d8f2a3fd676d04a451dbd2e05a1819c" @@ -15597,7 +15347,7 @@ postcss-nested@^6.0.1: dependencies: postcss-selector-parser "^6.0.11" -postcss-selector-parser@^6.0.10, postcss-selector-parser@^6.0.11: +postcss-selector-parser@^6.0.11: version "6.0.13" resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz#d05d8d76b1e8e173257ef9d60b706a8e5e99bf1b" integrity sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ== @@ -15643,15 +15393,6 @@ prettier@^2.8.1, prettier@^2.8.8: resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== -pretty-format@29.4.3: - version "29.4.3" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.4.3.tgz#25500ada21a53c9e8423205cf0337056b201244c" - integrity sha512-cvpcHTc42lcsvOOAzd3XuNWTcvk1Jmnzqeu+WsOuiPmxUJTnkbAcFNsRKvEpBEUFVUgy/GTZLulZDcDEi+CIlA== - dependencies: - "@jest/schemas" "^29.4.3" - ansi-styles "^5.0.0" - react-is "^18.0.0" - pretty-format@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" @@ -15661,10 +15402,14 @@ pretty-format@^27.5.1: ansi-styles "^5.0.0" react-is "^17.0.1" -proc-log@^2.0.0, proc-log@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-2.0.1.tgz#8f3f69a1f608de27878f91f5c688b225391cb685" - integrity sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw== +pretty-format@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== + dependencies: + "@jest/schemas" "^29.6.3" + ansi-styles "^5.0.0" + react-is "^18.0.0" proc-log@^3.0.0: version "3.0.0" @@ -15686,16 +15431,6 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== -promise-all-reject-late@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz#f8ebf13483e5ca91ad809ccc2fcf25f26f8643c2" - integrity sha512-vuf0Lf0lOxyQREH7GDIOUMLS7kz+gs8i6B+Yi8dC68a2sychGrHTJYghMBD6k7eUcH0H5P73EckCA48xijWqXw== - -promise-call-limit@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/promise-call-limit/-/promise-call-limit-1.0.2.tgz#f64b8dd9ef7693c9c7613e7dfe8d6d24de3031ea" - integrity sha512-1vTUnfI2hzui8AEIixbdAJlFY4LFDXqQswy/2eOlThAscXCY4It8FdVuI0fMJGAB2aWGbdQf/gv0skKYXmdrHA== - promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" @@ -15709,12 +15444,12 @@ promise-retry@^2.0.1: err-code "^2.0.2" retry "^0.12.0" -promzard@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/promzard/-/promzard-0.3.0.tgz#26a5d6ee8c7dee4cb12208305acfb93ba382a9ee" - integrity sha512-JZeYqd7UAcHCwI+sTOeUDYkvEU+1bQ7iE0UT1MgB/tERkAPkesW46MrpIySzODi+owTjZtiF8Ay5j9m60KmMBw== +promzard@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/promzard/-/promzard-1.0.0.tgz#3246f8e6c9895a77c0549cefb65828ac0f6c006b" + integrity sha512-KQVDEubSUHGSt5xLakaToDFrSoZhStB8dXLzk2xvwR67gJktrHFvpR63oZgHyK19WKbHFLXJqCPXdVR3aBP8Ig== dependencies: - read "1" + read "^2.0.0" prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" @@ -15730,11 +15465,6 @@ property-information@^6.0.0: resolved "https://registry.yarnpkg.com/property-information/-/property-information-6.4.0.tgz#6bc4c618b0c2d68b3bb8b552cbb97f8e300a0f82" integrity sha512-9t5qARVofg2xQqKtytzt+lZ4d1Qvj8t5B8fEwXK6qOfgRLgH/b13QlgEyDh033NOS31nXeFbYv7CLUDG1CeifQ== -proto-list@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" - integrity sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA== - protobufjs@^6.10.2, protobufjs@^6.8.8, protobufjs@~6.11.2, protobufjs@~6.11.3: version "6.11.4" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.4.tgz#29a412c38bf70d89e537b6d02d904a6f448173aa" @@ -15817,11 +15547,6 @@ punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== -q@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" - integrity sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw== - qr.js@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/qr.js/-/qr.js-0.0.0.tgz#cace86386f59a0db8050fa90d9b6b0e88a1e364f" @@ -16124,25 +15849,12 @@ read-cache@^1.0.0: dependencies: pify "^2.3.0" -read-cmd-shim@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-3.0.0.tgz#62b8c638225c61e6cc607f8f4b779f3b8238f155" - integrity sha512-KQDVjGqhZk92PPNRj9ZEXEuqg8bUobSKRw+q0YQ3TKI5xkce7bUJobL4Z/OtiEbAAv70yEpYIXp4iQ9L8oPVog== - -read-cmd-shim@^4.0.0: +read-cmd-shim@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz#640a08b473a49043e394ae0c7a34dd822c73b9bb" integrity sha512-yILWifhaSEEytfXI76kB9xEEiG1AiozaCJZ83A87ytjRiN+jVibXjedjCRNjoZviinhG+4UkalO3mWTd8u5O0Q== -read-package-json-fast@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz#323ca529630da82cb34b36cc0b996693c98c2b83" - integrity sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ== - dependencies: - json-parse-even-better-errors "^2.3.0" - npm-normalize-package-bin "^1.0.1" - -read-package-json-fast@^3.0.0, read-package-json-fast@^3.0.2: +read-package-json-fast@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz#394908a9725dc7a5f14e70c8e7556dff1d2b1049" integrity sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw== @@ -16150,27 +15862,7 @@ read-package-json-fast@^3.0.0, read-package-json-fast@^3.0.2: json-parse-even-better-errors "^3.0.0" npm-normalize-package-bin "^3.0.0" -read-package-json@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-5.0.1.tgz#1ed685d95ce258954596b13e2e0e76c7d0ab4c26" - integrity sha512-MALHuNgYWdGW3gKzuNMuYtcSSZbGQm94fAp16xt8VsYTLBjUSc55bLMKe6gzpWue0Tfi6CBgwCSdDAqutGDhMg== - dependencies: - glob "^8.0.1" - json-parse-even-better-errors "^2.3.1" - normalize-package-data "^4.0.0" - npm-normalize-package-bin "^1.0.1" - -read-package-json@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-5.0.2.tgz#b8779ccfd169f523b67208a89cc912e3f663f3fa" - integrity sha512-BSzugrt4kQ/Z0krro8zhTwV1Kd79ue25IhNN/VtHFy1mG/6Tluyi+msc0UpwaoQzxSHa28mntAjIZY6kEgfR9Q== - dependencies: - glob "^8.0.1" - json-parse-even-better-errors "^2.3.1" - normalize-package-data "^4.0.0" - npm-normalize-package-bin "^2.0.0" - -read-package-json@^6.0.0: +read-package-json@6.0.4, read-package-json@^6.0.0: version "6.0.4" resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-6.0.4.tgz#90318824ec456c287437ea79595f4c2854708836" integrity sha512-AEtWXYfopBj2z5N5PbkAOeNHRPUg5q+Nen7QLxV8M2zJq1ym6/lCz3fYNTCXe19puu2d06jfHhrP7v/S2PtMMw== @@ -16180,6 +15872,16 @@ read-package-json@^6.0.0: normalize-package-data "^5.0.0" npm-normalize-package-bin "^3.0.0" +read-package-json@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-7.0.0.tgz#d605c9dcf6bc5856da24204aa4e9518ee9714be0" + integrity sha512-uL4Z10OKV4p6vbdvIXB+OzhInYtIozl/VxUBPgNkBuUi2DeRonnuspmaVAMcrkmfjKGNmRndyQAbE7/AmzGwFg== + dependencies: + glob "^10.2.2" + json-parse-even-better-errors "^3.0.0" + normalize-package-data "^6.0.0" + npm-normalize-package-bin "^3.0.0" + read-pkg-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" @@ -16216,12 +15918,12 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -read@1, read@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" - integrity sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ== +read@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/read/-/read-2.1.0.tgz#69409372c54fe3381092bc363a00650b6ac37218" + integrity sha512-bvxi1QLJHcaywCAEsAk4DG3nVoqiY2Csps3qzWalhj5hFqRn1d/OixkFXtLO1PrgHUcAP0FNaSY/5GYNfENFFQ== dependencies: - mute-stream "~0.0.4" + mute-stream "~1.0.0" readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0, readable-stream@^3.6.2: version "3.6.2" @@ -16232,7 +15934,7 @@ readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stre string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@^4.1.0, readable-stream@^4.4.2: +readable-stream@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.4.2.tgz#e6aced27ad3b9d726d8308515b9a1b98dc1b9d13" integrity sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA== @@ -16665,21 +16367,21 @@ secp256k1@^5.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@7.3.8: - version "7.3.8" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== +semver@7.5.3: + version "7.5.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.3.tgz#161ce8c2c6b4b3bdca6caadc9fa3317a4c4fe88e" + integrity sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ== dependencies: lru-cache "^6.0.0" -semver@7.5.4, semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.4: +semver@7.5.4, semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" -semver@^6.0.0, semver@^6.3.1: +semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== @@ -16792,7 +16494,7 @@ signal-exit@^4.0.1, signal-exit@^4.1.0: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== -sigstore@^1.0.0, sigstore@^1.3.0, sigstore@^1.4.0: +sigstore@^1.4.0: version "1.9.0" resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-1.9.0.tgz#1e7ad8933aa99b75c6898ddd0eeebc3eb0d59875" integrity sha512-0Zjz0oe37d08VeOtBIuB6cRriqXse2e8w+7yIy2XSXjshRKxbc2KkhXjL229jXSxEm7UbcjS76wcJDGQddVI9A== @@ -16803,6 +16505,18 @@ sigstore@^1.0.0, sigstore@^1.3.0, sigstore@^1.4.0: "@sigstore/tuf" "^1.0.3" make-fetch-happen "^11.0.1" +sigstore@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-2.2.0.tgz#acba5f73ca2158d2b0507bc52d3592149c3ed20e" + integrity sha512-fcU9clHwEss2/M/11FFM8Jwc4PjBgbhXoNskoK5guoK0qGQBSeUbQZRJ+B2fDFIvhyf0gqCaPrel9mszbhAxug== + dependencies: + "@sigstore/bundle" "^2.1.1" + "@sigstore/core" "^0.2.0" + "@sigstore/protobuf-specs" "^0.2.1" + "@sigstore/sign" "^2.2.1" + "@sigstore/tuf" "^2.3.0" + "@sigstore/verify" "^0.1.0" + simple-concat@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" @@ -16894,7 +16608,16 @@ socks-proxy-agent@^7.0.0: debug "^4.3.3" socks "^2.6.2" -socks@^2.6.2: +socks-proxy-agent@^8.0.1: + version "8.0.2" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz#5acbd7be7baf18c46a3f293a840109a430a640ad" + integrity sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g== + dependencies: + agent-base "^7.0.2" + debug "^4.3.4" + socks "^2.7.1" + +socks@^2.6.2, socks@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.1.tgz#d8e651247178fde79c0663043e07240196857d55" integrity sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ== @@ -16989,7 +16712,7 @@ split2@^4.0.0: resolved "https://registry.yarnpkg.com/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4" integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== -split@^1.0.0: +split@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg== @@ -17001,13 +16724,6 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== -ssri@9.0.1, ssri@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-9.0.1.tgz#544d4c357a8d7b71a19700074b6883fcb4eae057" - integrity sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q== - dependencies: - minipass "^3.1.1" - ssri@^10.0.0, ssri@^10.0.1: version "10.0.5" resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.5.tgz#e49efcd6e36385196cb515d3a2ad6c3f0265ef8c" @@ -17015,6 +16731,13 @@ ssri@^10.0.0, ssri@^10.0.1: dependencies: minipass "^7.0.3" +ssri@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-9.0.1.tgz#544d4c357a8d7b71a19700074b6883fcb4eae057" + integrity sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q== + dependencies: + minipass "^3.1.1" + stack-generator@^2.0.5: version "2.0.10" resolved "https://registry.yarnpkg.com/stack-generator/-/stack-generator-2.0.10.tgz#8ae171e985ed62287d4f1ed55a1633b3fb53bb4d" @@ -17414,22 +17137,6 @@ temp-dir@1.0.0: resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" integrity sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ== -temp-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-2.0.0.tgz#bde92b05bdfeb1516e804c9c00ad45177f31321e" - integrity sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg== - -tempy@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/tempy/-/tempy-1.0.0.tgz#4f192b3ee3328a2684d0e3fc5c491425395aab65" - integrity sha512-eLXG5B1G0mRPHmgH2WydPl5v4jH35qEn3y/rA/aahKhIa91Pn119SsU7n7v/433gtT9ONzC8ISvNHIh2JSTm0w== - dependencies: - del "^6.0.0" - is-stream "^2.0.0" - temp-dir "^2.0.0" - type-fest "^0.16.0" - unique-string "^2.0.0" - text-encoding-utf-8@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/text-encoding-utf-8/-/text-encoding-utf-8-1.0.2.tgz#585b62197b0ae437e3c7b5d0af27ac1021e10d13" @@ -17581,11 +17288,6 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -treeverse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/treeverse/-/treeverse-3.0.0.tgz#dd82de9eb602115c6ebd77a574aae67003cb48c8" - integrity sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ== - trim-lines@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/trim-lines/-/trim-lines-3.0.1.tgz#d802e332a07df861c48802c04321017b1bd87338" @@ -17685,6 +17387,15 @@ tuf-js@^1.1.7: debug "^4.3.4" make-fetch-happen "^11.1.1" +tuf-js@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tuf-js/-/tuf-js-2.2.0.tgz#4daaa8620ba7545501d04dfa933c98abbcc959b9" + integrity sha512-ZSDngmP1z6zw+FIkIBjvOp/II/mIub/O7Pp12j1WNsiCpg5R5wAc//i555bBQsE44O94btLt0xM/Zr2LQjwdCg== + dependencies: + "@tufjs/models" "2.0.0" + debug "^4.3.4" + make-fetch-happen "^13.0.0" + tweetnacl-util@^0.13.3: version "0.13.5" resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.13.5.tgz#e39cd5d99709ee7125a18b03895b45a1299e475f" @@ -17712,11 +17423,6 @@ type-detect@^4.0.0, type-detect@^4.0.8: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== -type-fest@^0.16.0: - version "0.16.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.16.0.tgz#3240b891a78b0deae910dbeb86553e552a148860" - integrity sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg== - type-fest@^0.18.0: version "0.18.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.18.1.tgz#db4bc151a4a2cf4eebf9add5db75508db6cc841f" @@ -17813,12 +17519,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -"typescript@^3 || ^4": - version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== - -"typescript@^4.6.4 || ^5.2.2", typescript@^5, typescript@^5.0.2, typescript@^5.0.4, typescript@^5.1: +"typescript@>=3 < 6", "typescript@^4.6.4 || ^5.2.2", typescript@^5, typescript@^5.0.2, typescript@^5.0.4, typescript@^5.1: version "5.3.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== @@ -17925,13 +17626,6 @@ unidragger@^3.0.0: dependencies: ev-emitter "^2.0.0" -unique-filename@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-2.0.1.tgz#e785f8675a9a7589e0ac77e0b5c34d2eaeac6da2" - integrity sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A== - dependencies: - unique-slug "^3.0.0" - unique-filename@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea" @@ -17939,13 +17633,6 @@ unique-filename@^3.0.0: dependencies: unique-slug "^4.0.0" -unique-slug@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-3.0.0.tgz#6d347cf57c8a7a7a6044aabd0e2d74e4d76dc7c9" - integrity sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w== - dependencies: - imurmurhash "^0.1.4" - unique-slug@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-4.0.0.tgz#6bae6bb16be91351badd24cdce741f892a6532e3" @@ -17953,13 +17640,6 @@ unique-slug@^4.0.0: dependencies: imurmurhash "^0.1.4" -unique-string@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" - integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg== - dependencies: - crypto-random-string "^2.0.0" - unist-util-is@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-6.0.0.tgz#b775956486aff107a9ded971d996c173374be424" @@ -18044,7 +17724,7 @@ untun@^0.1.2: consola "^3.2.3" pathe "^1.1.1" -upath@2.0.1, upath@^2.0.1: +upath@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b" integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== @@ -18149,6 +17829,11 @@ uuid@8.3.2, uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +uuid@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== + uuidv4@^6.2.13: version "6.2.13" resolved "https://registry.yarnpkg.com/uuidv4/-/uuidv4-6.2.13.tgz#8f95ec5ef22d1f92c8e5d4c70b735d1c89572cb7" @@ -18162,11 +17847,6 @@ v8-compile-cache-lib@^3.0.1: resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== -v8-compile-cache@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - valid-url@^1.0.9: version "1.0.9" resolved "https://registry.yarnpkg.com/valid-url/-/valid-url-1.0.9.tgz#1c14479b40f1397a75782f115e4086447433a200" @@ -18180,10 +17860,10 @@ validate-npm-package-license@3.0.4, validate-npm-package-license@^3.0.1, validat spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -validate-npm-package-name@4.0.0, validate-npm-package-name@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-4.0.0.tgz#fe8f1c50ac20afdb86f177da85b3600f0ac0d747" - integrity sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q== +validate-npm-package-name@5.0.0, validate-npm-package-name@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz#f16afd48318e6f90a1ec101377fa0384cfc8c713" + integrity sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ== dependencies: builtins "^5.0.0" @@ -18194,13 +17874,6 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -validate-npm-package-name@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz#f16afd48318e6f90a1ec101377fa0384cfc8c713" - integrity sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ== - dependencies: - builtins "^5.0.0" - validator@^13.11.0: version "13.11.0" resolved "https://registry.yarnpkg.com/validator/-/validator-13.11.0.tgz#23ab3fd59290c61248364eabf4067f04955fbb1b" @@ -18436,11 +18109,6 @@ wagmi@^1.3.11, wagmi@^1.4.2: abitype "0.8.7" use-sync-external-store "^1.2.0" -walk-up-path@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/walk-up-path/-/walk-up-path-1.0.0.tgz#d4745e893dd5fd0dbb58dd0a4c6a33d9c9fec53e" - integrity sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg== - warning@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" @@ -18755,19 +18423,19 @@ which-typed-array@^1.1.11, which-typed-array@^1.1.13, which-typed-array@^1.1.2, gopd "^1.0.1" has-tostringtag "^1.0.0" -which@^2.0.1, which@^2.0.2: +which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" -which@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/which/-/which-3.0.1.tgz#89f1cd0c23f629a8105ffe69b8172791c87b4be1" - integrity sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg== +which@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/which/-/which-4.0.0.tgz#cd60b5e74503a3fbcfbf6cd6b4138a8bae644c1a" + integrity sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg== dependencies: - isexe "^2.0.0" + isexe "^3.1.1" why-is-node-running@^2.2.2: version "2.2.2" @@ -18821,13 +18489,13 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -write-file-atomic@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.1.tgz#9faa33a964c1c85ff6f849b80b42a88c2c537c8f" - integrity sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ== +write-file-atomic@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.1.tgz#68df4717c55c6fa4281a7860b4c2ba0a6d2b11e7" + integrity sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw== dependencies: imurmurhash "^0.1.4" - signal-exit "^3.0.7" + signal-exit "^4.0.1" write-file-atomic@^2.4.2: version "2.4.3" @@ -18838,14 +18506,6 @@ write-file-atomic@^2.4.2: imurmurhash "^0.1.4" signal-exit "^3.0.2" -write-file-atomic@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.1.tgz#68df4717c55c6fa4281a7860b4c2ba0a6d2b11e7" - integrity sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw== - dependencies: - imurmurhash "^0.1.4" - signal-exit "^4.0.1" - write-json-file@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a" @@ -19007,11 +18667,6 @@ yaml@^2.3.4: resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.4.tgz#53fc1d514be80aabf386dc6001eb29bf3b7523b2" integrity sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA== -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - yargs-parser@21.1.1, yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" @@ -19030,18 +18685,18 @@ yargs-parser@^20.2.2, yargs-parser@^20.2.3: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs@16.2.0, yargs@^16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== +yargs@17.7.2, yargs@^17.0.0, yargs@^17.6.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== dependencies: - cliui "^7.0.2" + cliui "^8.0.1" escalade "^3.1.1" get-caller-file "^2.0.5" require-directory "^2.1.1" - string-width "^4.2.0" + string-width "^4.2.3" y18n "^5.0.5" - yargs-parser "^20.2.2" + yargs-parser "^21.1.1" yargs@^15.3.1: version "15.4.1" @@ -19060,18 +18715,18 @@ yargs@^15.3.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^17.0.0, yargs@^17.6.2: - version "17.7.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== +yargs@^16.2.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== dependencies: - cliui "^8.0.1" + cliui "^7.0.2" escalade "^3.1.1" get-caller-file "^2.0.5" require-directory "^2.1.1" - string-width "^4.2.3" + string-width "^4.2.0" y18n "^5.0.5" - yargs-parser "^21.1.1" + yargs-parser "^20.2.2" yn@3.1.1: version "3.1.1"